From f961ff536a3caa18308f5b15ae26634483f9bcdc Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Sat, 20 Mar 2021 13:16:51 -0400 Subject: [PATCH] Schemas (#429) * Add single container prototype * Add multiple containers prototype * Add integration tests * Implement from_*() methods and add tests * Prototype inline injections * Add integration test for inline providers * Refactor integration tests * Add integration test for reordered schema * Remove unused imports from tests * Refactor schema module * Update tests to match latest schemas * Add mypy_boto3_s3 to the test requirements * Add boto3 to the test requirements * Add set_provides for Callable, Factory, and Singleton providers * Fix warnings in tests * Add typing stubs for Callable, Factory, and Singleton .set_provides() attributes * Fix singleton children to have optional provides * Implement provider to provider resolving * Fix pypy3 tests * Implement boto3 session use case and add tests * Implement lazy initialization and improve copying for Callable, Factory, Singleton, and Coroutine providers * Fix Python 2 tests * Add region name for boto3 integration example * Remove f-strings from set_provides() * Fix schema flake8 errors * Implement lazy initialization and improve copying for Delegate provider * Implement lazy initialization and improve copying for Object provider * Speed up wiring tests * Implement lazy initialization and improve copying for FactoryAggregate provider * Implement lazy initialization and improve copying for Selector provider * Implement lazy initialization and improve copying for Dependency provider * Implement lazy initialization and improve copying for Resource provider * Implement lazy initialization and improve copying for Configuration provider * Implement lazy initialization and improve copying for ProvidedInstance provider * Implement lazy initialization and improve copying for AttributeGetter provider * Implement lazy initialization and improve copying for ItemGetter provider * Implement lazy initialization and improve copying for MethodCaller provder * Update changelog * Fix typing in wiring module * Fix wiring module loader uninstallation issue * Fix provided instance providers error handing in asynchronous mode Co-authored-by: Roman Mogylatov --- docs/main/changelog.rst | 8 + requirements-dev.txt | 2 + src/dependency_injector/containers.c | 5912 ++-- src/dependency_injector/containers.pyi | 5 + src/dependency_injector/containers.pyx | 39 + src/dependency_injector/providers.c | 27625 +++++++++------- src/dependency_injector/providers.pxd | 14 +- src/dependency_injector/providers.pyi | 75 +- src/dependency_injector/providers.pyx | 961 +- src/dependency_injector/schema.py | 231 + src/dependency_injector/wiring.py | 4 +- .../containers/test_declarative_py2_py3.py | 2 +- tests/unit/providers/test_async_py36.py | 75 +- tests/unit/providers/test_base_py2_py3.py | 47 +- .../unit/providers/test_callables_py2_py3.py | 10 + .../providers/test_configuration_py2_py3.py | 22 + tests/unit/providers/test_coroutines_py35.py | 30 +- .../unit/providers/test_factories_py2_py3.py | 30 + .../test_provided_instance_py2_py3.py | 38 + tests/unit/providers/test_resource_py35.py | 10 + tests/unit/providers/test_selector_py2_py3.py | 22 + .../unit/providers/test_singletons_py2_py3.py | 10 + tests/unit/samples/schemasample/__init__.py | 0 .../schemasample/container-boto3-session.yml | 27 + .../container-multiple-inline.yml | 58 + .../container-multiple-reordered.yml | 43 + .../schemasample/container-multiple.yml | 43 + .../samples/schemasample/container-single.yml | 39 + tests/unit/samples/schemasample/services.py | 56 + tests/unit/samples/schemasample/utils.py | 2 + tests/unit/samples/wiringsamples/imports.py | 13 + tests/unit/samples/wiringsamples/module.py | 14 - tests/unit/schema/__init__.py | 1 + tests/unit/schema/test_containers_api_py36.py | 162 + tests/unit/schema/test_integration_py36.py | 293 + tests/unit/wiring/test_wiring_py36.py | 1 + .../wiring/test_wiring_string_ids_py36.py | 52 +- tox.ini | 4 + 38 files changed, 21101 insertions(+), 14879 deletions(-) create mode 100644 src/dependency_injector/schema.py create mode 100644 tests/unit/samples/schemasample/__init__.py create mode 100644 tests/unit/samples/schemasample/container-boto3-session.yml create mode 100644 tests/unit/samples/schemasample/container-multiple-inline.yml create mode 100644 tests/unit/samples/schemasample/container-multiple-reordered.yml create mode 100644 tests/unit/samples/schemasample/container-multiple.yml create mode 100644 tests/unit/samples/schemasample/container-single.yml create mode 100644 tests/unit/samples/schemasample/services.py create mode 100644 tests/unit/samples/schemasample/utils.py create mode 100644 tests/unit/samples/wiringsamples/imports.py create mode 100644 tests/unit/schema/__init__.py create mode 100644 tests/unit/schema/test_containers_api_py36.py create mode 100644 tests/unit/schema/test_integration_py36.py diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index b2d9278a..b996b50f 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -7,6 +7,14 @@ that were made in every particular version. From version 0.7.6 *Dependency Injector* framework strictly follows `Semantic versioning`_ +Development version +------------------- +- Implement providers' lazy initialization. +- Improve providers' copying. +- Improve typing in wiring module. +- Fix wiring module loader uninstallation issue. +- Fix provided instance providers error handing in asynchronous mode. + 4.30.0 ------ - Remove restriction to wire a dynamic container. diff --git a/requirements-dev.txt b/requirements-dev.txt index 3c5353db..2c9c38e0 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -12,5 +12,7 @@ fastapi pydantic numpy scipy +boto3 +mypy_boto3_s3 -r requirements-ext.txt diff --git a/src/dependency_injector/containers.c b/src/dependency_injector/containers.c index 053802c0..3e691427 100644 --- a/src/dependency_injector/containers.c +++ b/src/dependency_injector/containers.c @@ -1339,12 +1339,12 @@ struct __pyx_obj_19dependency_injector_9providers_Dict { * * * cdef class Resource(Provider): # <<<<<<<<<<<<<< - * cdef object __initializer + * cdef object __provides * cdef bint __initialized */ struct __pyx_obj_19dependency_injector_9providers_Resource { struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; - PyObject *__pyx___initializer; + PyObject *__pyx___provides; int __pyx___initialized; PyObject *__pyx___shutdowner; PyObject *__pyx___resource; @@ -1389,12 +1389,12 @@ struct __pyx_obj_19dependency_injector_9providers_Selector { * # Provided instance * * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider + * cdef object __provides * */ struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance { struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; - struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___provider; + PyObject *__pyx___provides; }; @@ -1402,13 +1402,13 @@ struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance { * * * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider - * cdef object __attribute + * cdef object __provides + * cdef object __name */ struct __pyx_obj_19dependency_injector_9providers_AttributeGetter { struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; - struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___provider; - PyObject *__pyx___attribute; + PyObject *__pyx___provides; + PyObject *__pyx___name; }; @@ -1416,13 +1416,13 @@ struct __pyx_obj_19dependency_injector_9providers_AttributeGetter { * * * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider - * cdef object __item + * cdef object __provides + * cdef object __name */ struct __pyx_obj_19dependency_injector_9providers_ItemGetter { struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; - struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___provider; - PyObject *__pyx___item; + PyObject *__pyx___provides; + PyObject *__pyx___name; }; @@ -1430,12 +1430,12 @@ struct __pyx_obj_19dependency_injector_9providers_ItemGetter { * * * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider + * cdef object __provides * cdef tuple __args */ struct __pyx_obj_19dependency_injector_9providers_MethodCaller { struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; - struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___provider; + PyObject *__pyx___provides; PyObject *__pyx___args; int __pyx___args_len; PyObject *__pyx___kwargs; @@ -1535,7 +1535,7 @@ struct __pyx_obj_19dependency_injector_9providers_SingletonFullResetContext { }; -/* "dependency_injector/containers.pyx":157 +/* "dependency_injector/containers.pyx":163 * } * * def traverse(self, types=None): # <<<<<<<<<<<<<< @@ -1549,7 +1549,7 @@ struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct__traverse }; -/* "dependency_injector/containers.pyx":464 +/* "dependency_injector/containers.pyx":503 * } * * def traverse(cls, types=None): # <<<<<<<<<<<<<< @@ -1563,7 +1563,7 @@ struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_1_travers }; -/* "dependency_injector/containers.pyx":655 +/* "dependency_injector/containers.pyx":694 * * * def override(object container): # <<<<<<<<<<<<<< @@ -1576,7 +1576,7 @@ struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_2_overrid }; -/* "dependency_injector/containers.pyx":672 +/* "dependency_injector/containers.pyx":711 * * * def copy(object container): # <<<<<<<<<<<<<< @@ -2102,7 +2102,7 @@ static struct __pyx_vtabstruct_19dependency_injector_9providers_Dict *__pyx_vtab * * * cdef class Resource(Provider): # <<<<<<<<<<<<<< - * cdef object __initializer + * cdef object __provides * cdef bint __initialized */ @@ -2144,7 +2144,7 @@ static struct __pyx_vtabstruct_19dependency_injector_9providers_Selector *__pyx_ * # Provided instance * * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider + * cdef object __provides * */ @@ -2158,8 +2158,8 @@ static struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance * * * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider - * cdef object __attribute + * cdef object __provides + * cdef object __name */ struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter { @@ -2172,8 +2172,8 @@ static struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter * * * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider - * cdef object __item + * cdef object __provides + * cdef object __name */ struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter { @@ -2186,7 +2186,7 @@ static struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter *__py * * * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider + * cdef object __provides * cdef tuple __args */ @@ -2687,6 +2687,49 @@ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_co static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); #endif +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); +#if PY_MAJOR_VERSION < 3 + if (unlikely(PyInstance_Check(obj))) + return __Pyx_PyObject_GetAttrStr(obj, attr_name); +#endif + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#else +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* None.proto */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); + /* UnpackUnboundCMethod.proto */ typedef struct { PyObject *type; @@ -2799,14 +2842,6 @@ static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* k /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); -/* GetException.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -#else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); -#endif - /* GetAttr3.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); @@ -2893,18 +2928,12 @@ static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, /* GetVTable.proto */ static void* __Pyx_GetVtable(PyObject *dict); -/* Import.proto */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); - /* PatchInspect.proto */ static PyObject* __Pyx_patch_inspect(PyObject* module); /* PatchAsyncIO.proto */ static PyObject* __Pyx_patch_asyncio(PyObject* module); -/* ImportFrom.proto */ -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); - /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); @@ -3093,14 +3122,15 @@ static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_super; static PyObject *__pyx_builtin_id; static PyObject *__pyx_builtin_AttributeError; +static PyObject *__pyx_builtin_open; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_zip; static const char __pyx_k__4[] = "\""; static const char __pyx_k__5[] = ", "; static const char __pyx_k_id[] = "id"; -static const char __pyx_k__13[] = "__"; -static const char __pyx_k__22[] = ""; +static const char __pyx_k__14[] = "__"; +static const char __pyx_k__23[] = ""; static const char __pyx_k_cls[] = "cls"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_get[] = "get"; @@ -3111,22 +3141,27 @@ static const char __pyx_k_six[] = "six"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_zip[] = "zip"; static const char __pyx_k_Self[] = "Self"; -static const char __pyx_k__103[] = "_"; +static const char __pyx_k__111[] = "_"; static const char __pyx_k_args[] = "args"; static const char __pyx_k_base[] = "base"; static const char __pyx_k_call[] = "call"; static const char __pyx_k_copy[] = "copy"; static const char __pyx_k_exit[] = "__exit__"; +static const char __pyx_k_file[] = "file"; static const char __pyx_k_init[] = "__init__"; static const char __pyx_k_join[] = "join"; +static const char __pyx_k_json[] = "json"; +static const char __pyx_k_load[] = "load"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_memo[] = "memo"; static const char __pyx_k_name[] = "name"; +static const char __pyx_k_open[] = "open"; static const char __pyx_k_self[] = "__self__"; static const char __pyx_k_send[] = "send"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_wire[] = "wire"; static const char __pyx_k_wrap[] = "wrap"; +static const char __pyx_k_yaml[] = "yaml"; static const char __pyx_k_Error[] = "Error"; static const char __pyx_k_bases[] = "bases"; static const char __pyx_k_class[] = "__class__"; @@ -3151,11 +3186,13 @@ static const char __pyx_k_gather[] = "gather"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_init_2[] = "init"; static const char __pyx_k_kwargs[] = "kwargs"; +static const char __pyx_k_loader[] = "loader"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_name_2[] = "__name__"; static const char __pyx_k_object[] = "object"; static const char __pyx_k_parent[] = "parent"; static const char __pyx_k_result[] = "result"; +static const char __pyx_k_schema[] = "schema"; static const char __pyx_k_self_2[] = "self"; static const char __pyx_k_self_3[] = "@@self@@"; static const char __pyx_k_unwire[] = "unwire"; @@ -3174,6 +3211,7 @@ static const char __pyx_k_KeyError[] = "KeyError"; static const char __pyx_k_Provider[] = "Provider"; static const char __pyx_k_Resource[] = "Resource"; static const char __pyx_k_deepcopy[] = "deepcopy"; +static const char __pyx_k_filepath[] = "filepath"; static const char __pyx_k_isfuture[] = "isfuture"; static const char __pyx_k_override[] = "override"; static const char __pyx_k_packages[] = "packages"; @@ -3194,6 +3232,7 @@ static const char __pyx_k_metaclass[] = "__metaclass__"; static const char __pyx_k_providers[] = "providers"; static const char __pyx_k_undefined[] = "undefined"; static const char __pyx_k_Dependency[] = "Dependency"; +static const char __pyx_k_SafeLoader[] = "SafeLoader"; static const char __pyx_k_attributes[] = "attributes"; static const char __pyx_k_class_name[] = "class_name"; static const char __pyx_k_containers[] = "containers"; @@ -3211,9 +3250,11 @@ static const char __pyx_k_ImportError[] = "ImportError"; static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py"; static const char __pyx_k_container_2[] = "_container"; static const char __pyx_k_copied_self[] = "copied_self"; +static const char __pyx_k_from_schema[] = "from_schema"; static const char __pyx_k_iscoroutine[] = "iscoroutine"; static const char __pyx_k_parent_name[] = "parent_name"; static const char __pyx_k_IS_CONTAINER[] = "__IS_CONTAINER__"; +static const char __pyx_k_build_schema[] = "build_schema"; static const char __pyx_k_dependencies[] = "dependencies"; static const char __pyx_k_set_provider[] = "set_provider"; static const char __pyx_k_staticmethod[] = "staticmethod"; @@ -3246,6 +3287,8 @@ static const char __pyx_k_undefined_names[] = "undefined_names"; static const char __pyx_k_DynamicContainer[] = "DynamicContainer"; static const char __pyx_k_copied_container[] = "copied_container"; static const char __pyx_k_copied_providers[] = "copied_providers"; +static const char __pyx_k_from_json_schema[] = "from_json_schema"; +static const char __pyx_k_from_yaml_schema[] = "from_yaml_schema"; static const char __pyx_k_reset_singletons[] = "reset_singletons"; static const char __pyx_k_source_providers[] = "source_providers"; static const char __pyx_k_wired_to_modules[] = "wired_to_modules"; @@ -3286,6 +3329,7 @@ static const char __pyx_k_Pyx_CFunc_object____object[] = "__Pyx_CFunc_object____ static const char __pyx_k_has_undefined_dependencies[] = "\" has undefined dependencies: "; static const char __pyx_k_override_locals__decorator[] = "override.._decorator"; static const char __pyx_k_DynamicContainer___deepcopy[] = "DynamicContainer.__deepcopy__"; +static const char __pyx_k_DynamicContainer_from_schema[] = "DynamicContainer.from_schema"; static const char __pyx_k_DynamicContainer_parent_name[] = "DynamicContainer.parent_name"; static const char __pyx_k_SingletonResetContext___exit[] = "SingletonResetContext.__exit__"; static const char __pyx_k_SingletonResetContext___init[] = "SingletonResetContext.__init__"; @@ -3320,6 +3364,8 @@ static const char __pyx_k_DeclarativeContainer_reset_overr[] = "DeclarativeConta static const char __pyx_k_Declarative_inversion_of_control[] = "Declarative inversion of control container meta class."; static const char __pyx_k_DynamicContainer_apply_container[] = "DynamicContainer.apply_container_providers_overridings"; static const char __pyx_k_DynamicContainer_check_dependenc[] = "DynamicContainer.check_dependencies"; +static const char __pyx_k_DynamicContainer_from_json_schem[] = "DynamicContainer.from_json_schema"; +static const char __pyx_k_DynamicContainer_from_yaml_schem[] = "DynamicContainer.from_yaml_schema"; static const char __pyx_k_DynamicContainer_override_provid[] = "DynamicContainer.override_providers"; static const char __pyx_k_DynamicContainer_reset_last_over[] = "DynamicContainer.reset_last_overriding"; static const char __pyx_k_DynamicContainer_reset_singleton[] = "DynamicContainer.reset_singletons"; @@ -3328,6 +3374,7 @@ static const char __pyx_k_DynamicContainer_shutdown_resour[] = "DynamicContainer static const char __pyx_k_Dynamic_inversion_of_control_con[] = "Dynamic inversion of control container.\n\n .. code-block:: python\n\n services = DynamicContainer()\n services.auth = providers.Factory(AuthService)\n services.users = providers.Factory(UsersService,\n auth_service=services.auth)\n\n .. py:attribute:: providers\n\n Read-only dictionary of all providers.\n\n :type: dict[str, :py:class:`dependency_injector.providers.Provider`]\n\n .. py:attribute:: overridden\n\n Tuple of overriding containers.\n\n :type: tuple[:py:class:`DynamicContainer`]\n\n .. py:attribute:: provider_type\n\n Type of providers that could be placed in container.\n\n :type: type\n "; 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_Unable_to_load_yaml_schema_PyYAM[] = "Unable to load yaml schema - PyYAML is not installed. Install PyYAML or install Dependency Injector with yaml extras: \"pip install dependency-injector[yaml]\""; static const char __pyx_k_Wiring_requires_Python_3_6_or_ab[] = "Wiring requires Python 3.6 or above"; static const char __pyx_k_apply_container_providers_overri[] = "apply_container_providers_overridings"; static const char __pyx_k_src_dependency_injector_containe[] = "src/dependency_injector/containers.pyx"; @@ -3373,6 +3420,9 @@ static PyObject *__pyx_n_s_DynamicContainer_apply_container; static PyObject *__pyx_n_s_DynamicContainer_assign_parent; static PyObject *__pyx_n_s_DynamicContainer_check_dependenc; static PyObject *__pyx_n_s_DynamicContainer_dependencies; +static PyObject *__pyx_n_s_DynamicContainer_from_json_schem; +static PyObject *__pyx_n_s_DynamicContainer_from_schema; +static PyObject *__pyx_n_s_DynamicContainer_from_yaml_schem; static PyObject *__pyx_n_s_DynamicContainer_init_resources; static PyObject *__pyx_n_s_DynamicContainer_override; static PyObject *__pyx_n_s_DynamicContainer_override_provid; @@ -3400,15 +3450,17 @@ 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_SafeLoader; static PyObject *__pyx_n_s_Self; static PyObject *__pyx_n_s_SingletonResetContext; static PyObject *__pyx_n_s_SingletonResetContext___enter; static PyObject *__pyx_n_s_SingletonResetContext___exit; static PyObject *__pyx_n_s_SingletonResetContext___init; +static PyObject *__pyx_kp_s_Unable_to_load_yaml_schema_PyYAM; static PyObject *__pyx_kp_s_Wiring_requires_Python_3_6_or_ab; -static PyObject *__pyx_n_s__103; -static PyObject *__pyx_n_s__13; -static PyObject *__pyx_n_s__22; +static PyObject *__pyx_n_s__111; +static PyObject *__pyx_n_s__14; +static PyObject *__pyx_n_s__23; static PyObject *__pyx_kp_u__4; static PyObject *__pyx_kp_s__5; static PyObject *__pyx_n_s_add_done_callback; @@ -3425,6 +3477,7 @@ static PyObject *__pyx_n_s_asyncio_tasks; static PyObject *__pyx_n_s_attributes; static PyObject *__pyx_n_s_base; static PyObject *__pyx_n_s_bases; +static PyObject *__pyx_n_s_build_schema; static PyObject *__pyx_n_s_call; static PyObject *__pyx_n_s_cfunc_to_py; static PyObject *__pyx_n_s_check_dependencies; @@ -3462,8 +3515,13 @@ static PyObject *__pyx_n_s_errors; static PyObject *__pyx_n_s_exit; static PyObject *__pyx_n_s_extend; static PyObject *__pyx_n_s_fetch_self; +static PyObject *__pyx_n_s_file; +static PyObject *__pyx_n_s_filepath; static PyObject *__pyx_n_s_format; +static PyObject *__pyx_n_s_from_json_schema; static PyObject *__pyx_n_s_from_providers; +static PyObject *__pyx_n_s_from_schema; +static PyObject *__pyx_n_s_from_yaml_schema; static PyObject *__pyx_n_s_functools; static PyObject *__pyx_n_s_future; static PyObject *__pyx_n_s_future_args_kwargs; @@ -3489,7 +3547,10 @@ static PyObject *__pyx_n_s_items; static PyObject *__pyx_n_s_iteritems; static PyObject *__pyx_n_s_itervalues; static PyObject *__pyx_n_s_join; +static PyObject *__pyx_n_s_json; static PyObject *__pyx_n_s_kwargs; +static PyObject *__pyx_n_s_load; +static PyObject *__pyx_n_s_loader; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_mcs; static PyObject *__pyx_n_s_memo; @@ -3500,6 +3561,7 @@ static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_n_s_new; static PyObject *__pyx_n_s_object; +static PyObject *__pyx_n_s_open; static PyObject *__pyx_n_s_overridden; static PyObject *__pyx_n_s_override; static PyObject *__pyx_n_s_override_locals__decorator; @@ -3530,6 +3592,7 @@ static PyObject *__pyx_n_s_reset_singletons; static PyObject *__pyx_n_s_resolve_provider_name; static PyObject *__pyx_n_s_resource; static PyObject *__pyx_n_s_result; +static PyObject *__pyx_n_s_schema; static PyObject *__pyx_n_s_self; static PyObject *__pyx_n_s_self_2; static PyObject *__pyx_kp_s_self_3; @@ -3568,6 +3631,7 @@ static PyObject *__pyx_n_s_wired_to_modules; static PyObject *__pyx_n_s_wired_to_packages; static PyObject *__pyx_n_s_wiring; static PyObject *__pyx_n_s_wrap; +static PyObject *__pyx_n_s_yaml; static PyObject *__pyx_n_s_zip; static PyObject *__pyx_pf_19dependency_injector_10containers_wire(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_10containers_2unwire(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ @@ -3590,9 +3654,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_33apply_container_providers_overridings(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_35reset_singletons(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_37check_dependencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_39resolve_provider_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_41parent_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_43assign_parent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parent); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_39from_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_41from_yaml_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filepath, PyObject *__pyx_v_loader); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_43from_json_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filepath); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_45resolve_provider_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_47parent_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_49assign_parent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parent); /* proto */ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContainerMetaClass___new__(CYTHON_UNUSED PyObject *__pyx_self, PyTypeObject *__pyx_v_mcs, PyObject *__pyx_v_class_name, PyObject *__pyx_v_bases, PyObject *__pyx_v_attributes); /* proto */ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContainerMetaClass_2__setattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContainerMetaClass_4__delattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_name); /* proto */ @@ -3635,111 +3702,119 @@ static PyObject *__pyx_int_6; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_tuple_; static PyObject *__pyx_slice__3; -static PyObject *__pyx_tuple__7; -static PyObject *__pyx_tuple__9; -static PyObject *__pyx_slice__23; -static PyObject *__pyx_tuple__11; -static PyObject *__pyx_tuple__14; -static PyObject *__pyx_tuple__16; -static PyObject *__pyx_tuple__18; -static PyObject *__pyx_tuple__20; -static PyObject *__pyx_tuple__24; +static PyObject *__pyx_tuple__6; +static PyObject *__pyx_tuple__8; +static PyObject *__pyx_slice__24; +static PyObject *__pyx_tuple__10; +static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__15; +static PyObject *__pyx_tuple__17; +static PyObject *__pyx_tuple__19; +static PyObject *__pyx_tuple__21; static PyObject *__pyx_tuple__25; -static PyObject *__pyx_tuple__27; -static PyObject *__pyx_tuple__29; +static PyObject *__pyx_tuple__26; +static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__30; -static PyObject *__pyx_tuple__32; -static PyObject *__pyx_tuple__34; -static PyObject *__pyx_tuple__36; -static PyObject *__pyx_tuple__38; -static PyObject *__pyx_tuple__40; +static PyObject *__pyx_tuple__31; +static PyObject *__pyx_tuple__33; +static PyObject *__pyx_tuple__35; +static PyObject *__pyx_tuple__37; +static PyObject *__pyx_tuple__39; static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__42; -static PyObject *__pyx_tuple__44; -static PyObject *__pyx_tuple__46; -static PyObject *__pyx_tuple__48; -static PyObject *__pyx_tuple__50; -static PyObject *__pyx_tuple__52; -static PyObject *__pyx_tuple__54; -static PyObject *__pyx_tuple__56; +static PyObject *__pyx_tuple__43; +static PyObject *__pyx_tuple__45; +static PyObject *__pyx_tuple__47; +static PyObject *__pyx_tuple__49; +static PyObject *__pyx_tuple__51; +static PyObject *__pyx_tuple__53; +static PyObject *__pyx_tuple__55; static PyObject *__pyx_tuple__57; -static PyObject *__pyx_tuple__59; -static PyObject *__pyx_tuple__61; -static PyObject *__pyx_tuple__63; -static PyObject *__pyx_tuple__65; -static PyObject *__pyx_tuple__67; -static PyObject *__pyx_tuple__69; -static PyObject *__pyx_tuple__71; -static PyObject *__pyx_tuple__73; +static PyObject *__pyx_tuple__58; +static PyObject *__pyx_tuple__60; +static PyObject *__pyx_tuple__62; +static PyObject *__pyx_tuple__64; +static PyObject *__pyx_tuple__66; +static PyObject *__pyx_tuple__68; +static PyObject *__pyx_tuple__70; +static PyObject *__pyx_tuple__72; +static PyObject *__pyx_tuple__74; static PyObject *__pyx_tuple__75; static PyObject *__pyx_tuple__77; static PyObject *__pyx_tuple__79; static PyObject *__pyx_tuple__81; static PyObject *__pyx_tuple__83; -static PyObject *__pyx_tuple__84; static PyObject *__pyx_tuple__85; static PyObject *__pyx_tuple__87; static PyObject *__pyx_tuple__89; static PyObject *__pyx_tuple__91; +static PyObject *__pyx_tuple__92; static PyObject *__pyx_tuple__93; static PyObject *__pyx_tuple__95; static PyObject *__pyx_tuple__97; static PyObject *__pyx_tuple__99; static PyObject *__pyx_codeobj__2; -static PyObject *__pyx_codeobj__6; -static PyObject *__pyx_codeobj__8; +static PyObject *__pyx_codeobj__7; +static PyObject *__pyx_codeobj__9; static PyObject *__pyx_tuple__101; -static PyObject *__pyx_tuple__104; -static PyObject *__pyx_tuple__106; -static PyObject *__pyx_tuple__108; -static PyObject *__pyx_codeobj__10; -static PyObject *__pyx_codeobj__12; -static PyObject *__pyx_codeobj__15; -static PyObject *__pyx_codeobj__17; -static PyObject *__pyx_codeobj__19; -static PyObject *__pyx_codeobj__21; -static PyObject *__pyx_codeobj__26; -static PyObject *__pyx_codeobj__28; -static PyObject *__pyx_codeobj__31; -static PyObject *__pyx_codeobj__33; -static PyObject *__pyx_codeobj__35; -static PyObject *__pyx_codeobj__37; -static PyObject *__pyx_codeobj__39; -static PyObject *__pyx_codeobj__43; -static PyObject *__pyx_codeobj__45; -static PyObject *__pyx_codeobj__47; -static PyObject *__pyx_codeobj__49; -static PyObject *__pyx_codeobj__51; -static PyObject *__pyx_codeobj__53; -static PyObject *__pyx_codeobj__55; -static PyObject *__pyx_codeobj__58; -static PyObject *__pyx_codeobj__60; -static PyObject *__pyx_codeobj__62; -static PyObject *__pyx_codeobj__64; -static PyObject *__pyx_codeobj__66; -static PyObject *__pyx_codeobj__68; -static PyObject *__pyx_codeobj__70; -static PyObject *__pyx_codeobj__72; -static PyObject *__pyx_codeobj__74; +static PyObject *__pyx_tuple__103; +static PyObject *__pyx_tuple__105; +static PyObject *__pyx_tuple__107; +static PyObject *__pyx_tuple__109; +static PyObject *__pyx_tuple__112; +static PyObject *__pyx_tuple__114; +static PyObject *__pyx_tuple__116; +static PyObject *__pyx_codeobj__11; +static PyObject *__pyx_codeobj__13; +static PyObject *__pyx_codeobj__16; +static PyObject *__pyx_codeobj__18; +static PyObject *__pyx_codeobj__20; +static PyObject *__pyx_codeobj__22; +static PyObject *__pyx_codeobj__27; +static PyObject *__pyx_codeobj__29; +static PyObject *__pyx_codeobj__32; +static PyObject *__pyx_codeobj__34; +static PyObject *__pyx_codeobj__36; +static PyObject *__pyx_codeobj__38; +static PyObject *__pyx_codeobj__40; +static PyObject *__pyx_codeobj__44; +static PyObject *__pyx_codeobj__46; +static PyObject *__pyx_codeobj__48; +static PyObject *__pyx_codeobj__50; +static PyObject *__pyx_codeobj__52; +static PyObject *__pyx_codeobj__54; +static PyObject *__pyx_codeobj__56; +static PyObject *__pyx_codeobj__59; +static PyObject *__pyx_codeobj__61; +static PyObject *__pyx_codeobj__63; +static PyObject *__pyx_codeobj__65; +static PyObject *__pyx_codeobj__67; +static PyObject *__pyx_codeobj__69; +static PyObject *__pyx_codeobj__71; +static PyObject *__pyx_codeobj__73; static PyObject *__pyx_codeobj__76; static PyObject *__pyx_codeobj__78; static PyObject *__pyx_codeobj__80; static PyObject *__pyx_codeobj__82; +static PyObject *__pyx_codeobj__84; static PyObject *__pyx_codeobj__86; static PyObject *__pyx_codeobj__88; static PyObject *__pyx_codeobj__90; -static PyObject *__pyx_codeobj__92; static PyObject *__pyx_codeobj__94; static PyObject *__pyx_codeobj__96; static PyObject *__pyx_codeobj__98; static PyObject *__pyx_codeobj__100; static PyObject *__pyx_codeobj__102; -static PyObject *__pyx_codeobj__105; -static PyObject *__pyx_codeobj__107; -static PyObject *__pyx_codeobj__109; +static PyObject *__pyx_codeobj__104; +static PyObject *__pyx_codeobj__106; +static PyObject *__pyx_codeobj__108; +static PyObject *__pyx_codeobj__110; +static PyObject *__pyx_codeobj__113; +static PyObject *__pyx_codeobj__115; +static PyObject *__pyx_codeobj__117; /* Late includes */ -/* "dependency_injector/containers.pyx":19 +/* "dependency_injector/containers.pyx":25 * from .wiring import wire, unwire * else: * def wire(*args, **kwargs): # <<<<<<<<<<<<<< @@ -3777,20 +3852,20 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_wire(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("wire", 0); - /* "dependency_injector/containers.pyx":20 + /* "dependency_injector/containers.pyx":26 * else: * def wire(*args, **kwargs): * raise NotImplementedError('Wiring requires Python 3.6 or above') # <<<<<<<<<<<<<< * * def unwire(*args, **kwargs): */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 20, __pyx_L1_error) + __PYX_ERR(0, 26, __pyx_L1_error) - /* "dependency_injector/containers.pyx":19 + /* "dependency_injector/containers.pyx":25 * from .wiring import wire, unwire * else: * def wire(*args, **kwargs): # <<<<<<<<<<<<<< @@ -3808,7 +3883,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_wire(CYTHON_UNUSED return __pyx_r; } -/* "dependency_injector/containers.pyx":22 +/* "dependency_injector/containers.pyx":28 * raise NotImplementedError('Wiring requires Python 3.6 or above') * * def unwire(*args, **kwargs): # <<<<<<<<<<<<<< @@ -3846,20 +3921,20 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_2unwire(CYTHON_UNUS int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unwire", 0); - /* "dependency_injector/containers.pyx":23 + /* "dependency_injector/containers.pyx":29 * * def unwire(*args, **kwargs): * raise NotImplementedError('Wiring requires Python 3.6 or above') # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 23, __pyx_L1_error) + __PYX_ERR(0, 29, __pyx_L1_error) - /* "dependency_injector/containers.pyx":22 + /* "dependency_injector/containers.pyx":28 * raise NotImplementedError('Wiring requires Python 3.6 or above') * * def unwire(*args, **kwargs): # <<<<<<<<<<<<<< @@ -3877,7 +3952,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_2unwire(CYTHON_UNUS return __pyx_r; } -/* "dependency_injector/containers.pyx":61 +/* "dependency_injector/containers.pyx":67 * __IS_CONTAINER__ = True * * def __init__(self): # <<<<<<<<<<<<<< @@ -3911,97 +3986,97 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/containers.pyx":66 + /* "dependency_injector/containers.pyx":72 * :rtype: None * """ * self.provider_type = providers.Provider # <<<<<<<<<<<<<< * self.providers = {} * self.overridden = tuple() */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_provider_type, __pyx_t_2) < 0) __PYX_ERR(0, 66, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_provider_type, __pyx_t_2) < 0) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":67 + /* "dependency_injector/containers.pyx":73 * """ * self.provider_type = providers.Provider * self.providers = {} # <<<<<<<<<<<<<< * self.overridden = tuple() * self.parent = None */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_providers, __pyx_t_2) < 0) __PYX_ERR(0, 67, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_providers, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":68 + /* "dependency_injector/containers.pyx":74 * self.provider_type = providers.Provider * self.providers = {} * self.overridden = tuple() # <<<<<<<<<<<<<< * self.parent = None * self.declarative_parent = None */ - __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_overridden, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_overridden, __pyx_t_2) < 0) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":69 + /* "dependency_injector/containers.pyx":75 * self.providers = {} * self.overridden = tuple() * self.parent = None # <<<<<<<<<<<<<< * self.declarative_parent = None * self.wired_to_modules = [] */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parent, Py_None) < 0) __PYX_ERR(0, 69, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parent, Py_None) < 0) __PYX_ERR(0, 75, __pyx_L1_error) - /* "dependency_injector/containers.pyx":70 + /* "dependency_injector/containers.pyx":76 * self.overridden = tuple() * self.parent = None * self.declarative_parent = None # <<<<<<<<<<<<<< * self.wired_to_modules = [] * self.wired_to_packages = [] */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_declarative_parent, Py_None) < 0) __PYX_ERR(0, 70, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_declarative_parent, Py_None) < 0) __PYX_ERR(0, 76, __pyx_L1_error) - /* "dependency_injector/containers.pyx":71 + /* "dependency_injector/containers.pyx":77 * self.parent = None * self.declarative_parent = None * self.wired_to_modules = [] # <<<<<<<<<<<<<< * self.wired_to_packages = [] * self.__self__ = providers.Self(self) */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_modules, __pyx_t_2) < 0) __PYX_ERR(0, 71, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_modules, __pyx_t_2) < 0) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":72 + /* "dependency_injector/containers.pyx":78 * self.declarative_parent = None * self.wired_to_modules = [] * self.wired_to_packages = [] # <<<<<<<<<<<<<< * self.__self__ = providers.Self(self) * super(DynamicContainer, self).__init__() */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_packages, __pyx_t_2) < 0) __PYX_ERR(0, 72, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_packages, __pyx_t_2) < 0) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":73 + /* "dependency_injector/containers.pyx":79 * self.wired_to_modules = [] * self.wired_to_packages = [] * self.__self__ = providers.Self(self) # <<<<<<<<<<<<<< * super(DynamicContainer, self).__init__() * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -4016,22 +4091,22 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_self, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_self, __pyx_t_2) < 0) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":74 + /* "dependency_injector/containers.pyx":80 * self.wired_to_packages = [] * self.__self__ = providers.Self(self) * super(DynamicContainer, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DynamicContainer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DynamicContainer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -4039,10 +4114,10 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -4057,12 +4132,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_2 = (__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_2)) __PYX_ERR(0, 74, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":61 + /* "dependency_injector/containers.pyx":67 * __IS_CONTAINER__ = True * * def __init__(self): # <<<<<<<<<<<<<< @@ -4085,7 +4160,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":76 +/* "dependency_injector/containers.pyx":82 * super(DynamicContainer, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -4129,11 +4204,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 2, 2, 1); __PYX_ERR(0, 76, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 2, 2, 1); __PYX_ERR(0, 82, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deepcopy__") < 0)) __PYX_ERR(0, 76, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deepcopy__") < 0)) __PYX_ERR(0, 82, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4146,7 +4221,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 76, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 82, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4182,16 +4257,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/containers.pyx":78 + /* "dependency_injector/containers.pyx":84 * def __deepcopy__(self, memo): * """Create and return full copy of container.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4206,13 +4281,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":79 + /* "dependency_injector/containers.pyx":85 * """Create and return full copy of container.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -4223,7 +4298,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/containers.pyx":80 + /* "dependency_injector/containers.pyx":86 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -4235,7 +4310,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/containers.pyx":79 + /* "dependency_injector/containers.pyx":85 * """Create and return full copy of container.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -4244,14 +4319,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":82 + /* "dependency_injector/containers.pyx":88 * return copied * * copied = self.__class__() # <<<<<<<<<<<<<< * memo[id(self)] = copied * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4265,52 +4340,52 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":83 + /* "dependency_injector/containers.pyx":89 * * copied = self.__class__() * memo[id(self)] = copied # <<<<<<<<<<<<<< * * copied.provider_type = providers.Provider */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_copied) < 0)) __PYX_ERR(0, 83, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_copied) < 0)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":85 + /* "dependency_injector/containers.pyx":91 * memo[id(self)] = copied * * copied.provider_type = providers.Provider # <<<<<<<<<<<<<< * copied.overridden = providers.deepcopy(self.overridden, memo) * copied.declarative_parent = self.declarative_parent */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_copied, __pyx_n_s_provider_type, __pyx_t_2) < 0) __PYX_ERR(0, 85, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_copied, __pyx_n_s_provider_type, __pyx_t_2) < 0) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":86 + /* "dependency_injector/containers.pyx":92 * * copied.provider_type = providers.Provider * copied.overridden = providers.deepcopy(self.overridden, memo) # <<<<<<<<<<<<<< * copied.declarative_parent = self.declarative_parent * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_7 = 0; @@ -4327,7 +4402,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_memo}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -4336,14 +4411,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_memo}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -4354,39 +4429,39 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GIVEREF(__pyx_v_memo); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_memo); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_copied, __pyx_n_s_overridden, __pyx_t_2) < 0) __PYX_ERR(0, 86, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_copied, __pyx_n_s_overridden, __pyx_t_2) < 0) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":87 + /* "dependency_injector/containers.pyx":93 * copied.provider_type = providers.Provider * copied.overridden = providers.deepcopy(self.overridden, memo) * copied.declarative_parent = self.declarative_parent # <<<<<<<<<<<<<< * * copied.__self__ = providers.deepcopy(self.__self__, memo) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_declarative_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_declarative_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_copied, __pyx_n_s_declarative_parent, __pyx_t_2) < 0) __PYX_ERR(0, 87, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_copied, __pyx_n_s_declarative_parent, __pyx_t_2) < 0) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":89 + /* "dependency_injector/containers.pyx":95 * copied.declarative_parent = self.declarative_parent * * copied.__self__ = providers.deepcopy(self.__self__, memo) # <<<<<<<<<<<<<< * for name in copied.__self__.alt_names: * copied.set_provider(name, copied.__self__) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; __pyx_t_7 = 0; @@ -4403,7 +4478,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_3, __pyx_v_memo}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -4412,14 +4487,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_3, __pyx_v_memo}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -4430,33 +4505,33 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GIVEREF(__pyx_v_memo); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_memo); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_copied, __pyx_n_s_self, __pyx_t_2) < 0) __PYX_ERR(0, 89, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_copied, __pyx_n_s_self, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":90 + /* "dependency_injector/containers.pyx":96 * * copied.__self__ = providers.deepcopy(self.__self__, memo) * for name in copied.__self__.alt_names: # <<<<<<<<<<<<<< * copied.set_provider(name, copied.__self__) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_alt_names); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_alt_names); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { __pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 96, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -4464,17 +4539,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 96, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 96, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -4484,7 +4559,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 90, __pyx_L1_error) + else __PYX_ERR(0, 96, __pyx_L1_error) } break; } @@ -4493,16 +4568,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/containers.pyx":91 + /* "dependency_injector/containers.pyx":97 * copied.__self__ = providers.deepcopy(self.__self__, memo) * for name in copied.__self__.alt_names: * copied.set_provider(name, copied.__self__) # <<<<<<<<<<<<<< * * for name, provider in providers.deepcopy(self.providers, memo).items(): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provider); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provider); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; __pyx_t_7 = 0; @@ -4519,7 +4594,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_name, __pyx_t_3}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -4528,14 +4603,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_name, __pyx_t_3}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_11 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -4546,14 +4621,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_7, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/containers.pyx":90 + /* "dependency_injector/containers.pyx":96 * * copied.__self__ = providers.deepcopy(self.__self__, memo) * for name in copied.__self__.alt_names: # <<<<<<<<<<<<<< @@ -4563,19 +4638,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":93 + /* "dependency_injector/containers.pyx":99 * copied.set_provider(name, copied.__self__) * * for name, provider in providers.deepcopy(self.providers, memo).items(): # <<<<<<<<<<<<<< * copied.set_provider(name, provider) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_providers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_providers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_7 = 0; @@ -4592,7 +4667,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_memo}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -4601,14 +4676,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_memo}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -4619,12 +4694,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GIVEREF(__pyx_v_memo); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_v_memo); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_items); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_items); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -4639,16 +4714,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_11); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_11 = __pyx_t_2; __Pyx_INCREF(__pyx_t_11); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 99, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -4656,17 +4731,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_11))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_11)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 99, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_11, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_11, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_11)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 99, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_11, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_11, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -4676,7 +4751,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 93, __pyx_L1_error) + else __PYX_ERR(0, 99, __pyx_L1_error) } break; } @@ -4688,7 +4763,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 93, __pyx_L1_error) + __PYX_ERR(0, 99, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -4701,15 +4776,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_1); #else - __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -4717,7 +4792,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_1 = __pyx_t_12(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_4), 2) < 0) __PYX_ERR(0, 93, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_4), 2) < 0) __PYX_ERR(0, 99, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L9_unpacking_done; @@ -4725,7 +4800,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 93, __pyx_L1_error) + __PYX_ERR(0, 99, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_8); @@ -4733,14 +4808,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":94 + /* "dependency_injector/containers.pyx":100 * * for name, provider in providers.deepcopy(self.providers, memo).items(): * copied.set_provider(name, provider) # <<<<<<<<<<<<<< * * copied.parent = providers.deepcopy(self.parent, memo) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -4757,7 +4832,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_name, __pyx_v_provider}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -4765,13 +4840,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_name, __pyx_v_provider}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -4782,14 +4857,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_INCREF(__pyx_v_provider); __Pyx_GIVEREF(__pyx_v_provider); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_provider); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":93 + /* "dependency_injector/containers.pyx":99 * copied.set_provider(name, copied.__self__) * * for name, provider in providers.deepcopy(self.providers, memo).items(): # <<<<<<<<<<<<<< @@ -4799,19 +4874,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "dependency_injector/containers.pyx":96 + /* "dependency_injector/containers.pyx":102 * copied.set_provider(name, provider) * * copied.parent = providers.deepcopy(self.parent, memo) # <<<<<<<<<<<<<< * * return copied */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_7 = 0; @@ -4828,7 +4903,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_memo}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -4837,14 +4912,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_memo}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -4855,15 +4930,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GIVEREF(__pyx_v_memo); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_memo); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_copied, __pyx_n_s_parent, __pyx_t_11) < 0) __PYX_ERR(0, 96, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_copied, __pyx_n_s_parent, __pyx_t_11) < 0) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "dependency_injector/containers.pyx":98 + /* "dependency_injector/containers.pyx":104 * copied.parent = providers.deepcopy(self.parent, memo) * * return copied # <<<<<<<<<<<<<< @@ -4875,7 +4950,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/containers.pyx":76 + /* "dependency_injector/containers.pyx":82 * super(DynamicContainer, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -4902,7 +4977,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":100 +/* "dependency_injector/containers.pyx":106 * return copied * * def __setattr__(self, str name, object value): # <<<<<<<<<<<<<< @@ -4949,17 +5024,17 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); __PYX_ERR(0, 100, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); __PYX_ERR(0, 106, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); __PYX_ERR(0, 100, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); __PYX_ERR(0, 106, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) __PYX_ERR(0, 100, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) __PYX_ERR(0, 106, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -4974,13 +5049,13 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 100, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 106, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 100, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 106, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_4__setattr__(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_value); /* function exit code */ @@ -5008,19 +5083,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setattr__", 0); - /* "dependency_injector/containers.pyx":114 + /* "dependency_injector/containers.pyx":120 * :rtype: None * """ * if isinstance(value, providers.Provider) \ # <<<<<<<<<<<<<< * and not isinstance(value, providers.Self) \ * and name != 'parent': */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -5029,19 +5104,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ goto __pyx_L4_bool_binop_done; } - /* "dependency_injector/containers.pyx":115 + /* "dependency_injector/containers.pyx":121 * """ * if isinstance(value, providers.Provider) \ * and not isinstance(value, providers.Self) \ # <<<<<<<<<<<<<< * and name != 'parent': * _check_provider_type(self, value) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_5 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_4) { @@ -5050,19 +5125,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ goto __pyx_L4_bool_binop_done; } - /* "dependency_injector/containers.pyx":116 + /* "dependency_injector/containers.pyx":122 * if isinstance(value, providers.Provider) \ * and not isinstance(value, providers.Self) \ * and name != 'parent': # <<<<<<<<<<<<<< * _check_provider_type(self, value) * */ - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_parent, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_parent, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 122, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_1 = __pyx_t_5; __pyx_L4_bool_binop_done:; - /* "dependency_injector/containers.pyx":114 + /* "dependency_injector/containers.pyx":120 * :rtype: None * """ * if isinstance(value, providers.Provider) \ # <<<<<<<<<<<<<< @@ -5071,54 +5146,54 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ if (__pyx_t_1) { - /* "dependency_injector/containers.pyx":117 + /* "dependency_injector/containers.pyx":123 * and not isinstance(value, providers.Self) \ * and name != 'parent': * _check_provider_type(self, value) # <<<<<<<<<<<<<< * * self.providers[name] = value */ - __pyx_t_2 = __pyx_f_19dependency_injector_10containers__check_provider_type(__pyx_v_self, __pyx_v_value, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_10containers__check_provider_type(__pyx_v_self, __pyx_v_value, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":119 + /* "dependency_injector/containers.pyx":125 * _check_provider_type(self, value) * * self.providers[name] = value # <<<<<<<<<<<<<< * * if isinstance(value, providers.CHILD_PROVIDERS): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 119, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":121 + /* "dependency_injector/containers.pyx":127 * self.providers[name] = value * * if isinstance(value, providers.CHILD_PROVIDERS): # <<<<<<<<<<<<<< * value.assign_parent(self) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CHILD_PROVIDERS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CHILD_PROVIDERS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { - /* "dependency_injector/containers.pyx":122 + /* "dependency_injector/containers.pyx":128 * * if isinstance(value, providers.CHILD_PROVIDERS): * value.assign_parent(self) # <<<<<<<<<<<<<< * * super(DynamicContainer, self).__setattr__(name, value) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5132,12 +5207,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":121 + /* "dependency_injector/containers.pyx":127 * self.providers[name] = value * * if isinstance(value, providers.CHILD_PROVIDERS): # <<<<<<<<<<<<<< @@ -5146,7 +5221,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":114 + /* "dependency_injector/containers.pyx":120 * :rtype: None * """ * if isinstance(value, providers.Provider) \ # <<<<<<<<<<<<<< @@ -5155,16 +5230,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":124 + /* "dependency_injector/containers.pyx":130 * value.assign_parent(self) * * super(DynamicContainer, self).__setattr__(name, value) # <<<<<<<<<<<<<< * * def __delattr__(self, str name): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DynamicContainer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DynamicContainer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); @@ -5172,10 +5247,10 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_setattr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_setattr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -5193,7 +5268,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_name, __pyx_v_value}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -5201,13 +5276,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_name, __pyx_v_value}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -5218,14 +5293,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":100 + /* "dependency_injector/containers.pyx":106 * return copied * * def __setattr__(self, str name, object value): # <<<<<<<<<<<<<< @@ -5249,7 +5324,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":126 +/* "dependency_injector/containers.pyx":132 * super(DynamicContainer, self).__setattr__(name, value) * * def __delattr__(self, str name): # <<<<<<<<<<<<<< @@ -5293,11 +5368,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__delattr__", 1, 2, 2, 1); __PYX_ERR(0, 126, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__delattr__", 1, 2, 2, 1); __PYX_ERR(0, 132, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__delattr__") < 0)) __PYX_ERR(0, 126, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__delattr__") < 0)) __PYX_ERR(0, 132, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5310,13 +5385,13 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__delattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 126, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__delattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 132, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 126, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 132, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_6__delattr__(__pyx_self, __pyx_v_self, __pyx_v_name); /* function exit code */ @@ -5341,33 +5416,33 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__delattr__", 0); - /* "dependency_injector/containers.pyx":137 + /* "dependency_injector/containers.pyx":143 * :rtype: None * """ * if name in self.providers: # <<<<<<<<<<<<<< * del self.providers[name] * super(DynamicContainer, self).__delattr__(name) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "dependency_injector/containers.pyx":138 + /* "dependency_injector/containers.pyx":144 * """ * if name in self.providers: * del self.providers[name] # <<<<<<<<<<<<<< * super(DynamicContainer, self).__delattr__(name) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_DelItem(__pyx_t_1, __pyx_v_name) < 0)) __PYX_ERR(0, 138, __pyx_L1_error) + if (unlikely(PyObject_DelItem(__pyx_t_1, __pyx_v_name) < 0)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":137 + /* "dependency_injector/containers.pyx":143 * :rtype: None * """ * if name in self.providers: # <<<<<<<<<<<<<< @@ -5376,16 +5451,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":139 + /* "dependency_injector/containers.pyx":145 * if name in self.providers: * del self.providers[name] * super(DynamicContainer, self).__delattr__(name) # <<<<<<<<<<<<<< * * @property */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DynamicContainer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DynamicContainer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); @@ -5393,10 +5468,10 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_delattr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_delattr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -5411,12 +5486,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_name); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":126 + /* "dependency_injector/containers.pyx":132 * super(DynamicContainer, self).__setattr__(name, value) * * def __delattr__(self, str name): # <<<<<<<<<<<<<< @@ -5439,7 +5514,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":142 +/* "dependency_injector/containers.pyx":148 * * @property * def dependencies(self): # <<<<<<<<<<<<<< @@ -5484,7 +5559,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dependencies", 0); - /* "dependency_injector/containers.pyx":151 + /* "dependency_injector/containers.pyx":157 * dict[str, :py:class:`dependency_injector.providers.Provider`] * """ * return { # <<<<<<<<<<<<<< @@ -5493,19 +5568,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L5_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/containers.pyx":153 + /* "dependency_injector/containers.pyx":159 * return { * name: provider * for name, provider in self.providers.items() # <<<<<<<<<<<<<< * if isinstance(provider, (providers.Dependency, providers.DependenciesContainer)) * } */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -5520,16 +5595,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L5_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -5537,17 +5612,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 159, __pyx_L5_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 159, __pyx_L5_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -5557,7 +5632,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 153, __pyx_L5_error) + else __PYX_ERR(0, 159, __pyx_L5_error) } break; } @@ -5569,7 +5644,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 153, __pyx_L5_error) + __PYX_ERR(0, 159, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -5582,15 +5657,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 153, __pyx_L5_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 159, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -5598,7 +5673,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 153, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 159, __pyx_L5_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_unpacking_done; @@ -5606,7 +5681,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 153, __pyx_L5_error) + __PYX_ERR(0, 159, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_name, __pyx_t_3); @@ -5614,21 +5689,21 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_provider, __pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/containers.pyx":154 + /* "dependency_injector/containers.pyx":160 * name: provider * for name, provider in self.providers.items() * if isinstance(provider, (providers.Dependency, providers.DependenciesContainer)) # <<<<<<<<<<<<<< * } * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L5_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Dependency); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 154, __pyx_L5_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Dependency); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L5_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DependenciesContainer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DependenciesContainer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = PyObject_IsInstance(__pyx_7genexpr__pyx_v_provider, __pyx_t_7); @@ -5647,16 +5722,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { - /* "dependency_injector/containers.pyx":152 + /* "dependency_injector/containers.pyx":158 * """ * return { * name: provider # <<<<<<<<<<<<<< * for name, provider in self.providers.items() * if isinstance(provider, (providers.Dependency, providers.DependenciesContainer)) */ - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_name, (PyObject*)__pyx_7genexpr__pyx_v_provider))) __PYX_ERR(0, 152, __pyx_L5_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_name, (PyObject*)__pyx_7genexpr__pyx_v_provider))) __PYX_ERR(0, 158, __pyx_L5_error) - /* "dependency_injector/containers.pyx":154 + /* "dependency_injector/containers.pyx":160 * name: provider * for name, provider in self.providers.items() * if isinstance(provider, (providers.Dependency, providers.DependenciesContainer)) # <<<<<<<<<<<<<< @@ -5665,7 +5740,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":153 + /* "dependency_injector/containers.pyx":159 * return { * name: provider * for name, provider in self.providers.items() # <<<<<<<<<<<<<< @@ -5687,7 +5762,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":142 + /* "dependency_injector/containers.pyx":148 * * @property * def dependencies(self): # <<<<<<<<<<<<<< @@ -5714,7 +5789,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } static PyObject *__pyx_gb_19dependency_injector_10containers_16DynamicContainer_12generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/containers.pyx":157 +/* "dependency_injector/containers.pyx":163 * } * * def traverse(self, types=None): # <<<<<<<<<<<<<< @@ -5763,7 +5838,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "traverse") < 0)) __PYX_ERR(0, 157, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "traverse") < 0)) __PYX_ERR(0, 163, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5779,7 +5854,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("traverse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 157, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("traverse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 163, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.traverse", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5804,7 +5879,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct__traverse *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 157, __pyx_L1_error) + __PYX_ERR(0, 163, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -5815,7 +5890,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_types); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_types); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_10containers_16DynamicContainer_12generator, __pyx_codeobj__2, (PyObject *) __pyx_cur_scope, __pyx_n_s_traverse, __pyx_n_s_DynamicContainer_traverse, __pyx_n_s_dependency_injector_containers); if (unlikely(!gen)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_10containers_16DynamicContainer_12generator, __pyx_codeobj__2, (PyObject *) __pyx_cur_scope, __pyx_n_s_traverse, __pyx_n_s_DynamicContainer_traverse, __pyx_n_s_dependency_injector_containers); if (unlikely(!gen)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5852,23 +5927,23 @@ static PyObject *__pyx_gb_19dependency_injector_10containers_16DynamicContainer_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 157, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 163, __pyx_L1_error) - /* "dependency_injector/containers.pyx":159 + /* "dependency_injector/containers.pyx":165 * def traverse(self, types=None): * """Return providers traversal generator.""" * yield from providers.traverse(*self.providers.values(), types=types) # <<<<<<<<<<<<<< * * def set_providers(self, **providers): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_traverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_traverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -5883,16 +5958,16 @@ static PyObject *__pyx_gb_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_types, __pyx_cur_scope->__pyx_v_types) < 0) __PYX_ERR(0, 159, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_types, __pyx_cur_scope->__pyx_v_types) < 0) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -5908,17 +5983,17 @@ static PyObject *__pyx_gb_19dependency_injector_10containers_16DynamicContainer_ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 159, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 165, __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, 159, __pyx_L1_error) + else __PYX_ERR(0, 165, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/containers.pyx":157 + /* "dependency_injector/containers.pyx":163 * } * * def traverse(self, types=None): # <<<<<<<<<<<<<< @@ -5946,7 +6021,7 @@ static PyObject *__pyx_gb_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":161 +/* "dependency_injector/containers.pyx":167 * yield from providers.traverse(*self.providers.values(), types=types) * * def set_providers(self, **providers): # <<<<<<<<<<<<<< @@ -5988,7 +6063,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_providers, values, pos_args, "set_providers") < 0)) __PYX_ERR(0, 161, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_providers, values, pos_args, "set_providers") < 0)) __PYX_ERR(0, 167, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -5999,7 +6074,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_providers", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 161, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_providers", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 167, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_providers); __pyx_v_providers = 0; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.set_providers", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -6033,16 +6108,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_providers", 0); - /* "dependency_injector/containers.pyx":170 + /* "dependency_injector/containers.pyx":176 * :rtype: None * """ * for name, provider in six.iteritems(providers): # <<<<<<<<<<<<<< * setattr(self, name, provider) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -6057,16 +6132,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_providers) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_providers); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __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, 170, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 176, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -6074,17 +6149,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 176, __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, 170, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 176, __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, 170, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -6094,7 +6169,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 170, __pyx_L1_error) + else __PYX_ERR(0, 176, __pyx_L1_error) } break; } @@ -6106,7 +6181,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 170, __pyx_L1_error) + __PYX_ERR(0, 176, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6119,15 +6194,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 176, __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, 170, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 176, __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; @@ -6135,7 +6210,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 170, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 176, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -6143,7 +6218,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 170, __pyx_L1_error) + __PYX_ERR(0, 176, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); @@ -6151,16 +6226,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":171 + /* "dependency_injector/containers.pyx":177 * """ * for name, provider in six.iteritems(providers): * setattr(self, name, provider) # <<<<<<<<<<<<<< * * def set_provider(self, name, provider): */ - __pyx_t_9 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_provider); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_9 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_provider); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 177, __pyx_L1_error) - /* "dependency_injector/containers.pyx":170 + /* "dependency_injector/containers.pyx":176 * :rtype: None * """ * for name, provider in six.iteritems(providers): # <<<<<<<<<<<<<< @@ -6170,7 +6245,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":161 + /* "dependency_injector/containers.pyx":167 * yield from providers.traverse(*self.providers.values(), types=types) * * def set_providers(self, **providers): # <<<<<<<<<<<<<< @@ -6197,7 +6272,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":173 +/* "dependency_injector/containers.pyx":179 * setattr(self, name, provider) * * def set_provider(self, name, provider): # <<<<<<<<<<<<<< @@ -6244,17 +6319,17 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set_provider", 1, 3, 3, 1); __PYX_ERR(0, 173, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_provider", 1, 3, 3, 1); __PYX_ERR(0, 179, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set_provider", 1, 3, 3, 2); __PYX_ERR(0, 173, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_provider", 1, 3, 3, 2); __PYX_ERR(0, 179, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_provider") < 0)) __PYX_ERR(0, 173, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_provider") < 0)) __PYX_ERR(0, 179, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -6269,7 +6344,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_provider", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 173, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_provider", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 179, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.set_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6291,16 +6366,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_provider", 0); - /* "dependency_injector/containers.pyx":184 + /* "dependency_injector/containers.pyx":190 * :rtype: None * """ * setattr(self, name, provider) # <<<<<<<<<<<<<< * * def override(self, object overriding): */ - __pyx_t_1 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_provider); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_1 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_provider); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 190, __pyx_L1_error) - /* "dependency_injector/containers.pyx":173 + /* "dependency_injector/containers.pyx":179 * setattr(self, name, provider) * * def set_provider(self, name, provider): # <<<<<<<<<<<<<< @@ -6320,7 +6395,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":186 +/* "dependency_injector/containers.pyx":192 * setattr(self, name, provider) * * def override(self, object overriding): # <<<<<<<<<<<<<< @@ -6364,11 +6439,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_overriding)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("override", 1, 2, 2, 1); __PYX_ERR(0, 186, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("override", 1, 2, 2, 1); __PYX_ERR(0, 192, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "override") < 0)) __PYX_ERR(0, 186, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "override") < 0)) __PYX_ERR(0, 192, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6381,7 +6456,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("override", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 186, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("override", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 192, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.override", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6418,7 +6493,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/containers.pyx":197 + /* "dependency_injector/containers.pyx":203 * :rtype: None * """ * if overriding is self: # <<<<<<<<<<<<<< @@ -6429,27 +6504,27 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/containers.pyx":198 + /* "dependency_injector/containers.pyx":204 * """ * if overriding is self: * raise errors.Error('Container {0} could not be overridden ' # <<<<<<<<<<<<<< * 'with itself'.format(self)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":199 + /* "dependency_injector/containers.pyx":205 * if overriding is self: * raise errors.Error('Container {0} could not be overridden ' * 'with itself'.format(self)) # <<<<<<<<<<<<<< * * self.overridden += (overriding,) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Container_0_could_not_be_overrid, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Container_0_could_not_be_overrid, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -6463,7 +6538,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -6479,14 +6554,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 198, __pyx_L1_error) + __PYX_ERR(0, 204, __pyx_L1_error) - /* "dependency_injector/containers.pyx":197 + /* "dependency_injector/containers.pyx":203 * :rtype: None * """ * if overriding is self: # <<<<<<<<<<<<<< @@ -6495,40 +6570,40 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":201 + /* "dependency_injector/containers.pyx":207 * 'with itself'.format(self)) * * self.overridden += (overriding,) # <<<<<<<<<<<<<< * * for name, provider in six.iteritems(overriding.providers): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_overridden); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_overridden); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_overriding); __Pyx_GIVEREF(__pyx_v_overriding); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_overriding); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_overridden, __pyx_t_4) < 0) __PYX_ERR(0, 201, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_overridden, __pyx_t_4) < 0) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":203 + /* "dependency_injector/containers.pyx":209 * self.overridden += (overriding,) * * for name, provider in six.iteritems(overriding.providers): # <<<<<<<<<<<<<< * try: * getattr(self, name).override(provider) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_six); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_six); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_overriding, __pyx_n_s_providers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_overriding, __pyx_n_s_providers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -6543,16 +6618,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __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_4)) __PYX_ERR(0, 203, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 209, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -6560,17 +6635,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 209, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 209, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -6580,7 +6655,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 203, __pyx_L1_error) + else __PYX_ERR(0, 209, __pyx_L1_error) } break; } @@ -6592,7 +6667,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 203, __pyx_L1_error) + __PYX_ERR(0, 209, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6605,15 +6680,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __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, 203, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -6621,7 +6696,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_10(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_7), 2) < 0) __PYX_ERR(0, 203, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_7), 2) < 0) __PYX_ERR(0, 209, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; @@ -6629,7 +6704,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 203, __pyx_L1_error) + __PYX_ERR(0, 209, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -6637,7 +6712,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":204 + /* "dependency_injector/containers.pyx":210 * * for name, provider in six.iteritems(overriding.providers): * try: # <<<<<<<<<<<<<< @@ -6653,16 +6728,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "dependency_injector/containers.pyx":205 + /* "dependency_injector/containers.pyx":211 * for name, provider in six.iteritems(overriding.providers): * try: * getattr(self, name).override(provider) # <<<<<<<<<<<<<< * except AttributeError: * pass */ - __pyx_t_6 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 205, __pyx_L8_error) + __pyx_t_6 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 211, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L8_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -6677,12 +6752,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_provider); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L8_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":204 + /* "dependency_injector/containers.pyx":210 * * for name, provider in six.iteritems(overriding.providers): * try: # <<<<<<<<<<<<<< @@ -6700,7 +6775,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/containers.pyx":206 + /* "dependency_injector/containers.pyx":212 * try: * getattr(self, name).override(provider) * except AttributeError: # <<<<<<<<<<<<<< @@ -6715,7 +6790,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ goto __pyx_L10_except_error; __pyx_L10_except_error:; - /* "dependency_injector/containers.pyx":204 + /* "dependency_injector/containers.pyx":210 * * for name, provider in six.iteritems(overriding.providers): * try: # <<<<<<<<<<<<<< @@ -6735,7 +6810,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_L15_try_end:; } - /* "dependency_injector/containers.pyx":203 + /* "dependency_injector/containers.pyx":209 * self.overridden += (overriding,) * * for name, provider in six.iteritems(overriding.providers): # <<<<<<<<<<<<<< @@ -6745,7 +6820,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":186 + /* "dependency_injector/containers.pyx":192 * setattr(self, name, provider) * * def override(self, object overriding): # <<<<<<<<<<<<<< @@ -6772,7 +6847,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":209 +/* "dependency_injector/containers.pyx":215 * pass * * def override_providers(self, **overriding_providers): # <<<<<<<<<<<<<< @@ -6814,7 +6889,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_overriding_providers, values, pos_args, "override_providers") < 0)) __PYX_ERR(0, 209, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_overriding_providers, values, pos_args, "override_providers") < 0)) __PYX_ERR(0, 215, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -6825,7 +6900,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("override_providers", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 209, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("override_providers", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 215, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_overriding_providers); __pyx_v_overriding_providers = 0; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.override_providers", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -6859,16 +6934,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override_providers", 0); - /* "dependency_injector/containers.pyx":218 + /* "dependency_injector/containers.pyx":224 * :rtype: None * """ * for name, overriding_provider in six.iteritems(overriding_providers): # <<<<<<<<<<<<<< * container_provider = getattr(self, name) * container_provider.override(overriding_provider) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -6883,16 +6958,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_overriding_providers) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_overriding_providers); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __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, 218, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -6900,17 +6975,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 224, __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, 218, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 224, __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, 218, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -6920,7 +6995,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 218, __pyx_L1_error) + else __PYX_ERR(0, 224, __pyx_L1_error) } break; } @@ -6932,7 +7007,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 218, __pyx_L1_error) + __PYX_ERR(0, 224, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6945,15 +7020,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __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, 218, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __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; @@ -6961,7 +7036,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 218, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 224, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -6969,7 +7044,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 218, __pyx_L1_error) + __PYX_ERR(0, 224, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); @@ -6977,26 +7052,26 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_overriding_provider, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":219 + /* "dependency_injector/containers.pyx":225 * """ * for name, overriding_provider in six.iteritems(overriding_providers): * container_provider = getattr(self, name) # <<<<<<<<<<<<<< * container_provider.override(overriding_provider) * */ - __pyx_t_1 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_container_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":220 + /* "dependency_injector/containers.pyx":226 * for name, overriding_provider in six.iteritems(overriding_providers): * container_provider = getattr(self, name) * container_provider.override(overriding_provider) # <<<<<<<<<<<<<< * * def reset_last_overriding(self): */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_container_provider, __pyx_n_s_override); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_container_provider, __pyx_n_s_override); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -7010,12 +7085,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_v_overriding_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_overriding_provider); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":218 + /* "dependency_injector/containers.pyx":224 * :rtype: None * """ * for name, overriding_provider in six.iteritems(overriding_providers): # <<<<<<<<<<<<<< @@ -7025,7 +7100,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":209 + /* "dependency_injector/containers.pyx":215 * pass * * def override_providers(self, **overriding_providers): # <<<<<<<<<<<<<< @@ -7053,7 +7128,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":222 +/* "dependency_injector/containers.pyx":228 * container_provider.override(overriding_provider) * * def reset_last_overriding(self): # <<<<<<<<<<<<<< @@ -7094,33 +7169,33 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_last_overriding", 0); - /* "dependency_injector/containers.pyx":227 + /* "dependency_injector/containers.pyx":233 * :rtype: None * """ * if not self.overridden: # <<<<<<<<<<<<<< * raise errors.Error('Container {0} is not overridden'.format(self)) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 227, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (unlikely(__pyx_t_3)) { - /* "dependency_injector/containers.pyx":228 + /* "dependency_injector/containers.pyx":234 * """ * if not self.overridden: * raise errors.Error('Container {0} is not overridden'.format(self)) # <<<<<<<<<<<<<< * * self.overridden = self.overridden[:-1] */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Container_0_is_not_overridden, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Container_0_is_not_overridden, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -7134,7 +7209,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -7150,14 +7225,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 228, __pyx_L1_error) + __PYX_ERR(0, 234, __pyx_L1_error) - /* "dependency_injector/containers.pyx":227 + /* "dependency_injector/containers.pyx":233 * :rtype: None * """ * if not self.overridden: # <<<<<<<<<<<<<< @@ -7166,34 +7241,34 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":230 + /* "dependency_injector/containers.pyx":236 * raise errors.Error('Container {0} is not overridden'.format(self)) * * self.overridden = self.overridden[:-1] # <<<<<<<<<<<<<< * * for provider in six.itervalues(self.providers): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1L, NULL, NULL, &__pyx_slice__3, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1L, NULL, NULL, &__pyx_slice__3, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_overridden, __pyx_t_5) < 0) __PYX_ERR(0, 230, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_overridden, __pyx_t_5) < 0) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/containers.pyx":232 + /* "dependency_injector/containers.pyx":238 * self.overridden = self.overridden[:-1] * * for provider in six.itervalues(self.providers): # <<<<<<<<<<<<<< * provider.reset_last_overriding() * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -7208,16 +7283,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 238, __pyx_L1_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_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -7225,17 +7300,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 238, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 238, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -7245,7 +7320,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 232, __pyx_L1_error) + else __PYX_ERR(0, 238, __pyx_L1_error) } break; } @@ -7254,14 +7329,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/containers.pyx":233 + /* "dependency_injector/containers.pyx":239 * * for provider in six.itervalues(self.providers): * provider.reset_last_overriding() # <<<<<<<<<<<<<< * * def reset_override(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -7275,12 +7350,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/containers.pyx":232 + /* "dependency_injector/containers.pyx":238 * self.overridden = self.overridden[:-1] * * for provider in six.itervalues(self.providers): # <<<<<<<<<<<<<< @@ -7290,7 +7365,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":222 + /* "dependency_injector/containers.pyx":228 * container_provider.override(overriding_provider) * * def reset_last_overriding(self): # <<<<<<<<<<<<<< @@ -7316,7 +7391,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":235 +/* "dependency_injector/containers.pyx":241 * provider.reset_last_overriding() * * def reset_override(self): # <<<<<<<<<<<<<< @@ -7354,31 +7429,31 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_override", 0); - /* "dependency_injector/containers.pyx":240 + /* "dependency_injector/containers.pyx":246 * :rtype: None * """ * self.overridden = tuple() # <<<<<<<<<<<<<< * * for provider in six.itervalues(self.providers): */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_overridden, __pyx_t_1) < 0) __PYX_ERR(0, 240, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_overridden, __pyx_t_1) < 0) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":242 + /* "dependency_injector/containers.pyx":248 * self.overridden = tuple() * * for provider in six.itervalues(self.providers): # <<<<<<<<<<<<<< * provider.reset_override() * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -7393,16 +7468,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __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_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 248, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -7410,17 +7485,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 248, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 248, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -7430,7 +7505,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 242, __pyx_L1_error) + else __PYX_ERR(0, 248, __pyx_L1_error) } break; } @@ -7439,14 +7514,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":243 + /* "dependency_injector/containers.pyx":249 * * for provider in six.itervalues(self.providers): * provider.reset_override() # <<<<<<<<<<<<<< * * def wire(self, modules=None, packages=None): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7460,12 +7535,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":242 + /* "dependency_injector/containers.pyx":248 * self.overridden = tuple() * * for provider in six.itervalues(self.providers): # <<<<<<<<<<<<<< @@ -7475,7 +7550,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":235 + /* "dependency_injector/containers.pyx":241 * provider.reset_last_overriding() * * def reset_override(self): # <<<<<<<<<<<<<< @@ -7500,7 +7575,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":245 +/* "dependency_injector/containers.pyx":251 * provider.reset_override() * * def wire(self, modules=None, packages=None): # <<<<<<<<<<<<<< @@ -7559,7 +7634,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wire") < 0)) __PYX_ERR(0, 245, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wire") < 0)) __PYX_ERR(0, 251, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -7578,7 +7653,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("wire", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 245, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("wire", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 251, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.wire", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7603,78 +7678,78 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("wire", 0); - /* "dependency_injector/containers.pyx":250 + /* "dependency_injector/containers.pyx":256 * :rtype: None * """ * wire( # <<<<<<<<<<<<<< * container=self, * modules=modules, */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_wire); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_wire); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/containers.pyx":251 + /* "dependency_injector/containers.pyx":257 * """ * wire( * container=self, # <<<<<<<<<<<<<< * modules=modules, * packages=packages, */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_container, __pyx_v_self) < 0) __PYX_ERR(0, 251, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_container, __pyx_v_self) < 0) __PYX_ERR(0, 257, __pyx_L1_error) - /* "dependency_injector/containers.pyx":252 + /* "dependency_injector/containers.pyx":258 * wire( * container=self, * modules=modules, # <<<<<<<<<<<<<< * packages=packages, * ) */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_modules, __pyx_v_modules) < 0) __PYX_ERR(0, 251, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_modules, __pyx_v_modules) < 0) __PYX_ERR(0, 257, __pyx_L1_error) - /* "dependency_injector/containers.pyx":253 + /* "dependency_injector/containers.pyx":259 * container=self, * modules=modules, * packages=packages, # <<<<<<<<<<<<<< * ) * */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_packages, __pyx_v_packages) < 0) __PYX_ERR(0, 251, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_packages, __pyx_v_packages) < 0) __PYX_ERR(0, 257, __pyx_L1_error) - /* "dependency_injector/containers.pyx":250 + /* "dependency_injector/containers.pyx":256 * :rtype: None * """ * wire( # <<<<<<<<<<<<<< * container=self, * modules=modules, */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":256 + /* "dependency_injector/containers.pyx":262 * ) * * if modules: # <<<<<<<<<<<<<< * self.wired_to_modules.extend(modules) * */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_modules); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_modules); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 262, __pyx_L1_error) if (__pyx_t_4) { - /* "dependency_injector/containers.pyx":257 + /* "dependency_injector/containers.pyx":263 * * if modules: * self.wired_to_modules.extend(modules) # <<<<<<<<<<<<<< * * if packages: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_modules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_modules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_extend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_extend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -7689,12 +7764,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_modules) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_modules); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":256 + /* "dependency_injector/containers.pyx":262 * ) * * if modules: # <<<<<<<<<<<<<< @@ -7703,26 +7778,26 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":259 + /* "dependency_injector/containers.pyx":265 * self.wired_to_modules.extend(modules) * * if packages: # <<<<<<<<<<<<<< * self.wired_to_packages.extend(packages) * */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_packages); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_packages); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 265, __pyx_L1_error) if (__pyx_t_4) { - /* "dependency_injector/containers.pyx":260 + /* "dependency_injector/containers.pyx":266 * * if packages: * self.wired_to_packages.extend(packages) # <<<<<<<<<<<<<< * * def unwire(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_packages); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_packages); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_extend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_extend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -7737,12 +7812,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_packages) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_packages); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":259 + /* "dependency_injector/containers.pyx":265 * self.wired_to_modules.extend(modules) * * if packages: # <<<<<<<<<<<<<< @@ -7751,7 +7826,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":245 + /* "dependency_injector/containers.pyx":251 * provider.reset_override() * * def wire(self, modules=None, packages=None): # <<<<<<<<<<<<<< @@ -7774,7 +7849,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":262 +/* "dependency_injector/containers.pyx":268 * self.wired_to_packages.extend(packages) * * def unwire(self): # <<<<<<<<<<<<<< @@ -7808,65 +7883,65 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unwire", 0); - /* "dependency_injector/containers.pyx":264 + /* "dependency_injector/containers.pyx":270 * def unwire(self): * """Unwire container providers from previously wired packages and modules.""" * unwire( # <<<<<<<<<<<<<< * modules=self.wired_to_modules, * packages=self.wired_to_packages, */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_unwire); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_unwire); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/containers.pyx":265 + /* "dependency_injector/containers.pyx":271 * """Unwire container providers from previously wired packages and modules.""" * unwire( * modules=self.wired_to_modules, # <<<<<<<<<<<<<< * packages=self.wired_to_packages, * ) */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_modules); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_modules); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_modules, __pyx_t_3) < 0) __PYX_ERR(0, 265, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_modules, __pyx_t_3) < 0) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":266 + /* "dependency_injector/containers.pyx":272 * unwire( * modules=self.wired_to_modules, * packages=self.wired_to_packages, # <<<<<<<<<<<<<< * ) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_packages); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_packages); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_packages, __pyx_t_3) < 0) __PYX_ERR(0, 265, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_packages, __pyx_t_3) < 0) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":264 + /* "dependency_injector/containers.pyx":270 * def unwire(self): * """Unwire container providers from previously wired packages and modules.""" * unwire( # <<<<<<<<<<<<<< * modules=self.wired_to_modules, * packages=self.wired_to_packages, */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":269 + /* "dependency_injector/containers.pyx":275 * ) * * self.wired_to_modules.clear() # <<<<<<<<<<<<<< * self.wired_to_packages.clear() * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_modules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_modules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -7881,21 +7956,21 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_3 = (__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_3)) __PYX_ERR(0, 269, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":270 + /* "dependency_injector/containers.pyx":276 * * self.wired_to_modules.clear() * self.wired_to_packages.clear() # <<<<<<<<<<<<<< * * def init_resources(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_packages); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wired_to_packages); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -7910,12 +7985,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":262 + /* "dependency_injector/containers.pyx":268 * self.wired_to_packages.extend(packages) * * def unwire(self): # <<<<<<<<<<<<<< @@ -7938,7 +8013,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":272 +/* "dependency_injector/containers.pyx":278 * self.wired_to_packages.clear() * * def init_resources(self): # <<<<<<<<<<<<<< @@ -7980,42 +8055,42 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init_resources", 0); - /* "dependency_injector/containers.pyx":274 + /* "dependency_injector/containers.pyx":280 * def init_resources(self): * """Initialize all container resources.""" * futures = [] # <<<<<<<<<<<<<< * * for provider in self.traverse(types=[providers.Resource]): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_futures = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":276 + /* "dependency_injector/containers.pyx":282 * futures = [] * * for provider in self.traverse(types=[providers.Resource]): # <<<<<<<<<<<<<< * resource = provider.init() * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Resource); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Resource); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(0, 276, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8023,9 +8098,9 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 282, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -8033,17 +8108,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 282, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 282, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -8053,7 +8128,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 276, __pyx_L1_error) + else __PYX_ERR(0, 282, __pyx_L1_error) } break; } @@ -8062,14 +8137,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":277 + /* "dependency_injector/containers.pyx":283 * * for provider in self.traverse(types=[providers.Resource]): * resource = provider.init() # <<<<<<<<<<<<<< * * if __is_future_or_coroutine(resource): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -8083,13 +8158,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_resource, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":279 + /* "dependency_injector/containers.pyx":285 * resource = provider.init() * * if __is_future_or_coroutine(resource): # <<<<<<<<<<<<<< @@ -8099,16 +8174,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_7 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_resource) != 0); if (__pyx_t_7) { - /* "dependency_injector/containers.pyx":280 + /* "dependency_injector/containers.pyx":286 * * if __is_future_or_coroutine(resource): * futures.append(resource) # <<<<<<<<<<<<<< * * if futures: */ - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_resource); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 280, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_resource); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 286, __pyx_L1_error) - /* "dependency_injector/containers.pyx":279 + /* "dependency_injector/containers.pyx":285 * resource = provider.init() * * if __is_future_or_coroutine(resource): # <<<<<<<<<<<<<< @@ -8117,7 +8192,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":276 + /* "dependency_injector/containers.pyx":282 * futures = [] * * for provider in self.traverse(types=[providers.Resource]): # <<<<<<<<<<<<<< @@ -8127,7 +8202,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":282 + /* "dependency_injector/containers.pyx":288 * futures.append(resource) * * if futures: # <<<<<<<<<<<<<< @@ -8137,7 +8212,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_7 = (PyList_GET_SIZE(__pyx_v_futures) != 0); if (__pyx_t_7) { - /* "dependency_injector/containers.pyx":283 + /* "dependency_injector/containers.pyx":289 * * if futures: * return asyncio.gather(*futures) # <<<<<<<<<<<<<< @@ -8145,14 +8220,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ * def shutdown_resources(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PySequence_Tuple(__pyx_v_futures); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_v_futures); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __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; @@ -8160,7 +8235,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":282 + /* "dependency_injector/containers.pyx":288 * futures.append(resource) * * if futures: # <<<<<<<<<<<<<< @@ -8169,7 +8244,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":272 + /* "dependency_injector/containers.pyx":278 * self.wired_to_packages.clear() * * def init_resources(self): # <<<<<<<<<<<<<< @@ -8196,7 +8271,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":285 +/* "dependency_injector/containers.pyx":291 * return asyncio.gather(*futures) * * def shutdown_resources(self): # <<<<<<<<<<<<<< @@ -8238,42 +8313,42 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("shutdown_resources", 0); - /* "dependency_injector/containers.pyx":287 + /* "dependency_injector/containers.pyx":293 * def shutdown_resources(self): * """Shutdown all container resources.""" * futures = [] # <<<<<<<<<<<<<< * * for provider in self.traverse(types=[providers.Resource]): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_futures = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":289 + /* "dependency_injector/containers.pyx":295 * futures = [] * * for provider in self.traverse(types=[providers.Resource]): # <<<<<<<<<<<<<< * shutdown = provider.shutdown() * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Resource); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Resource); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(0, 289, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8281,9 +8356,9 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 295, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -8291,17 +8366,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 295, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 295, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -8311,7 +8386,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 289, __pyx_L1_error) + else __PYX_ERR(0, 295, __pyx_L1_error) } break; } @@ -8320,14 +8395,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":290 + /* "dependency_injector/containers.pyx":296 * * for provider in self.traverse(types=[providers.Resource]): * shutdown = provider.shutdown() # <<<<<<<<<<<<<< * * if __is_future_or_coroutine(shutdown): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -8341,13 +8416,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_shutdown, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":292 + /* "dependency_injector/containers.pyx":298 * shutdown = provider.shutdown() * * if __is_future_or_coroutine(shutdown): # <<<<<<<<<<<<<< @@ -8357,16 +8432,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_7 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_shutdown) != 0); if (__pyx_t_7) { - /* "dependency_injector/containers.pyx":293 + /* "dependency_injector/containers.pyx":299 * * if __is_future_or_coroutine(shutdown): * futures.append(shutdown) # <<<<<<<<<<<<<< * * if futures: */ - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_shutdown); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_shutdown); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 299, __pyx_L1_error) - /* "dependency_injector/containers.pyx":292 + /* "dependency_injector/containers.pyx":298 * shutdown = provider.shutdown() * * if __is_future_or_coroutine(shutdown): # <<<<<<<<<<<<<< @@ -8375,7 +8450,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":289 + /* "dependency_injector/containers.pyx":295 * futures = [] * * for provider in self.traverse(types=[providers.Resource]): # <<<<<<<<<<<<<< @@ -8385,7 +8460,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":295 + /* "dependency_injector/containers.pyx":301 * futures.append(shutdown) * * if futures: # <<<<<<<<<<<<<< @@ -8395,7 +8470,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_7 = (PyList_GET_SIZE(__pyx_v_futures) != 0); if (__pyx_t_7) { - /* "dependency_injector/containers.pyx":296 + /* "dependency_injector/containers.pyx":302 * * if futures: * return asyncio.gather(*futures) # <<<<<<<<<<<<<< @@ -8403,14 +8478,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ * def apply_container_providers_overridings(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PySequence_Tuple(__pyx_v_futures); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_v_futures); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __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; @@ -8418,7 +8493,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":295 + /* "dependency_injector/containers.pyx":301 * futures.append(shutdown) * * if futures: # <<<<<<<<<<<<<< @@ -8427,7 +8502,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":285 + /* "dependency_injector/containers.pyx":291 * return asyncio.gather(*futures) * * def shutdown_resources(self): # <<<<<<<<<<<<<< @@ -8454,7 +8529,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":298 +/* "dependency_injector/containers.pyx":304 * return asyncio.gather(*futures) * * def apply_container_providers_overridings(self): # <<<<<<<<<<<<<< @@ -8492,30 +8567,30 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("apply_container_providers_overridings", 0); - /* "dependency_injector/containers.pyx":300 + /* "dependency_injector/containers.pyx":306 * def apply_container_providers_overridings(self): * """Apply container providers' overridings.""" * for provider in self.traverse(types=[providers.Container]): # <<<<<<<<<<<<<< * provider.apply_overridings() * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Container); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Container); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(0, 300, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8523,9 +8598,9 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -8533,17 +8608,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 306, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 306, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -8553,7 +8628,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 300, __pyx_L1_error) + else __PYX_ERR(0, 306, __pyx_L1_error) } break; } @@ -8562,14 +8637,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":301 + /* "dependency_injector/containers.pyx":307 * """Apply container providers' overridings.""" * for provider in self.traverse(types=[providers.Container]): * provider.apply_overridings() # <<<<<<<<<<<<<< * * def reset_singletons(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_apply_overridings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_apply_overridings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -8583,12 +8658,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":300 + /* "dependency_injector/containers.pyx":306 * def apply_container_providers_overridings(self): * """Apply container providers' overridings.""" * for provider in self.traverse(types=[providers.Container]): # <<<<<<<<<<<<<< @@ -8598,7 +8673,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":298 + /* "dependency_injector/containers.pyx":304 * return asyncio.gather(*futures) * * def apply_container_providers_overridings(self): # <<<<<<<<<<<<<< @@ -8623,7 +8698,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":303 +/* "dependency_injector/containers.pyx":309 * provider.apply_overridings() * * def reset_singletons(self): # <<<<<<<<<<<<<< @@ -8661,30 +8736,30 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_singletons", 0); - /* "dependency_injector/containers.pyx":305 + /* "dependency_injector/containers.pyx":311 * def reset_singletons(self): * """Reset container singletons.""" * for provider in self.traverse(types=[providers.BaseSingleton]): # <<<<<<<<<<<<<< * provider.reset() * return SingletonResetContext(self) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_BaseSingleton); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_BaseSingleton); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(0, 305, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8692,9 +8767,9 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -8702,17 +8777,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 311, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 311, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -8722,7 +8797,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 305, __pyx_L1_error) + else __PYX_ERR(0, 311, __pyx_L1_error) } break; } @@ -8731,14 +8806,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":306 + /* "dependency_injector/containers.pyx":312 * """Reset container singletons.""" * for provider in self.traverse(types=[providers.BaseSingleton]): * provider.reset() # <<<<<<<<<<<<<< * return SingletonResetContext(self) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -8752,12 +8827,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":305 + /* "dependency_injector/containers.pyx":311 * def reset_singletons(self): * """Reset container singletons.""" * for provider in self.traverse(types=[providers.BaseSingleton]): # <<<<<<<<<<<<<< @@ -8767,7 +8842,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":307 + /* "dependency_injector/containers.pyx":313 * for provider in self.traverse(types=[providers.BaseSingleton]): * provider.reset() * return SingletonResetContext(self) # <<<<<<<<<<<<<< @@ -8775,7 +8850,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ * def check_dependencies(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SingletonResetContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SingletonResetContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -8789,14 +8864,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":303 + /* "dependency_injector/containers.pyx":309 * provider.apply_overridings() * * def reset_singletons(self): # <<<<<<<<<<<<<< @@ -8819,7 +8894,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":309 +/* "dependency_injector/containers.pyx":315 * return SingletonResetContext(self) * * def check_dependencies(self): # <<<<<<<<<<<<<< @@ -8865,40 +8940,40 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("check_dependencies", 0); - /* "dependency_injector/containers.pyx":314 + /* "dependency_injector/containers.pyx":320 * If any dependency is undefined, raises an error. * """ * undefined = [ # <<<<<<<<<<<<<< * dependency * for dependency in self.traverse(types=[providers.Dependency]) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/containers.pyx":316 + /* "dependency_injector/containers.pyx":322 * undefined = [ * dependency * for dependency in self.traverse(types=[providers.Dependency]) # <<<<<<<<<<<<<< * if not dependency.is_defined * ] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_traverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_traverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_providers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_providers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Dependency); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Dependency); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_types, __pyx_t_4) < 0) __PYX_ERR(0, 316, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_types, __pyx_t_4) < 0) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -8906,9 +8981,9 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 322, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -8916,17 +8991,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 322, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 322, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -8936,7 +9011,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 316, __pyx_L1_error) + else __PYX_ERR(0, 322, __pyx_L1_error) } break; } @@ -8945,30 +9020,30 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_dependency, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":317 + /* "dependency_injector/containers.pyx":323 * dependency * for dependency in self.traverse(types=[providers.Dependency]) * if not dependency.is_defined # <<<<<<<<<<<<<< * ] * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dependency, __pyx_n_s_is_defined); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dependency, __pyx_n_s_is_defined); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { - /* "dependency_injector/containers.pyx":315 + /* "dependency_injector/containers.pyx":321 * """ * undefined = [ * dependency # <<<<<<<<<<<<<< * for dependency in self.traverse(types=[providers.Dependency]) * if not dependency.is_defined */ - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_dependency))) __PYX_ERR(0, 314, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_dependency))) __PYX_ERR(0, 320, __pyx_L1_error) - /* "dependency_injector/containers.pyx":317 + /* "dependency_injector/containers.pyx":323 * dependency * for dependency in self.traverse(types=[providers.Dependency]) * if not dependency.is_defined # <<<<<<<<<<<<<< @@ -8977,7 +9052,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":316 + /* "dependency_injector/containers.pyx":322 * undefined = [ * dependency * for dependency in self.traverse(types=[providers.Dependency]) # <<<<<<<<<<<<<< @@ -8989,7 +9064,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_v_undefined = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":320 + /* "dependency_injector/containers.pyx":326 * ] * * if not undefined: # <<<<<<<<<<<<<< @@ -9000,7 +9075,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "dependency_injector/containers.pyx":321 + /* "dependency_injector/containers.pyx":327 * * if not undefined: * return # <<<<<<<<<<<<<< @@ -9011,7 +9086,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/containers.pyx":320 + /* "dependency_injector/containers.pyx":326 * ] * * if not undefined: # <<<<<<<<<<<<<< @@ -9020,26 +9095,26 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":323 + /* "dependency_injector/containers.pyx":329 * return * * container_name = self.parent_name if self.parent_name else self.__class__.__name__ # <<<<<<<<<<<<<< * undefined_names = [ * f'"{dependency.parent_name if dependency.parent_name else dependency}"' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_4; @@ -9048,17 +9123,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_v_container_name = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":324 + /* "dependency_injector/containers.pyx":330 * * container_name = self.parent_name if self.parent_name else self.__class__.__name__ * undefined_names = [ # <<<<<<<<<<<<<< * f'"{dependency.parent_name if dependency.parent_name else dependency}"' * for dependency in undefined */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/containers.pyx":326 + /* "dependency_injector/containers.pyx":332 * undefined_names = [ * f'"{dependency.parent_name if dependency.parent_name else dependency}"' * for dependency in undefined # <<<<<<<<<<<<<< @@ -9069,22 +9144,22 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 326, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 332, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_dependency, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":325 + /* "dependency_injector/containers.pyx":331 * container_name = self.parent_name if self.parent_name else self.__class__.__name__ * undefined_names = [ * f'"{dependency.parent_name if dependency.parent_name else dependency}"' # <<<<<<<<<<<<<< * for dependency in undefined * ] */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = 0; __pyx_t_11 = 127; @@ -9092,12 +9167,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_10 += 1; __Pyx_GIVEREF(__pyx_kp_u__4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u__4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dependency, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dependency, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_8) { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dependency, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dependency, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_t_5; __pyx_t_5 = 0; @@ -9105,7 +9180,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_INCREF(__pyx_v_dependency); __pyx_t_2 = __pyx_v_dependency; } - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11; @@ -9117,13 +9192,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_10 += 1; __Pyx_GIVEREF(__pyx_kp_u__4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__4); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 324, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/containers.pyx":326 + /* "dependency_injector/containers.pyx":332 * undefined_names = [ * f'"{dependency.parent_name if dependency.parent_name else dependency}"' * for dependency in undefined # <<<<<<<<<<<<<< @@ -9135,27 +9210,27 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_v_undefined_names = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":328 + /* "dependency_injector/containers.pyx":334 * for dependency in undefined * ] * raise errors.Error( # <<<<<<<<<<<<<< * f'Container "{container_name}" has undefined dependencies: ' * f'{", ".join(undefined_names)}', */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":329 + /* "dependency_injector/containers.pyx":335 * ] * raise errors.Error( * f'Container "{container_name}" has undefined dependencies: ' # <<<<<<<<<<<<<< * f'{", ".join(undefined_names)}', * ) */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_11 = 127; @@ -9163,7 +9238,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_6 += 11; __Pyx_GIVEREF(__pyx_kp_u_Container_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Container_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_container_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_container_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_11; __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); @@ -9175,16 +9250,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GIVEREF(__pyx_kp_u_has_undefined_dependencies); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_has_undefined_dependencies); - /* "dependency_injector/containers.pyx":330 + /* "dependency_injector/containers.pyx":336 * raise errors.Error( * f'Container "{container_name}" has undefined dependencies: ' * f'{", ".join(undefined_names)}', # <<<<<<<<<<<<<< * ) * */ - __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_v_undefined_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_v_undefined_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_11; @@ -9193,14 +9268,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":329 + /* "dependency_injector/containers.pyx":335 * ] * raise errors.Error( * f'Container "{container_name}" has undefined dependencies: ' # <<<<<<<<<<<<<< * f'{", ".join(undefined_names)}', * ) */ - __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -9216,14 +9291,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 328, __pyx_L1_error) + __PYX_ERR(0, 334, __pyx_L1_error) - /* "dependency_injector/containers.pyx":309 + /* "dependency_injector/containers.pyx":315 * return SingletonResetContext(self) * * def check_dependencies(self): # <<<<<<<<<<<<<< @@ -9250,19 +9325,1104 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":333 +/* "dependency_injector/containers.pyx":339 * ) * + * def from_schema(self, schema): # <<<<<<<<<<<<<< + * """Build container providers from schema.""" + * from .schema import build_schema + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_40from_schema(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_10containers_16DynamicContainer_39from_schema[] = "Build container providers from schema."; +static PyMethodDef __pyx_mdef_19dependency_injector_10containers_16DynamicContainer_40from_schema = {"from_schema", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_10containers_16DynamicContainer_40from_schema, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_10containers_16DynamicContainer_39from_schema}; +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_40from_schema(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_schema = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_schema (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_schema,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("from_schema", 1, 2, 2, 1); __PYX_ERR(0, 339, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_schema") < 0)) __PYX_ERR(0, 339, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_schema = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_schema", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 339, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.from_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_39from_schema(__pyx_self, __pyx_v_self, __pyx_v_schema); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_39from_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema) { + PyObject *__pyx_v_build_schema = NULL; + PyObject *__pyx_v_name = NULL; + PyObject *__pyx_v_provider = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_schema", 0); + + /* "dependency_injector/containers.pyx":341 + * def from_schema(self, schema): + * """Build container providers from schema.""" + * from .schema import build_schema # <<<<<<<<<<<<<< + * for name, provider in build_schema(schema).items(): + * self.set_provider(name, provider) + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_build_schema); + __Pyx_GIVEREF(__pyx_n_s_build_schema); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_build_schema); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_schema, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __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_build_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_build_schema = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "dependency_injector/containers.pyx":342 + * """Build container providers from schema.""" + * from .schema import build_schema + * for name, provider in build_schema(schema).items(): # <<<<<<<<<<<<<< + * self.set_provider(name, provider) + * + */ + __Pyx_INCREF(__pyx_v_build_schema); + __pyx_t_3 = __pyx_v_build_schema; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 342, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 342, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } + } else { + __pyx_t_2 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 342, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_2); + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 342, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_1 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; + index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_4); + __pyx_t_4 = 0; + + /* "dependency_injector/containers.pyx":343 + * from .schema import build_schema + * for name, provider in build_schema(schema).items(): + * self.set_provider(name, provider) # <<<<<<<<<<<<<< + * + * def from_yaml_schema(self, filepath, loader=None): + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_provider); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_name, __pyx_v_provider}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_name, __pyx_v_provider}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; + } + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_v_name); + __Pyx_INCREF(__pyx_v_provider); + __Pyx_GIVEREF(__pyx_v_provider); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_v_provider); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "dependency_injector/containers.pyx":342 + * """Build container providers from schema.""" + * from .schema import build_schema + * for name, provider in build_schema(schema).items(): # <<<<<<<<<<<<<< + * self.set_provider(name, provider) + * + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "dependency_injector/containers.pyx":339 + * ) + * + * def from_schema(self, schema): # <<<<<<<<<<<<<< + * """Build container providers from schema.""" + * from .schema import build_schema + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.from_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_build_schema); + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XDECREF(__pyx_v_provider); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/containers.pyx":345 + * self.set_provider(name, provider) + * + * def from_yaml_schema(self, filepath, loader=None): # <<<<<<<<<<<<<< + * """Build container providers from YAML schema. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_42from_yaml_schema(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_10containers_16DynamicContainer_41from_yaml_schema[] = "Build container providers from YAML schema.\n\n You can specify type of loader as a second argument. By default, method\n uses ``SafeLoader``.\n "; +static PyMethodDef __pyx_mdef_19dependency_injector_10containers_16DynamicContainer_42from_yaml_schema = {"from_yaml_schema", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_10containers_16DynamicContainer_42from_yaml_schema, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_10containers_16DynamicContainer_41from_yaml_schema}; +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_42from_yaml_schema(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_filepath = 0; + PyObject *__pyx_v_loader = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_yaml_schema (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_filepath,&__pyx_n_s_loader,0}; + PyObject* values[3] = {0,0,0}; + values[2] = ((PyObject *)((PyObject *)Py_None)); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filepath)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("from_yaml_schema", 0, 2, 3, 1); __PYX_ERR(0, 345, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loader); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_yaml_schema") < 0)) __PYX_ERR(0, 345, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_self = values[0]; + __pyx_v_filepath = values[1]; + __pyx_v_loader = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_yaml_schema", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 345, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.from_yaml_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_41from_yaml_schema(__pyx_self, __pyx_v_self, __pyx_v_filepath, __pyx_v_loader); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_41from_yaml_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filepath, PyObject *__pyx_v_loader) { + PyObject *__pyx_v_file = NULL; + PyObject *__pyx_v_schema = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_yaml_schema", 0); + __Pyx_INCREF(__pyx_v_loader); + + /* "dependency_injector/containers.pyx":351 + * uses ``SafeLoader``. + * """ + * if yaml is None: # <<<<<<<<<<<<<< + * raise errors.Error( + * 'Unable to load yaml schema - PyYAML is not installed. ' + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_yaml); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_t_1 == Py_None); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (unlikely(__pyx_t_3)) { + + /* "dependency_injector/containers.pyx":352 + * """ + * if yaml is None: + * raise errors.Error( # <<<<<<<<<<<<<< + * 'Unable to load yaml schema - PyYAML is not installed. ' + * 'Install PyYAML or install Dependency Injector with yaml extras: ' + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_s_Unable_to_load_yaml_schema_PyYAM) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_Unable_to_load_yaml_schema_PyYAM); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 352, __pyx_L1_error) + + /* "dependency_injector/containers.pyx":351 + * uses ``SafeLoader``. + * """ + * if yaml is None: # <<<<<<<<<<<<<< + * raise errors.Error( + * 'Unable to load yaml schema - PyYAML is not installed. ' + */ + } + + /* "dependency_injector/containers.pyx":358 + * ) + * + * if loader is None: # <<<<<<<<<<<<<< + * loader = yaml.SafeLoader + * + */ + __pyx_t_3 = (__pyx_v_loader == Py_None); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "dependency_injector/containers.pyx":359 + * + * if loader is None: + * loader = yaml.SafeLoader # <<<<<<<<<<<<<< + * + * with open(filepath) as file: + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_yaml); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SafeLoader); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_loader, __pyx_t_5); + __pyx_t_5 = 0; + + /* "dependency_injector/containers.pyx":358 + * ) + * + * if loader is None: # <<<<<<<<<<<<<< + * loader = yaml.SafeLoader + * + */ + } + + /* "dependency_injector/containers.pyx":361 + * loader = yaml.SafeLoader + * + * with open(filepath) as file: # <<<<<<<<<<<<<< + * schema = yaml.load(file, loader) + * + */ + /*with:*/ { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_v_filepath); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_5, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_5, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_t_1; + __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + __pyx_v_file = __pyx_t_4; + __pyx_t_4 = 0; + + /* "dependency_injector/containers.pyx":362 + * + * with open(filepath) as file: + * schema = yaml.load(file, loader) # <<<<<<<<<<<<<< + * + * self.from_schema(schema) + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_yaml); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 362, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_load); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_11 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(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_11 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_file, __pyx_v_loader}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L9_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_file, __pyx_v_loader}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L9_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 362, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_file); + __Pyx_GIVEREF(__pyx_v_file); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_v_file); + __Pyx_INCREF(__pyx_v_loader); + __Pyx_GIVEREF(__pyx_v_loader); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_v_loader); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_schema = __pyx_t_4; + __pyx_t_4 = 0; + + /* "dependency_injector/containers.pyx":361 + * loader = yaml.SafeLoader + * + * with open(filepath) as file: # <<<<<<<<<<<<<< + * schema = yaml.load(file, loader) + * + */ + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L14_try_end; + __pyx_L9_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + /*except:*/ { + __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.from_yaml_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 361, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 361, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_2 < 0) __PYX_ERR(0, 361, __pyx_L11_except_error) + __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_1, __pyx_t_7); + __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_7 = 0; + __PYX_ERR(0, 361, __pyx_L11_except_error) + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L10_exception_handled; + } + __pyx_L11_except_error:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L10_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_L14_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_6) { + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__6, NULL); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + goto __pyx_L8; + } + __pyx_L8:; + } + goto __pyx_L18; + __pyx_L5_error:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L1_error; + __pyx_L18:; + } + + /* "dependency_injector/containers.pyx":364 + * schema = yaml.load(file, loader) + * + * self.from_schema(schema) # <<<<<<<<<<<<<< + * + * def from_json_schema(self, filepath): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_from_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(!__pyx_v_schema)) { __Pyx_RaiseUnboundLocalError("schema"); __PYX_ERR(0, 364, __pyx_L1_error) } + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_schema); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "dependency_injector/containers.pyx":345 + * self.set_provider(name, provider) + * + * def from_yaml_schema(self, filepath, loader=None): # <<<<<<<<<<<<<< + * """Build container providers from YAML schema. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.from_yaml_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_file); + __Pyx_XDECREF(__pyx_v_schema); + __Pyx_XDECREF(__pyx_v_loader); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/containers.pyx":366 + * self.from_schema(schema) + * + * def from_json_schema(self, filepath): # <<<<<<<<<<<<<< + * """Build container providers from JSON schema.""" + * with open(filepath) as file: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_44from_json_schema(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_10containers_16DynamicContainer_43from_json_schema[] = "Build container providers from JSON schema."; +static PyMethodDef __pyx_mdef_19dependency_injector_10containers_16DynamicContainer_44from_json_schema = {"from_json_schema", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_10containers_16DynamicContainer_44from_json_schema, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_10containers_16DynamicContainer_43from_json_schema}; +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_44from_json_schema(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_filepath = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_json_schema (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_filepath,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filepath)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("from_json_schema", 1, 2, 2, 1); __PYX_ERR(0, 366, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_json_schema") < 0)) __PYX_ERR(0, 366, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_self = values[0]; + __pyx_v_filepath = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_json_schema", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 366, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.from_json_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_43from_json_schema(__pyx_self, __pyx_v_self, __pyx_v_filepath); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_43from_json_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filepath) { + PyObject *__pyx_v_file = NULL; + PyObject *__pyx_v_schema = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_json_schema", 0); + + /* "dependency_injector/containers.pyx":368 + * def from_json_schema(self, filepath): + * """Build container providers from JSON schema.""" + * with open(filepath) as file: # <<<<<<<<<<<<<< + * schema = json.load(file) + * self.from_schema(schema) + */ + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_v_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 368, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_t_3; + __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + __pyx_v_file = __pyx_t_4; + __pyx_t_4 = 0; + + /* "dependency_injector/containers.pyx":369 + * """Build container providers from JSON schema.""" + * with open(filepath) as file: + * schema = json.load(file) # <<<<<<<<<<<<<< + * self.from_schema(schema) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_file) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_file); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_schema = __pyx_t_4; + __pyx_t_4 = 0; + + /* "dependency_injector/containers.pyx":368 + * def from_json_schema(self, filepath): + * """Build container providers from JSON schema.""" + * with open(filepath) as file: # <<<<<<<<<<<<<< + * schema = json.load(file) + * self.from_schema(schema) + */ + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + /*except:*/ { + __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.from_json_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 368, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 368, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_10 < 0) __PYX_ERR(0, 368, __pyx_L9_except_error) + __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_3, __pyx_t_1); + __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; + __PYX_ERR(0, 368, __pyx_L9_except_error) + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L8_exception_handled; + } + __pyx_L9_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_L12_try_end:; + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_2) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__6, NULL); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L6; + } + __pyx_L6:; + } + goto __pyx_L16; + __pyx_L3_error:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L1_error; + __pyx_L16:; + } + + /* "dependency_injector/containers.pyx":370 + * with open(filepath) as file: + * schema = json.load(file) + * self.from_schema(schema) # <<<<<<<<<<<<<< + * + * def resolve_provider_name(self, provider): + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_from_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(!__pyx_v_schema)) { __Pyx_RaiseUnboundLocalError("schema"); __PYX_ERR(0, 370, __pyx_L1_error) } + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/containers.pyx":366 + * self.from_schema(schema) + * + * def from_json_schema(self, filepath): # <<<<<<<<<<<<<< + * """Build container providers from JSON schema.""" + * with open(filepath) as file: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.from_json_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_file); + __Pyx_XDECREF(__pyx_v_schema); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/containers.pyx":372 + * self.from_schema(schema) + * * def resolve_provider_name(self, provider): # <<<<<<<<<<<<<< * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_40resolve_provider_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_10containers_16DynamicContainer_39resolve_provider_name[] = "Try to resolve provider name."; -static PyMethodDef __pyx_mdef_19dependency_injector_10containers_16DynamicContainer_40resolve_provider_name = {"resolve_provider_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_10containers_16DynamicContainer_40resolve_provider_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_10containers_16DynamicContainer_39resolve_provider_name}; -static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_40resolve_provider_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_46resolve_provider_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_10containers_16DynamicContainer_45resolve_provider_name[] = "Try to resolve provider name."; +static PyMethodDef __pyx_mdef_19dependency_injector_10containers_16DynamicContainer_46resolve_provider_name = {"resolve_provider_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_10containers_16DynamicContainer_46resolve_provider_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_10containers_16DynamicContainer_45resolve_provider_name}; +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_46resolve_provider_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_provider = 0; int __pyx_lineno = 0; @@ -9294,11 +10454,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("resolve_provider_name", 1, 2, 2, 1); __PYX_ERR(0, 333, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve_provider_name", 1, 2, 2, 1); __PYX_ERR(0, 372, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_provider_name") < 0)) __PYX_ERR(0, 333, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_provider_name") < 0)) __PYX_ERR(0, 372, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9311,20 +10471,20 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("resolve_provider_name", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 333, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve_provider_name", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 372, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.resolve_provider_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_39resolve_provider_name(__pyx_self, __pyx_v_self, __pyx_v_provider); + __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_45resolve_provider_name(__pyx_self, __pyx_v_self, __pyx_v_provider); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_39resolve_provider_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_provider) { +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_45resolve_provider_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_provider) { PyObject *__pyx_v_provider_name = NULL; PyObject *__pyx_v_container_provider = NULL; PyObject *__pyx_r = NULL; @@ -9346,16 +10506,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resolve_provider_name", 0); - /* "dependency_injector/containers.pyx":335 + /* "dependency_injector/containers.pyx":374 * def resolve_provider_name(self, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): # <<<<<<<<<<<<<< * if container_provider is provider: * return provider_name */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __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, 335, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -9370,16 +10530,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } __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, 335, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __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, 335, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 374, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -9387,17 +10547,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 374, __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, 335, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 374, __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, 335, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -9407,7 +10567,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 335, __pyx_L1_error) + else __PYX_ERR(0, 374, __pyx_L1_error) } break; } @@ -9419,7 +10579,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 335, __pyx_L1_error) + __PYX_ERR(0, 374, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -9432,15 +10592,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __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, 335, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 374, __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; @@ -9448,7 +10608,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 335, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 374, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -9456,7 +10616,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 335, __pyx_L1_error) + __PYX_ERR(0, 374, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_provider_name, __pyx_t_2); @@ -9464,7 +10624,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_XDECREF_SET(__pyx_v_container_provider, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":336 + /* "dependency_injector/containers.pyx":375 * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): * if container_provider is provider: # <<<<<<<<<<<<<< @@ -9475,7 +10635,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "dependency_injector/containers.pyx":337 + /* "dependency_injector/containers.pyx":376 * for provider_name, container_provider in self.providers.items(): * if container_provider is provider: * return provider_name # <<<<<<<<<<<<<< @@ -9488,7 +10648,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":336 + /* "dependency_injector/containers.pyx":375 * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): * if container_provider is provider: # <<<<<<<<<<<<<< @@ -9497,7 +10657,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":335 + /* "dependency_injector/containers.pyx":374 * def resolve_provider_name(self, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): # <<<<<<<<<<<<<< @@ -9507,19 +10667,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ } /*else*/ { - /* "dependency_injector/containers.pyx":339 + /* "dependency_injector/containers.pyx":378 * return provider_name * else: * raise errors.Error(f'Can not resolve name for provider "{provider}"') # <<<<<<<<<<<<<< * * @property */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = 0; __pyx_t_12 = 127; @@ -9527,7 +10687,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_11 += 35; __Pyx_GIVEREF(__pyx_kp_u_Can_not_resolve_name_for_provide); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Can_not_resolve_name_for_provide); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_provider, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_provider, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_12; __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); @@ -9538,7 +10698,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_11 += 1; __Pyx_GIVEREF(__pyx_kp_u__4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__4); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -9554,15 +10714,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 339, __pyx_L1_error) + __PYX_ERR(0, 378, __pyx_L1_error) } - /* "dependency_injector/containers.pyx":335 + /* "dependency_injector/containers.pyx":374 * def resolve_provider_name(self, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): # <<<<<<<<<<<<<< @@ -9571,8 +10731,8 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":333 - * ) + /* "dependency_injector/containers.pyx":372 + * self.from_schema(schema) * * def resolve_provider_name(self, provider): # <<<<<<<<<<<<<< * """Try to resolve provider name.""" @@ -9596,7 +10756,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":342 +/* "dependency_injector/containers.pyx":381 * * @property * def parent_name(self): # <<<<<<<<<<<<<< @@ -9605,21 +10765,21 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_42parent_name(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_19dependency_injector_10containers_16DynamicContainer_41parent_name[] = "Return parent name."; -static PyMethodDef __pyx_mdef_19dependency_injector_10containers_16DynamicContainer_42parent_name = {"parent_name", (PyCFunction)__pyx_pw_19dependency_injector_10containers_16DynamicContainer_42parent_name, METH_O, __pyx_doc_19dependency_injector_10containers_16DynamicContainer_41parent_name}; -static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_42parent_name(PyObject *__pyx_self, PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_48parent_name(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_19dependency_injector_10containers_16DynamicContainer_47parent_name[] = "Return parent name."; +static PyMethodDef __pyx_mdef_19dependency_injector_10containers_16DynamicContainer_48parent_name = {"parent_name", (PyCFunction)__pyx_pw_19dependency_injector_10containers_16DynamicContainer_48parent_name, METH_O, __pyx_doc_19dependency_injector_10containers_16DynamicContainer_47parent_name}; +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_48parent_name(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parent_name (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_41parent_name(__pyx_self, ((PyObject *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_47parent_name(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_41parent_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_47parent_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -9630,20 +10790,20 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parent_name", 0); - /* "dependency_injector/containers.pyx":344 + /* "dependency_injector/containers.pyx":383 * def parent_name(self): * """Return parent name.""" * if self.parent: # <<<<<<<<<<<<<< * return self.parent.parent_name * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "dependency_injector/containers.pyx":345 + /* "dependency_injector/containers.pyx":384 * """Return parent name.""" * if self.parent: * return self.parent.parent_name # <<<<<<<<<<<<<< @@ -9651,16 +10811,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ * if self.declarative_parent: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":344 + /* "dependency_injector/containers.pyx":383 * def parent_name(self): * """Return parent name.""" * if self.parent: # <<<<<<<<<<<<<< @@ -9669,20 +10829,20 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":347 + /* "dependency_injector/containers.pyx":386 * return self.parent.parent_name * * if self.declarative_parent: # <<<<<<<<<<<<<< * return self.declarative_parent.__name__ * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_declarative_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_declarative_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "dependency_injector/containers.pyx":348 + /* "dependency_injector/containers.pyx":387 * * if self.declarative_parent: * return self.declarative_parent.__name__ # <<<<<<<<<<<<<< @@ -9690,16 +10850,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ * return None */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_declarative_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_declarative_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":347 + /* "dependency_injector/containers.pyx":386 * return self.parent.parent_name * * if self.declarative_parent: # <<<<<<<<<<<<<< @@ -9708,7 +10868,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ } - /* "dependency_injector/containers.pyx":350 + /* "dependency_injector/containers.pyx":389 * return self.declarative_parent.__name__ * * return None # <<<<<<<<<<<<<< @@ -9719,7 +10879,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/containers.pyx":342 + /* "dependency_injector/containers.pyx":381 * * @property * def parent_name(self): # <<<<<<<<<<<<<< @@ -9739,7 +10899,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":352 +/* "dependency_injector/containers.pyx":391 * return None * * def assign_parent(self, parent): # <<<<<<<<<<<<<< @@ -9748,10 +10908,10 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_44assign_parent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_10containers_16DynamicContainer_43assign_parent[] = "Assign parent."; -static PyMethodDef __pyx_mdef_19dependency_injector_10containers_16DynamicContainer_44assign_parent = {"assign_parent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_10containers_16DynamicContainer_44assign_parent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_10containers_16DynamicContainer_43assign_parent}; -static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_44assign_parent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_50assign_parent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_10containers_16DynamicContainer_49assign_parent[] = "Assign parent."; +static PyMethodDef __pyx_mdef_19dependency_injector_10containers_16DynamicContainer_50assign_parent = {"assign_parent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_10containers_16DynamicContainer_50assign_parent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_10containers_16DynamicContainer_49assign_parent}; +static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_50assign_parent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_parent = 0; int __pyx_lineno = 0; @@ -9783,11 +10943,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parent)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("assign_parent", 1, 2, 2, 1); __PYX_ERR(0, 352, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("assign_parent", 1, 2, 2, 1); __PYX_ERR(0, 391, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assign_parent") < 0)) __PYX_ERR(0, 352, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assign_parent") < 0)) __PYX_ERR(0, 391, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9800,20 +10960,20 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("assign_parent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 352, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("assign_parent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 391, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DynamicContainer.assign_parent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_43assign_parent(__pyx_self, __pyx_v_self, __pyx_v_parent); + __pyx_r = __pyx_pf_19dependency_injector_10containers_16DynamicContainer_49assign_parent(__pyx_self, __pyx_v_self, __pyx_v_parent); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_43assign_parent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parent) { +static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_49assign_parent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parent) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; @@ -9821,16 +10981,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assign_parent", 0); - /* "dependency_injector/containers.pyx":354 + /* "dependency_injector/containers.pyx":393 * def assign_parent(self, parent): * """Assign parent.""" * self.parent = parent # <<<<<<<<<<<<<< * * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parent, __pyx_v_parent) < 0) __PYX_ERR(0, 354, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parent, __pyx_v_parent) < 0) __PYX_ERR(0, 393, __pyx_L1_error) - /* "dependency_injector/containers.pyx":352 + /* "dependency_injector/containers.pyx":391 * return None * * def assign_parent(self, parent): # <<<<<<<<<<<<<< @@ -9850,7 +11010,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_16DynamicContainer_ return __pyx_r; } -/* "dependency_injector/containers.pyx":360 +/* "dependency_injector/containers.pyx":399 * """Declarative inversion of control container meta class.""" * * def __new__(type mcs, str class_name, tuple bases, dict attributes): # <<<<<<<<<<<<<< @@ -9900,23 +11060,23 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_class_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 1); __PYX_ERR(0, 360, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 1); __PYX_ERR(0, 399, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bases)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 2); __PYX_ERR(0, 360, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 2); __PYX_ERR(0, 399, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attributes)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 3); __PYX_ERR(0, 360, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 3); __PYX_ERR(0, 399, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 360, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 399, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -9933,16 +11093,16 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 360, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 399, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DeclarativeContainerMetaClass.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mcs), (&PyType_Type), 1, "mcs", 1))) __PYX_ERR(0, 360, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_class_name), (&PyString_Type), 1, "class_name", 1))) __PYX_ERR(0, 360, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bases), (&PyTuple_Type), 1, "bases", 1))) __PYX_ERR(0, 360, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attributes), (&PyDict_Type), 1, "attributes", 1))) __PYX_ERR(0, 360, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mcs), (&PyType_Type), 1, "mcs", 1))) __PYX_ERR(0, 399, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_class_name), (&PyString_Type), 1, "class_name", 1))) __PYX_ERR(0, 399, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bases), (&PyTuple_Type), 1, "bases", 1))) __PYX_ERR(0, 399, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attributes), (&PyDict_Type), 1, "attributes", 1))) __PYX_ERR(0, 399, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_10containers_29DeclarativeContainerMetaClass___new__(__pyx_self, __pyx_v_mcs, __pyx_v_class_name, __pyx_v_bases, __pyx_v_attributes); /* function exit code */ @@ -9991,14 +11151,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__new__", 0); - /* "dependency_injector/containers.pyx":362 + /* "dependency_injector/containers.pyx":401 * def __new__(type mcs, str class_name, tuple bases, dict attributes): * """Declarative container class factory.""" * self = mcs.__fetch_self(attributes) # <<<<<<<<<<<<<< * if self is None: * self = providers.Self() */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mcs), __pyx_n_s_DeclarativeContainerMetaClass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mcs), __pyx_n_s_DeclarativeContainerMetaClass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10012,13 +11172,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_attributes) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_attributes); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":363 + /* "dependency_injector/containers.pyx":402 * """Declarative container class factory.""" * self = mcs.__fetch_self(attributes) * if self is None: # <<<<<<<<<<<<<< @@ -10029,16 +11189,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "dependency_injector/containers.pyx":364 + /* "dependency_injector/containers.pyx":403 * self = mcs.__fetch_self(attributes) * if self is None: * self = providers.Self() # <<<<<<<<<<<<<< * * containers = { */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -10053,13 +11213,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __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, 364, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_self, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":363 + /* "dependency_injector/containers.pyx":402 * """Declarative container class factory.""" * self = mcs.__fetch_self(attributes) * if self is None: # <<<<<<<<<<<<<< @@ -10068,7 +11228,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":366 + /* "dependency_injector/containers.pyx":405 * self = providers.Self() * * containers = { # <<<<<<<<<<<<<< @@ -10076,19 +11236,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai * for name, container in six.iteritems(attributes) */ { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L6_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/containers.pyx":368 + /* "dependency_injector/containers.pyx":407 * containers = { * name: container * for name, container in six.iteritems(attributes) # <<<<<<<<<<<<<< * if is_container(container) * } */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L6_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 407, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -10103,16 +11263,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_v_attributes) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_attributes); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L6_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L6_error) + __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 407, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 368, __pyx_L6_error) + __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 407, __pyx_L6_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -10120,17 +11280,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 368, __pyx_L6_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 407, __pyx_L6_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L6_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 368, __pyx_L6_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 407, __pyx_L6_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L6_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -10140,7 +11300,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 368, __pyx_L6_error) + else __PYX_ERR(0, 407, __pyx_L6_error) } break; } @@ -10152,7 +11312,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 368, __pyx_L6_error) + __PYX_ERR(0, 407, __pyx_L6_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -10165,15 +11325,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L6_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 368, __pyx_L6_error) + __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 407, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 368, __pyx_L6_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 407, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; @@ -10181,7 +11341,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 368, __pyx_L6_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 407, __pyx_L6_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L10_unpacking_done; @@ -10189,7 +11349,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 368, __pyx_L6_error) + __PYX_ERR(0, 407, __pyx_L6_error) __pyx_L10_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_name, __pyx_t_2); @@ -10197,7 +11357,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_container, __pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":369 + /* "dependency_injector/containers.pyx":408 * name: container * for name, container in six.iteritems(attributes) * if is_container(container) # <<<<<<<<<<<<<< @@ -10207,16 +11367,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_5 = (__pyx_f_19dependency_injector_10containers_is_container(__pyx_8genexpr1__pyx_v_container, 0) != 0); if (__pyx_t_5) { - /* "dependency_injector/containers.pyx":367 + /* "dependency_injector/containers.pyx":406 * * containers = { * name: container # <<<<<<<<<<<<<< * for name, container in six.iteritems(attributes) * if is_container(container) */ - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr1__pyx_v_name, (PyObject*)__pyx_8genexpr1__pyx_v_container))) __PYX_ERR(0, 367, __pyx_L6_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr1__pyx_v_name, (PyObject*)__pyx_8genexpr1__pyx_v_container))) __PYX_ERR(0, 406, __pyx_L6_error) - /* "dependency_injector/containers.pyx":369 + /* "dependency_injector/containers.pyx":408 * name: container * for name, container in six.iteritems(attributes) * if is_container(container) # <<<<<<<<<<<<<< @@ -10225,7 +11385,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":368 + /* "dependency_injector/containers.pyx":407 * containers = { * name: container * for name, container in six.iteritems(attributes) # <<<<<<<<<<<<<< @@ -10246,7 +11406,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_v_containers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":372 + /* "dependency_injector/containers.pyx":411 * } * * cls_providers = { # <<<<<<<<<<<<<< @@ -10254,19 +11414,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai * for name, provider in six.iteritems(attributes) */ { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L15_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/containers.pyx":374 + /* "dependency_injector/containers.pyx":413 * cls_providers = { * name: provider * for name, provider in six.iteritems(attributes) # <<<<<<<<<<<<<< * if isinstance(provider, providers.Provider) and not isinstance(provider, providers.Self) * } */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_six); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L15_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_six); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 374, __pyx_L15_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 413, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -10281,16 +11441,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_attributes) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_attributes); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L15_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_9 = __pyx_t_6; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 374, __pyx_L15_error) + __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 413, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 374, __pyx_L15_error) + __pyx_t_8 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 413, __pyx_L15_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -10298,17 +11458,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_9))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 374, __pyx_L15_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 413, __pyx_L15_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L15_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 374, __pyx_L15_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 413, __pyx_L15_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L15_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -10318,7 +11478,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 374, __pyx_L15_error) + else __PYX_ERR(0, 413, __pyx_L15_error) } break; } @@ -10330,7 +11490,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 374, __pyx_L15_error) + __PYX_ERR(0, 413, __pyx_L15_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -10343,15 +11503,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L15_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L15_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 374, __pyx_L15_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 413, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; @@ -10359,7 +11519,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L18_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 374, __pyx_L15_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 413, __pyx_L15_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L19_unpacking_done; @@ -10367,7 +11527,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 374, __pyx_L15_error) + __PYX_ERR(0, 413, __pyx_L15_error) __pyx_L19_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_name, __pyx_t_3); @@ -10375,19 +11535,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_provider, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":375 + /* "dependency_injector/containers.pyx":414 * name: provider * for name, provider in six.iteritems(attributes) * if isinstance(provider, providers.Provider) and not isinstance(provider, providers.Self) # <<<<<<<<<<<<<< * } * */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 375, __pyx_L15_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 414, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L15_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = PyObject_IsInstance(__pyx_8genexpr2__pyx_v_provider, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 375, __pyx_L15_error) + __pyx_t_4 = PyObject_IsInstance(__pyx_8genexpr2__pyx_v_provider, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 414, __pyx_L15_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = (__pyx_t_4 != 0); if (__pyx_t_12) { @@ -10395,28 +11555,28 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_5 = __pyx_t_12; goto __pyx_L21_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L15_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 375, __pyx_L15_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 414, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_12 = PyObject_IsInstance(__pyx_8genexpr2__pyx_v_provider, __pyx_t_6); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 375, __pyx_L15_error) + __pyx_t_12 = PyObject_IsInstance(__pyx_8genexpr2__pyx_v_provider, __pyx_t_6); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 414, __pyx_L15_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = ((!(__pyx_t_12 != 0)) != 0); __pyx_t_5 = __pyx_t_4; __pyx_L21_bool_binop_done:; if (__pyx_t_5) { - /* "dependency_injector/containers.pyx":373 + /* "dependency_injector/containers.pyx":412 * * cls_providers = { * name: provider # <<<<<<<<<<<<<< * for name, provider in six.iteritems(attributes) * if isinstance(provider, providers.Provider) and not isinstance(provider, providers.Self) */ - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr2__pyx_v_name, (PyObject*)__pyx_8genexpr2__pyx_v_provider))) __PYX_ERR(0, 373, __pyx_L15_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr2__pyx_v_name, (PyObject*)__pyx_8genexpr2__pyx_v_provider))) __PYX_ERR(0, 412, __pyx_L15_error) - /* "dependency_injector/containers.pyx":375 + /* "dependency_injector/containers.pyx":414 * name: provider * for name, provider in six.iteritems(attributes) * if isinstance(provider, providers.Provider) and not isinstance(provider, providers.Self) # <<<<<<<<<<<<<< @@ -10425,7 +11585,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":374 + /* "dependency_injector/containers.pyx":413 * cls_providers = { * name: provider * for name, provider in six.iteritems(attributes) # <<<<<<<<<<<<<< @@ -10446,7 +11606,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_v_cls_providers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":378 + /* "dependency_injector/containers.pyx":417 * } * * inherited_providers = { # <<<<<<<<<<<<<< @@ -10454,10 +11614,10 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai * for base in bases */ { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L26_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/containers.pyx":380 + /* "dependency_injector/containers.pyx":419 * inherited_providers = { * name: provider * for base in bases # <<<<<<<<<<<<<< @@ -10466,21 +11626,21 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ if (unlikely(__pyx_v_bases == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 380, __pyx_L26_error) + __PYX_ERR(0, 419, __pyx_L26_error) } __pyx_t_9 = __pyx_v_bases; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0; for (;;) { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 380, __pyx_L26_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 419, __pyx_L26_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 380, __pyx_L26_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 419, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_base, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":381 + /* "dependency_injector/containers.pyx":420 * name: provider * for base in bases * if is_container(base) and base is not DynamicContainer # <<<<<<<<<<<<<< @@ -10493,7 +11653,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_5 = __pyx_t_4; goto __pyx_L30_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DynamicContainer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 381, __pyx_L26_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DynamicContainer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 420, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = (__pyx_8genexpr3__pyx_v_base != __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -10502,19 +11662,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_L30_bool_binop_done:; if (__pyx_t_5) { - /* "dependency_injector/containers.pyx":382 + /* "dependency_injector/containers.pyx":421 * for base in bases * if is_container(base) and base is not DynamicContainer * for name, provider in six.iteritems(base.providers) # <<<<<<<<<<<<<< * } * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L26_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_base, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_base, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -10529,16 +11689,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 382, __pyx_L26_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 421, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 421, __pyx_L26_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -10546,17 +11706,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 421, __pyx_L26_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 421, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 421, __pyx_L26_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 421, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -10566,7 +11726,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 382, __pyx_L26_error) + else __PYX_ERR(0, 421, __pyx_L26_error) } break; } @@ -10578,7 +11738,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 382, __pyx_L26_error) + __PYX_ERR(0, 421, __pyx_L26_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -10591,15 +11751,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 421, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 382, __pyx_L26_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 421, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_14)->tp_iternext; @@ -10607,7 +11767,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_10 = __pyx_t_11(__pyx_t_14); if (unlikely(!__pyx_t_10)) goto __pyx_L34_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_14), 2) < 0) __PYX_ERR(0, 382, __pyx_L26_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_14), 2) < 0) __PYX_ERR(0, 421, __pyx_L26_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L35_unpacking_done; @@ -10615,7 +11775,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 382, __pyx_L26_error) + __PYX_ERR(0, 421, __pyx_L26_error) __pyx_L35_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_name, __pyx_t_2); @@ -10623,16 +11783,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_provider, __pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":379 + /* "dependency_injector/containers.pyx":418 * * inherited_providers = { * name: provider # <<<<<<<<<<<<<< * for base in bases * if is_container(base) and base is not DynamicContainer */ - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr3__pyx_v_name, (PyObject*)__pyx_8genexpr3__pyx_v_provider))) __PYX_ERR(0, 379, __pyx_L26_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr3__pyx_v_name, (PyObject*)__pyx_8genexpr3__pyx_v_provider))) __PYX_ERR(0, 418, __pyx_L26_error) - /* "dependency_injector/containers.pyx":382 + /* "dependency_injector/containers.pyx":421 * for base in bases * if is_container(base) and base is not DynamicContainer * for name, provider in six.iteritems(base.providers) # <<<<<<<<<<<<<< @@ -10642,7 +11802,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":381 + /* "dependency_injector/containers.pyx":420 * name: provider * for base in bases * if is_container(base) and base is not DynamicContainer # <<<<<<<<<<<<<< @@ -10651,7 +11811,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":380 + /* "dependency_injector/containers.pyx":419 * inherited_providers = { * name: provider * for base in bases # <<<<<<<<<<<<<< @@ -10674,41 +11834,41 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_v_inherited_providers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":385 + /* "dependency_injector/containers.pyx":424 * } * * all_providers = {} # <<<<<<<<<<<<<< * all_providers.update(inherited_providers) * all_providers.update(cls_providers) */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_all_providers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":386 + /* "dependency_injector/containers.pyx":425 * * all_providers = {} * all_providers.update(inherited_providers) # <<<<<<<<<<<<<< * all_providers.update(cls_providers) * */ - __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_all_providers, __pyx_v_inherited_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error) + __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_all_providers, __pyx_v_inherited_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":387 + /* "dependency_injector/containers.pyx":426 * all_providers = {} * all_providers.update(inherited_providers) * all_providers.update(cls_providers) # <<<<<<<<<<<<<< * * attributes['containers'] = containers */ - __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_all_providers, __pyx_v_cls_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_all_providers, __pyx_v_cls_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":389 + /* "dependency_injector/containers.pyx":428 * all_providers.update(cls_providers) * * attributes['containers'] = containers # <<<<<<<<<<<<<< @@ -10717,11 +11877,11 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 389, __pyx_L1_error) + __PYX_ERR(0, 428, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_n_s_containers, __pyx_v_containers) < 0)) __PYX_ERR(0, 389, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_n_s_containers, __pyx_v_containers) < 0)) __PYX_ERR(0, 428, __pyx_L1_error) - /* "dependency_injector/containers.pyx":390 + /* "dependency_injector/containers.pyx":429 * * attributes['containers'] = containers * attributes['inherited_providers'] = inherited_providers # <<<<<<<<<<<<<< @@ -10730,11 +11890,11 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 390, __pyx_L1_error) + __PYX_ERR(0, 429, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_n_s_inherited_providers, __pyx_v_inherited_providers) < 0)) __PYX_ERR(0, 390, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_n_s_inherited_providers, __pyx_v_inherited_providers) < 0)) __PYX_ERR(0, 429, __pyx_L1_error) - /* "dependency_injector/containers.pyx":391 + /* "dependency_injector/containers.pyx":430 * attributes['containers'] = containers * attributes['inherited_providers'] = inherited_providers * attributes['cls_providers'] = cls_providers # <<<<<<<<<<<<<< @@ -10743,11 +11903,11 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 391, __pyx_L1_error) + __PYX_ERR(0, 430, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_n_s_cls_providers, __pyx_v_cls_providers) < 0)) __PYX_ERR(0, 391, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_n_s_cls_providers, __pyx_v_cls_providers) < 0)) __PYX_ERR(0, 430, __pyx_L1_error) - /* "dependency_injector/containers.pyx":392 + /* "dependency_injector/containers.pyx":431 * attributes['inherited_providers'] = inherited_providers * attributes['cls_providers'] = cls_providers * attributes['providers'] = all_providers # <<<<<<<<<<<<<< @@ -10756,18 +11916,18 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 392, __pyx_L1_error) + __PYX_ERR(0, 431, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_n_s_providers, __pyx_v_all_providers) < 0)) __PYX_ERR(0, 392, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_n_s_providers, __pyx_v_all_providers) < 0)) __PYX_ERR(0, 431, __pyx_L1_error) - /* "dependency_injector/containers.pyx":394 + /* "dependency_injector/containers.pyx":433 * attributes['providers'] = all_providers * * cls = type.__new__(mcs, class_name, bases, attributes) # <<<<<<<<<<<<<< * * self.set_container(cls) */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyType_Type)), __pyx_n_s_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyType_Type)), __pyx_n_s_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = NULL; __pyx_t_15 = 0; @@ -10784,7 +11944,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_mcs), __pyx_v_class_name, __pyx_v_bases, __pyx_v_attributes}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_15, 4+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_15, 4+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -10792,13 +11952,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[5] = {__pyx_t_3, ((PyObject *)__pyx_v_mcs), __pyx_v_class_name, __pyx_v_bases, __pyx_v_attributes}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_15, 4+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_15, 4+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(4+__pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4+__pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -10815,7 +11975,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(__pyx_v_attributes); __Pyx_GIVEREF(__pyx_v_attributes); PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_15, __pyx_v_attributes); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -10826,14 +11986,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_v_cls = ((PyTypeObject*)__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":396 + /* "dependency_injector/containers.pyx":435 * cls = type.__new__(mcs, class_name, bases, attributes) * * self.set_container(cls) # <<<<<<<<<<<<<< * cls.__self__ = self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_container); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_container); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -10847,33 +12007,33 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_9 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, ((PyObject *)__pyx_v_cls)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_cls)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 396, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":397 + /* "dependency_injector/containers.pyx":436 * * self.set_container(cls) * cls.__self__ = self # <<<<<<<<<<<<<< * * for provider in six.itervalues(cls.providers): */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_self, __pyx_v_self) < 0) __PYX_ERR(0, 397, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_self, __pyx_v_self) < 0) __PYX_ERR(0, 436, __pyx_L1_error) - /* "dependency_injector/containers.pyx":399 + /* "dependency_injector/containers.pyx":438 * cls.__self__ = self * * for provider in six.itervalues(cls.providers): # <<<<<<<<<<<<<< * _check_provider_type(cls, provider) * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -10888,16 +12048,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_9 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) { __pyx_t_6 = __pyx_t_9; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 438, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { @@ -10905,17 +12065,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 438, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 438, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } @@ -10925,7 +12085,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 399, __pyx_L1_error) + else __PYX_ERR(0, 438, __pyx_L1_error) } break; } @@ -10934,18 +12094,18 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":400 + /* "dependency_injector/containers.pyx":439 * * for provider in six.itervalues(cls.providers): * _check_provider_type(cls, provider) # <<<<<<<<<<<<<< * * for provider in six.itervalues(cls.cls_providers): */ - __pyx_t_9 = __pyx_f_19dependency_injector_10containers__check_provider_type(((PyObject *)__pyx_v_cls), __pyx_v_provider, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 400, __pyx_L1_error) + __pyx_t_9 = __pyx_f_19dependency_injector_10containers__check_provider_type(((PyObject *)__pyx_v_cls), __pyx_v_provider, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":399 + /* "dependency_injector/containers.pyx":438 * cls.__self__ = self * * for provider in six.itervalues(cls.providers): # <<<<<<<<<<<<<< @@ -10955,19 +12115,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":402 + /* "dependency_injector/containers.pyx":441 * _check_provider_type(cls, provider) * * for provider in six.itervalues(cls.cls_providers): # <<<<<<<<<<<<<< * if isinstance(provider, providers.CHILD_PROVIDERS): * provider.assign_parent(cls) */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_six); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_six); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -10982,16 +12142,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __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_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 441, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -10999,17 +12159,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 441, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 441, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -11019,7 +12179,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 402, __pyx_L1_error) + else __PYX_ERR(0, 441, __pyx_L1_error) } break; } @@ -11028,31 +12188,31 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":403 + /* "dependency_injector/containers.pyx":442 * * for provider in six.itervalues(cls.cls_providers): * if isinstance(provider, providers.CHILD_PROVIDERS): # <<<<<<<<<<<<<< * provider.assign_parent(cls) * */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_CHILD_PROVIDERS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_CHILD_PROVIDERS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = PyObject_IsInstance(__pyx_v_provider, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_5 = PyObject_IsInstance(__pyx_v_provider, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_12 = (__pyx_t_5 != 0); if (__pyx_t_12) { - /* "dependency_injector/containers.pyx":404 + /* "dependency_injector/containers.pyx":443 * for provider in six.itervalues(cls.cls_providers): * if isinstance(provider, providers.CHILD_PROVIDERS): * provider.assign_parent(cls) # <<<<<<<<<<<<<< * * return cls */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 404, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -11066,12 +12226,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_9 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, ((PyObject *)__pyx_v_cls)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_cls)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 404, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":403 + /* "dependency_injector/containers.pyx":442 * * for provider in six.itervalues(cls.cls_providers): * if isinstance(provider, providers.CHILD_PROVIDERS): # <<<<<<<<<<<<<< @@ -11080,7 +12240,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":402 + /* "dependency_injector/containers.pyx":441 * _check_provider_type(cls, provider) * * for provider in six.itervalues(cls.cls_providers): # <<<<<<<<<<<<<< @@ -11090,7 +12250,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":406 + /* "dependency_injector/containers.pyx":445 * provider.assign_parent(cls) * * return cls # <<<<<<<<<<<<<< @@ -11102,7 +12262,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_r = ((PyObject *)__pyx_v_cls); goto __pyx_L0; - /* "dependency_injector/containers.pyx":360 + /* "dependency_injector/containers.pyx":399 * """Declarative inversion of control container meta class.""" * * def __new__(type mcs, str class_name, tuple bases, dict attributes): # <<<<<<<<<<<<<< @@ -11141,7 +12301,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":408 +/* "dependency_injector/containers.pyx":447 * return cls * * def __setattr__(cls, str name, object value): # <<<<<<<<<<<<<< @@ -11188,17 +12348,17 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); __PYX_ERR(0, 408, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); __PYX_ERR(0, 447, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); __PYX_ERR(0, 408, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); __PYX_ERR(0, 447, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) __PYX_ERR(0, 408, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) __PYX_ERR(0, 447, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -11213,13 +12373,13 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 408, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 447, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DeclarativeContainerMetaClass.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 408, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 447, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_10containers_29DeclarativeContainerMetaClass_2__setattr__(__pyx_self, __pyx_v_cls, __pyx_v_name, __pyx_v_value); /* function exit code */ @@ -11247,19 +12407,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setattr__", 0); - /* "dependency_injector/containers.pyx":422 + /* "dependency_injector/containers.pyx":461 * :rtype: None * """ * if isinstance(value, providers.Provider) and name != '__self__': # <<<<<<<<<<<<<< * _check_provider_type(cls, value) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { @@ -11267,48 +12427,48 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_self, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_self, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 461, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "dependency_injector/containers.pyx":423 + /* "dependency_injector/containers.pyx":462 * """ * if isinstance(value, providers.Provider) and name != '__self__': * _check_provider_type(cls, value) # <<<<<<<<<<<<<< * * if isinstance(value, providers.CHILD_PROVIDERS): */ - __pyx_t_3 = __pyx_f_19dependency_injector_10containers__check_provider_type(__pyx_v_cls, __pyx_v_value, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_10containers__check_provider_type(__pyx_v_cls, __pyx_v_value, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":425 + /* "dependency_injector/containers.pyx":464 * _check_provider_type(cls, value) * * if isinstance(value, providers.CHILD_PROVIDERS): # <<<<<<<<<<<<<< * value.assign_parent(cls) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CHILD_PROVIDERS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CHILD_PROVIDERS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { - /* "dependency_injector/containers.pyx":426 + /* "dependency_injector/containers.pyx":465 * * if isinstance(value, providers.CHILD_PROVIDERS): * value.assign_parent(cls) # <<<<<<<<<<<<<< * * cls.providers[name] = value */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -11322,12 +12482,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_v_cls) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_cls); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":425 + /* "dependency_injector/containers.pyx":464 * _check_provider_type(cls, value) * * if isinstance(value, providers.CHILD_PROVIDERS): # <<<<<<<<<<<<<< @@ -11336,31 +12496,31 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":428 + /* "dependency_injector/containers.pyx":467 * value.assign_parent(cls) * * cls.providers[name] = value # <<<<<<<<<<<<<< * cls.cls_providers[name] = value * super(DeclarativeContainerMetaClass, cls).__setattr__(name, value) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 428, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 467, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":429 + /* "dependency_injector/containers.pyx":468 * * cls.providers[name] = value * cls.cls_providers[name] = value # <<<<<<<<<<<<<< * super(DeclarativeContainerMetaClass, cls).__setattr__(name, value) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 429, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":422 + /* "dependency_injector/containers.pyx":461 * :rtype: None * """ * if isinstance(value, providers.Provider) and name != '__self__': # <<<<<<<<<<<<<< @@ -11369,16 +12529,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":430 + /* "dependency_injector/containers.pyx":469 * cls.providers[name] = value * cls.cls_providers[name] = value * super(DeclarativeContainerMetaClass, cls).__setattr__(name, value) # <<<<<<<<<<<<<< * * def __delattr__(cls, str name): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DeclarativeContainerMetaClass_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DeclarativeContainerMetaClass_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); @@ -11386,10 +12546,10 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_cls); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_setattr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_setattr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -11407,7 +12567,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_name, __pyx_v_value}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -11415,13 +12575,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_name, __pyx_v_value}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -11432,14 +12592,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":408 + /* "dependency_injector/containers.pyx":447 * return cls * * def __setattr__(cls, str name, object value): # <<<<<<<<<<<<<< @@ -11463,7 +12623,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":432 +/* "dependency_injector/containers.pyx":471 * super(DeclarativeContainerMetaClass, cls).__setattr__(name, value) * * def __delattr__(cls, str name): # <<<<<<<<<<<<<< @@ -11507,11 +12667,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__delattr__", 1, 2, 2, 1); __PYX_ERR(0, 432, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__delattr__", 1, 2, 2, 1); __PYX_ERR(0, 471, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__delattr__") < 0)) __PYX_ERR(0, 432, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__delattr__") < 0)) __PYX_ERR(0, 471, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11524,13 +12684,13 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__delattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 432, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__delattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 471, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DeclarativeContainerMetaClass.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 432, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 471, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_10containers_29DeclarativeContainerMetaClass_4__delattr__(__pyx_self, __pyx_v_cls, __pyx_v_name); /* function exit code */ @@ -11556,16 +12716,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__delattr__", 0); - /* "dependency_injector/containers.pyx":443 + /* "dependency_injector/containers.pyx":482 * :rtype: None * """ * if name in cls.providers and name in cls.cls_providers: # <<<<<<<<<<<<<< * del cls.providers[name] * del cls.cls_providers[name] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 482, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -11573,40 +12733,40 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_1 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 482, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "dependency_injector/containers.pyx":444 + /* "dependency_injector/containers.pyx":483 * """ * if name in cls.providers and name in cls.cls_providers: * del cls.providers[name] # <<<<<<<<<<<<<< * del cls.cls_providers[name] * super(DeclarativeContainerMetaClass, cls).__delattr__(name) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_DelItem(__pyx_t_2, __pyx_v_name) < 0)) __PYX_ERR(0, 444, __pyx_L1_error) + if (unlikely(PyObject_DelItem(__pyx_t_2, __pyx_v_name) < 0)) __PYX_ERR(0, 483, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":445 + /* "dependency_injector/containers.pyx":484 * if name in cls.providers and name in cls.cls_providers: * del cls.providers[name] * del cls.cls_providers[name] # <<<<<<<<<<<<<< * super(DeclarativeContainerMetaClass, cls).__delattr__(name) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_DelItem(__pyx_t_2, __pyx_v_name) < 0)) __PYX_ERR(0, 445, __pyx_L1_error) + if (unlikely(PyObject_DelItem(__pyx_t_2, __pyx_v_name) < 0)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":443 + /* "dependency_injector/containers.pyx":482 * :rtype: None * """ * if name in cls.providers and name in cls.cls_providers: # <<<<<<<<<<<<<< @@ -11615,16 +12775,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":446 + /* "dependency_injector/containers.pyx":485 * del cls.providers[name] * del cls.cls_providers[name] * super(DeclarativeContainerMetaClass, cls).__delattr__(name) # <<<<<<<<<<<<<< * * @property */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DeclarativeContainerMetaClass_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DeclarativeContainerMetaClass_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); @@ -11632,10 +12792,10 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_cls); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_delattr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_delattr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -11650,12 +12810,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":432 + /* "dependency_injector/containers.pyx":471 * super(DeclarativeContainerMetaClass, cls).__setattr__(name, value) * * def __delattr__(cls, str name): # <<<<<<<<<<<<<< @@ -11678,7 +12838,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":449 +/* "dependency_injector/containers.pyx":488 * * @property * def dependencies(cls): # <<<<<<<<<<<<<< @@ -11723,7 +12883,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dependencies", 0); - /* "dependency_injector/containers.pyx":458 + /* "dependency_injector/containers.pyx":497 * dict[str, :py:class:`dependency_injector.providers.Provider`] * """ * return { # <<<<<<<<<<<<<< @@ -11732,19 +12892,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L5_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/containers.pyx":460 + /* "dependency_injector/containers.pyx":499 * return { * name: provider * for name, provider in cls.providers.items() # <<<<<<<<<<<<<< * if isinstance(provider, (providers.Dependency, providers.DependenciesContainer)) * } */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -11759,16 +12919,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L5_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 499, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -11776,17 +12936,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 499, __pyx_L5_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 499, __pyx_L5_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -11796,7 +12956,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 460, __pyx_L5_error) + else __PYX_ERR(0, 499, __pyx_L5_error) } break; } @@ -11808,7 +12968,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 460, __pyx_L5_error) + __PYX_ERR(0, 499, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -11821,15 +12981,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 499, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 460, __pyx_L5_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -11837,7 +12997,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 460, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 499, __pyx_L5_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_unpacking_done; @@ -11845,7 +13005,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 460, __pyx_L5_error) + __PYX_ERR(0, 499, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_name, __pyx_t_3); @@ -11853,21 +13013,21 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_provider, __pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/containers.pyx":461 + /* "dependency_injector/containers.pyx":500 * name: provider * for name, provider in cls.providers.items() * if isinstance(provider, (providers.Dependency, providers.DependenciesContainer)) # <<<<<<<<<<<<<< * } * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L5_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Dependency); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 461, __pyx_L5_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Dependency); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L5_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DependenciesContainer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DependenciesContainer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = PyObject_IsInstance(__pyx_8genexpr4__pyx_v_provider, __pyx_t_7); @@ -11886,16 +13046,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { - /* "dependency_injector/containers.pyx":459 + /* "dependency_injector/containers.pyx":498 * """ * return { * name: provider # <<<<<<<<<<<<<< * for name, provider in cls.providers.items() * if isinstance(provider, (providers.Dependency, providers.DependenciesContainer)) */ - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr4__pyx_v_name, (PyObject*)__pyx_8genexpr4__pyx_v_provider))) __PYX_ERR(0, 459, __pyx_L5_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr4__pyx_v_name, (PyObject*)__pyx_8genexpr4__pyx_v_provider))) __PYX_ERR(0, 498, __pyx_L5_error) - /* "dependency_injector/containers.pyx":461 + /* "dependency_injector/containers.pyx":500 * name: provider * for name, provider in cls.providers.items() * if isinstance(provider, (providers.Dependency, providers.DependenciesContainer)) # <<<<<<<<<<<<<< @@ -11904,7 +13064,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":460 + /* "dependency_injector/containers.pyx":499 * return { * name: provider * for name, provider in cls.providers.items() # <<<<<<<<<<<<<< @@ -11926,7 +13086,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":449 + /* "dependency_injector/containers.pyx":488 * * @property * def dependencies(cls): # <<<<<<<<<<<<<< @@ -11953,7 +13113,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } static PyObject *__pyx_gb_19dependency_injector_10containers_29DeclarativeContainerMetaClass_10generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/containers.pyx":464 +/* "dependency_injector/containers.pyx":503 * } * * def traverse(cls, types=None): # <<<<<<<<<<<<<< @@ -12002,7 +13162,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "traverse") < 0)) __PYX_ERR(0, 464, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "traverse") < 0)) __PYX_ERR(0, 503, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -12018,7 +13178,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("traverse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 464, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("traverse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 503, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DeclarativeContainerMetaClass.traverse", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12043,7 +13203,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_1_traverse *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 464, __pyx_L1_error) + __PYX_ERR(0, 503, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -12054,7 +13214,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(__pyx_cur_scope->__pyx_v_types); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_types); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_10containers_29DeclarativeContainerMetaClass_10generator1, __pyx_codeobj__6, (PyObject *) __pyx_cur_scope, __pyx_n_s_traverse, __pyx_n_s_DeclarativeContainerMetaClass_tr, __pyx_n_s_dependency_injector_containers); if (unlikely(!gen)) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_10containers_29DeclarativeContainerMetaClass_10generator1, __pyx_codeobj__7, (PyObject *) __pyx_cur_scope, __pyx_n_s_traverse, __pyx_n_s_DeclarativeContainerMetaClass_tr, __pyx_n_s_dependency_injector_containers); if (unlikely(!gen)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -12091,23 +13251,23 @@ static PyObject *__pyx_gb_19dependency_injector_10containers_29DeclarativeContai return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 464, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 503, __pyx_L1_error) - /* "dependency_injector/containers.pyx":466 + /* "dependency_injector/containers.pyx":505 * def traverse(cls, types=None): * """Return providers traversal generator.""" * yield from providers.traverse(*cls.providers.values(), types=types) # <<<<<<<<<<<<<< * * def resolve_provider_name(cls, provider): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_traverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_traverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 466, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -12122,16 +13282,16 @@ static PyObject *__pyx_gb_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 466, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_types, __pyx_cur_scope->__pyx_v_types) < 0) __PYX_ERR(0, 466, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_types, __pyx_cur_scope->__pyx_v_types) < 0) __PYX_ERR(0, 505, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -12147,17 +13307,17 @@ static PyObject *__pyx_gb_19dependency_injector_10containers_29DeclarativeContai __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 466, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 505, __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, 466, __pyx_L1_error) + else __PYX_ERR(0, 505, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/containers.pyx":464 + /* "dependency_injector/containers.pyx":503 * } * * def traverse(cls, types=None): # <<<<<<<<<<<<<< @@ -12185,7 +13345,7 @@ static PyObject *__pyx_gb_19dependency_injector_10containers_29DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":468 +/* "dependency_injector/containers.pyx":507 * yield from providers.traverse(*cls.providers.values(), types=types) * * def resolve_provider_name(cls, provider): # <<<<<<<<<<<<<< @@ -12229,11 +13389,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("resolve_provider_name", 1, 2, 2, 1); __PYX_ERR(0, 468, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve_provider_name", 1, 2, 2, 1); __PYX_ERR(0, 507, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_provider_name") < 0)) __PYX_ERR(0, 468, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolve_provider_name") < 0)) __PYX_ERR(0, 507, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -12246,7 +13406,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("resolve_provider_name", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 468, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("resolve_provider_name", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 507, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DeclarativeContainerMetaClass.resolve_provider_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12281,16 +13441,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resolve_provider_name", 0); - /* "dependency_injector/containers.pyx":470 + /* "dependency_injector/containers.pyx":509 * def resolve_provider_name(cls, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in cls.providers.items(): # <<<<<<<<<<<<<< * if container_provider is provider: * return provider_name */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __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, 470, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -12305,16 +13465,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __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, 470, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __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, 470, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 509, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -12322,17 +13482,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 509, __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, 470, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 509, __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, 470, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -12342,7 +13502,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 470, __pyx_L1_error) + else __PYX_ERR(0, 509, __pyx_L1_error) } break; } @@ -12354,7 +13514,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 470, __pyx_L1_error) + __PYX_ERR(0, 509, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -12367,15 +13527,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 509, __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, 470, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 509, __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; @@ -12383,7 +13543,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 470, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 509, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -12391,7 +13551,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 470, __pyx_L1_error) + __PYX_ERR(0, 509, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_provider_name, __pyx_t_2); @@ -12399,7 +13559,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_XDECREF_SET(__pyx_v_container_provider, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":471 + /* "dependency_injector/containers.pyx":510 * """Try to resolve provider name.""" * for provider_name, container_provider in cls.providers.items(): * if container_provider is provider: # <<<<<<<<<<<<<< @@ -12410,7 +13570,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "dependency_injector/containers.pyx":472 + /* "dependency_injector/containers.pyx":511 * for provider_name, container_provider in cls.providers.items(): * if container_provider is provider: * return provider_name # <<<<<<<<<<<<<< @@ -12423,7 +13583,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":471 + /* "dependency_injector/containers.pyx":510 * """Try to resolve provider name.""" * for provider_name, container_provider in cls.providers.items(): * if container_provider is provider: # <<<<<<<<<<<<<< @@ -12432,7 +13592,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":470 + /* "dependency_injector/containers.pyx":509 * def resolve_provider_name(cls, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in cls.providers.items(): # <<<<<<<<<<<<<< @@ -12442,19 +13602,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } /*else*/ { - /* "dependency_injector/containers.pyx":474 + /* "dependency_injector/containers.pyx":513 * return provider_name * else: * raise errors.Error(f'Can not resolve name for provider "{provider}"') # <<<<<<<<<<<<<< * * @property */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 474, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = 0; __pyx_t_12 = 127; @@ -12462,7 +13622,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_11 += 35; __Pyx_GIVEREF(__pyx_kp_u_Can_not_resolve_name_for_provide); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Can_not_resolve_name_for_provide); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_provider, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_provider, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_12; __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); @@ -12473,7 +13633,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_11 += 1; __Pyx_GIVEREF(__pyx_kp_u__4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__4); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -12489,15 +13649,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 474, __pyx_L1_error) + __PYX_ERR(0, 513, __pyx_L1_error) } - /* "dependency_injector/containers.pyx":470 + /* "dependency_injector/containers.pyx":509 * def resolve_provider_name(cls, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in cls.providers.items(): # <<<<<<<<<<<<<< @@ -12506,7 +13666,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":468 + /* "dependency_injector/containers.pyx":507 * yield from providers.traverse(*cls.providers.values(), types=types) * * def resolve_provider_name(cls, provider): # <<<<<<<<<<<<<< @@ -12531,7 +13691,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":477 +/* "dependency_injector/containers.pyx":516 * * @property * def parent_name(cls): # <<<<<<<<<<<<<< @@ -12563,7 +13723,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parent_name", 0); - /* "dependency_injector/containers.pyx":479 + /* "dependency_injector/containers.pyx":518 * def parent_name(cls): * """Return parent name.""" * return cls.__name__ # <<<<<<<<<<<<<< @@ -12571,13 +13731,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai * @staticmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":477 + /* "dependency_injector/containers.pyx":516 * * @property * def parent_name(cls): # <<<<<<<<<<<<<< @@ -12596,7 +13756,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":482 +/* "dependency_injector/containers.pyx":521 * * @staticmethod * def __fetch_self(attributes): # <<<<<<<<<<<<<< @@ -12642,7 +13802,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__fetch_self", 0); - /* "dependency_injector/containers.pyx":483 + /* "dependency_injector/containers.pyx":522 * @staticmethod * def __fetch_self(attributes): * self = None # <<<<<<<<<<<<<< @@ -12652,26 +13812,26 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(Py_None); __pyx_v_self = Py_None; - /* "dependency_injector/containers.pyx":484 + /* "dependency_injector/containers.pyx":523 * def __fetch_self(attributes): * self = None * alt_names = [] # <<<<<<<<<<<<<< * * for name, value in attributes.items(): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_alt_names = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":486 + /* "dependency_injector/containers.pyx":525 * alt_names = [] * * for name, value in attributes.items(): # <<<<<<<<<<<<<< * if not isinstance(value, providers.Self): * continue */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -12685,16 +13845,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -12702,17 +13862,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 525, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 525, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -12722,7 +13882,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 486, __pyx_L1_error) + else __PYX_ERR(0, 525, __pyx_L1_error) } break; } @@ -12734,7 +13894,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 486, __pyx_L1_error) + __PYX_ERR(0, 525, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -12747,15 +13907,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 525, __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, 486, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 525, __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; @@ -12763,7 +13923,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_GOTREF(__pyx_t_3); 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, 486, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 525, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -12771,7 +13931,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 486, __pyx_L1_error) + __PYX_ERR(0, 525, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); @@ -12779,24 +13939,24 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":487 + /* "dependency_injector/containers.pyx":526 * * for name, value in attributes.items(): * if not isinstance(value, providers.Self): # <<<<<<<<<<<<<< * continue * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 487, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = PyObject_IsInstance(__pyx_v_value, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 487, __pyx_L1_error) + __pyx_t_9 = PyObject_IsInstance(__pyx_v_value, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 526, __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/containers.pyx":488 + /* "dependency_injector/containers.pyx":527 * for name, value in attributes.items(): * if not isinstance(value, providers.Self): * continue # <<<<<<<<<<<<<< @@ -12805,7 +13965,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ goto __pyx_L3_continue; - /* "dependency_injector/containers.pyx":487 + /* "dependency_injector/containers.pyx":526 * * for name, value in attributes.items(): * if not isinstance(value, providers.Self): # <<<<<<<<<<<<<< @@ -12814,7 +13974,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":490 + /* "dependency_injector/containers.pyx":529 * continue * * if self is not None and value is not self: # <<<<<<<<<<<<<< @@ -12834,16 +13994,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_L9_bool_binop_done:; if (unlikely(__pyx_t_10)) { - /* "dependency_injector/containers.pyx":491 + /* "dependency_injector/containers.pyx":530 * * if self is not None and value is not self: * raise errors.Error('Container can have only one "Self" provider') # <<<<<<<<<<<<<< * * if name != '__self__': */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -12858,14 +14018,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_kp_s_Container_can_have_only_one_Self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Container_can_have_only_one_Self); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 491, __pyx_L1_error) + __PYX_ERR(0, 530, __pyx_L1_error) - /* "dependency_injector/containers.pyx":490 + /* "dependency_injector/containers.pyx":529 * continue * * if self is not None and value is not self: # <<<<<<<<<<<<<< @@ -12874,26 +14034,26 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":493 + /* "dependency_injector/containers.pyx":532 * raise errors.Error('Container can have only one "Self" provider') * * if name != '__self__': # <<<<<<<<<<<<<< * alt_names.append(name) * */ - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_self, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_self, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 532, __pyx_L1_error) if (__pyx_t_10) { - /* "dependency_injector/containers.pyx":494 + /* "dependency_injector/containers.pyx":533 * * if name != '__self__': * alt_names.append(name) # <<<<<<<<<<<<<< * * self = value */ - __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_alt_names, __pyx_v_name); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_alt_names, __pyx_v_name); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 533, __pyx_L1_error) - /* "dependency_injector/containers.pyx":493 + /* "dependency_injector/containers.pyx":532 * raise errors.Error('Container can have only one "Self" provider') * * if name != '__self__': # <<<<<<<<<<<<<< @@ -12902,7 +14062,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":496 + /* "dependency_injector/containers.pyx":535 * alt_names.append(name) * * self = value # <<<<<<<<<<<<<< @@ -12912,7 +14072,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __Pyx_INCREF(__pyx_v_value); __Pyx_DECREF_SET(__pyx_v_self, __pyx_v_value); - /* "dependency_injector/containers.pyx":486 + /* "dependency_injector/containers.pyx":525 * alt_names = [] * * for name, value in attributes.items(): # <<<<<<<<<<<<<< @@ -12923,24 +14083,24 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":498 + /* "dependency_injector/containers.pyx":537 * self = value * * if self: # <<<<<<<<<<<<<< * self.set_alt_names(alt_names) * */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 498, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 537, __pyx_L1_error) if (__pyx_t_10) { - /* "dependency_injector/containers.pyx":499 + /* "dependency_injector/containers.pyx":538 * * if self: * self.set_alt_names(alt_names) # <<<<<<<<<<<<<< * * return self */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_alt_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 499, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_alt_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -12954,12 +14114,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_v_alt_names) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_alt_names); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":498 + /* "dependency_injector/containers.pyx":537 * self = value * * if self: # <<<<<<<<<<<<<< @@ -12968,7 +14128,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai */ } - /* "dependency_injector/containers.pyx":501 + /* "dependency_injector/containers.pyx":540 * self.set_alt_names(alt_names) * * return self # <<<<<<<<<<<<<< @@ -12980,7 +14140,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai __pyx_r = __pyx_v_self; goto __pyx_L0; - /* "dependency_injector/containers.pyx":482 + /* "dependency_injector/containers.pyx":521 * * @staticmethod * def __fetch_self(attributes): # <<<<<<<<<<<<<< @@ -13007,7 +14167,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_29DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":567 +/* "dependency_injector/containers.pyx":606 * """ * * def __new__(cls, **overriding_providers): # <<<<<<<<<<<<<< @@ -13049,7 +14209,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_20DeclarativeContai else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_overriding_providers, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 567, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_overriding_providers, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 606, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -13060,7 +14220,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_20DeclarativeContai } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 567, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_overriding_providers); __pyx_v_overriding_providers = 0; __Pyx_AddTraceback("dependency_injector.containers.DeclarativeContainer.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -13097,14 +14257,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__new__", 0); - /* "dependency_injector/containers.pyx":573 + /* "dependency_injector/containers.pyx":612 * :rtype: :py:class:`DynamicContainer` * """ * container = cls.instance_type() # <<<<<<<<<<<<<< * container.provider_type = cls.provider_type * container.declarative_parent = cls */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_instance_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_instance_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -13118,63 +14278,63 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_container = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":574 + /* "dependency_injector/containers.pyx":613 * """ * container = cls.instance_type() * container.provider_type = cls.provider_type # <<<<<<<<<<<<<< * container.declarative_parent = cls * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_provider_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_provider_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_container, __pyx_n_s_provider_type, __pyx_t_1) < 0) __PYX_ERR(0, 574, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_container, __pyx_n_s_provider_type, __pyx_t_1) < 0) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":575 + /* "dependency_injector/containers.pyx":614 * container = cls.instance_type() * container.provider_type = cls.provider_type * container.declarative_parent = cls # <<<<<<<<<<<<<< * * copied_providers = providers.deepcopy({ **cls.providers, **{'@@self@@': cls.__self__}}) */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_container, __pyx_n_s_declarative_parent, __pyx_v_cls) < 0) __PYX_ERR(0, 575, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_container, __pyx_n_s_declarative_parent, __pyx_v_cls) < 0) __PYX_ERR(0, 614, __pyx_L1_error) - /* "dependency_injector/containers.pyx":577 + /* "dependency_injector/containers.pyx":616 * container.declarative_parent = cls * * copied_providers = providers.deepcopy({ **cls.providers, **{'@@self@@': cls.__self__}}) # <<<<<<<<<<<<<< * copied_self = copied_providers.pop('@@self@@') * copied_self.set_container(container) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 577, __pyx_L1_error) + __PYX_ERR(0, 616, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_t_4))) { - __pyx_t_2 = PyDict_Copy(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_self_3, __pyx_t_4) < 0) __PYX_ERR(0, 577, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s_self_3, __pyx_t_4) < 0) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -13189,20 +14349,20 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_copied_providers = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":578 + /* "dependency_injector/containers.pyx":617 * * copied_providers = providers.deepcopy({ **cls.providers, **{'@@self@@': cls.__self__}}) * copied_self = copied_providers.pop('@@self@@') # <<<<<<<<<<<<<< * copied_self.set_container(container) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied_providers, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied_providers, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -13216,20 +14376,20 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_self_3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_self_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_copied_self = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":579 + /* "dependency_injector/containers.pyx":618 * copied_providers = providers.deepcopy({ **cls.providers, **{'@@self@@': cls.__self__}}) * copied_self = copied_providers.pop('@@self@@') * copied_self.set_container(container) # <<<<<<<<<<<<<< * * container.__self__ = copied_self */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied_self, __pyx_n_s_set_container); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied_self, __pyx_n_s_set_container); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -13243,36 +14403,36 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_container) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_container); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":581 + /* "dependency_injector/containers.pyx":620 * copied_self.set_container(container) * * container.__self__ = copied_self # <<<<<<<<<<<<<< * for name in copied_self.alt_names: * container.set_provider(name, copied_self) */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_container, __pyx_n_s_self, __pyx_v_copied_self) < 0) __PYX_ERR(0, 581, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_container, __pyx_n_s_self, __pyx_v_copied_self) < 0) __PYX_ERR(0, 620, __pyx_L1_error) - /* "dependency_injector/containers.pyx":582 + /* "dependency_injector/containers.pyx":621 * * container.__self__ = copied_self * for name in copied_self.alt_names: # <<<<<<<<<<<<<< * container.set_provider(name, copied_self) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied_self, __pyx_n_s_alt_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied_self, __pyx_n_s_alt_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); 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_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -13280,17 +14440,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 621, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 621, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -13300,7 +14460,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 582, __pyx_L1_error) + else __PYX_ERR(0, 621, __pyx_L1_error) } break; } @@ -13309,14 +14469,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":583 + /* "dependency_injector/containers.pyx":622 * container.__self__ = copied_self * for name in copied_self.alt_names: * container.set_provider(name, copied_self) # <<<<<<<<<<<<<< * * for name, provider in copied_providers.items(): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_set_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_set_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_7 = 0; @@ -13333,7 +14493,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_copied_self}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -13341,13 +14501,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_copied_self}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -13358,14 +14518,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_INCREF(__pyx_v_copied_self); __Pyx_GIVEREF(__pyx_v_copied_self); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_copied_self); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":582 + /* "dependency_injector/containers.pyx":621 * * container.__self__ = copied_self * for name in copied_self.alt_names: # <<<<<<<<<<<<<< @@ -13375,14 +14535,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":585 + /* "dependency_injector/containers.pyx":624 * container.set_provider(name, copied_self) * * for name, provider in copied_providers.items(): # <<<<<<<<<<<<<< * container.set_provider(name, provider) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied_providers, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied_providers, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -13396,16 +14556,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __pyx_t_3 = (__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_3)) __PYX_ERR(0, 585, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 624, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -13413,17 +14573,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 624, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 624, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -13433,7 +14593,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 585, __pyx_L1_error) + else __PYX_ERR(0, 624, __pyx_L1_error) } break; } @@ -13445,7 +14605,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 585, __pyx_L1_error) + __PYX_ERR(0, 624, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -13458,15 +14618,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -13474,7 +14634,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_8)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 585, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 624, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_unpacking_done; @@ -13482,7 +14642,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 585, __pyx_L1_error) + __PYX_ERR(0, 624, __pyx_L1_error) __pyx_L8_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); @@ -13490,14 +14650,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/containers.pyx":586 + /* "dependency_injector/containers.pyx":625 * * for name, provider in copied_providers.items(): * container.set_provider(name, provider) # <<<<<<<<<<<<<< * * container.override_providers(**overriding_providers) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_set_provider); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_set_provider); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = NULL; __pyx_t_7 = 0; @@ -13514,7 +14674,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_name, __pyx_v_provider}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -13522,13 +14682,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_name, __pyx_v_provider}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -13539,14 +14699,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_INCREF(__pyx_v_provider); __Pyx_GIVEREF(__pyx_v_provider); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_provider); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":585 + /* "dependency_injector/containers.pyx":624 * container.set_provider(name, copied_self) * * for name, provider in copied_providers.items(): # <<<<<<<<<<<<<< @@ -13556,28 +14716,28 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":588 + /* "dependency_injector/containers.pyx":627 * container.set_provider(name, provider) * * container.override_providers(**overriding_providers) # <<<<<<<<<<<<<< * container.apply_container_providers_overridings() * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_override_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_override_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_overriding_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_overriding_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":589 + /* "dependency_injector/containers.pyx":628 * * container.override_providers(**overriding_providers) * container.apply_container_providers_overridings() # <<<<<<<<<<<<<< * * return container */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_apply_container_providers_overri); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_apply_container_providers_overri); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -13591,12 +14751,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":591 + /* "dependency_injector/containers.pyx":630 * container.apply_container_providers_overridings() * * return container # <<<<<<<<<<<<<< @@ -13608,7 +14768,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __pyx_r = __pyx_v_container; goto __pyx_L0; - /* "dependency_injector/containers.pyx":567 + /* "dependency_injector/containers.pyx":606 * """ * * def __new__(cls, **overriding_providers): # <<<<<<<<<<<<<< @@ -13636,7 +14796,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":594 +/* "dependency_injector/containers.pyx":633 * * @classmethod * def override(cls, object overriding): # <<<<<<<<<<<<<< @@ -13680,11 +14840,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_20DeclarativeContai case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_overriding)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("override", 1, 2, 2, 1); __PYX_ERR(0, 594, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("override", 1, 2, 2, 1); __PYX_ERR(0, 633, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "override") < 0)) __PYX_ERR(0, 594, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "override") < 0)) __PYX_ERR(0, 633, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -13697,7 +14857,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_20DeclarativeContai } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("override", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 594, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("override", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 633, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.DeclarativeContainer.override", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -13734,38 +14894,38 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/containers.pyx":605 + /* "dependency_injector/containers.pyx":644 * :rtype: None * """ * if issubclass(cls, overriding): # <<<<<<<<<<<<<< * raise errors.Error('Container {0} could not be overridden ' * 'with itself or its subclasses'.format(cls)) */ - __pyx_t_1 = PyObject_IsSubclass(__pyx_v_cls, __pyx_v_overriding); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_t_1 = PyObject_IsSubclass(__pyx_v_cls, __pyx_v_overriding); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 644, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/containers.pyx":606 + /* "dependency_injector/containers.pyx":645 * """ * if issubclass(cls, overriding): * raise errors.Error('Container {0} could not be overridden ' # <<<<<<<<<<<<<< * 'with itself or its subclasses'.format(cls)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 606, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":607 + /* "dependency_injector/containers.pyx":646 * if issubclass(cls, overriding): * raise errors.Error('Container {0} could not be overridden ' * 'with itself or its subclasses'.format(cls)) # <<<<<<<<<<<<<< * * cls.overridden += (overriding,) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Container_0_could_not_be_overrid_2, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Container_0_could_not_be_overrid_2, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -13779,7 +14939,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_cls) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_cls); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 607, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -13795,14 +14955,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 606, __pyx_L1_error) + __PYX_ERR(0, 645, __pyx_L1_error) - /* "dependency_injector/containers.pyx":605 + /* "dependency_injector/containers.pyx":644 * :rtype: None * """ * if issubclass(cls, overriding): # <<<<<<<<<<<<<< @@ -13811,40 +14971,40 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai */ } - /* "dependency_injector/containers.pyx":609 + /* "dependency_injector/containers.pyx":648 * 'with itself or its subclasses'.format(cls)) * * cls.overridden += (overriding,) # <<<<<<<<<<<<<< * * for name, provider in six.iteritems(overriding.cls_providers): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_overridden); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_overridden); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_overriding); __Pyx_GIVEREF(__pyx_v_overriding); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_overriding); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_cls, __pyx_n_s_overridden, __pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_cls, __pyx_n_s_overridden, __pyx_t_4) < 0) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":611 + /* "dependency_injector/containers.pyx":650 * cls.overridden += (overriding,) * * for name, provider in six.iteritems(overriding.cls_providers): # <<<<<<<<<<<<<< * try: * getattr(cls, name).override(provider) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_six); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 611, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_six); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_overriding, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_overriding, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -13859,16 +15019,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __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_4)) __PYX_ERR(0, 611, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 650, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -13876,17 +15036,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 650, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 650, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -13896,7 +15056,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 611, __pyx_L1_error) + else __PYX_ERR(0, 650, __pyx_L1_error) } break; } @@ -13908,7 +15068,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 611, __pyx_L1_error) + __PYX_ERR(0, 650, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -13921,15 +15081,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __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, 611, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -13937,7 +15097,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_10(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_7), 2) < 0) __PYX_ERR(0, 611, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_7), 2) < 0) __PYX_ERR(0, 650, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; @@ -13945,7 +15105,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 611, __pyx_L1_error) + __PYX_ERR(0, 650, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -13953,7 +15113,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":612 + /* "dependency_injector/containers.pyx":651 * * for name, provider in six.iteritems(overriding.cls_providers): * try: # <<<<<<<<<<<<<< @@ -13969,16 +15129,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "dependency_injector/containers.pyx":613 + /* "dependency_injector/containers.pyx":652 * for name, provider in six.iteritems(overriding.cls_providers): * try: * getattr(cls, name).override(provider) # <<<<<<<<<<<<<< * except AttributeError: * pass */ - __pyx_t_6 = __Pyx_GetAttr(__pyx_v_cls, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L8_error) + __pyx_t_6 = __Pyx_GetAttr(__pyx_v_cls, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 652, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 613, __pyx_L8_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 652, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -13993,12 +15153,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_provider); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 613, __pyx_L8_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 652, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":612 + /* "dependency_injector/containers.pyx":651 * * for name, provider in six.iteritems(overriding.cls_providers): * try: # <<<<<<<<<<<<<< @@ -14016,7 +15176,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/containers.pyx":614 + /* "dependency_injector/containers.pyx":653 * try: * getattr(cls, name).override(provider) * except AttributeError: # <<<<<<<<<<<<<< @@ -14031,7 +15191,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai goto __pyx_L10_except_error; __pyx_L10_except_error:; - /* "dependency_injector/containers.pyx":612 + /* "dependency_injector/containers.pyx":651 * * for name, provider in six.iteritems(overriding.cls_providers): * try: # <<<<<<<<<<<<<< @@ -14051,7 +15211,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __pyx_L15_try_end:; } - /* "dependency_injector/containers.pyx":611 + /* "dependency_injector/containers.pyx":650 * cls.overridden += (overriding,) * * for name, provider in six.iteritems(overriding.cls_providers): # <<<<<<<<<<<<<< @@ -14061,7 +15221,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":594 + /* "dependency_injector/containers.pyx":633 * * @classmethod * def override(cls, object overriding): # <<<<<<<<<<<<<< @@ -14088,7 +15248,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":618 +/* "dependency_injector/containers.pyx":657 * * @classmethod * def reset_last_overriding(cls): # <<<<<<<<<<<<<< @@ -14129,33 +15289,33 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_last_overriding", 0); - /* "dependency_injector/containers.pyx":623 + /* "dependency_injector/containers.pyx":662 * :rtype: None * """ * if not cls.overridden: # <<<<<<<<<<<<<< * raise errors.Error('Container {0} is not overridden'.format(cls)) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (unlikely(__pyx_t_3)) { - /* "dependency_injector/containers.pyx":624 + /* "dependency_injector/containers.pyx":663 * """ * if not cls.overridden: * raise errors.Error('Container {0} is not overridden'.format(cls)) # <<<<<<<<<<<<<< * * cls.overridden = cls.overridden[:-1] */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Container_0_is_not_overridden, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Container_0_is_not_overridden, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -14169,7 +15329,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_cls) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_cls); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -14185,14 +15345,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 624, __pyx_L1_error) + __PYX_ERR(0, 663, __pyx_L1_error) - /* "dependency_injector/containers.pyx":623 + /* "dependency_injector/containers.pyx":662 * :rtype: None * """ * if not cls.overridden: # <<<<<<<<<<<<<< @@ -14201,34 +15361,34 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai */ } - /* "dependency_injector/containers.pyx":626 + /* "dependency_injector/containers.pyx":665 * raise errors.Error('Container {0} is not overridden'.format(cls)) * * cls.overridden = cls.overridden[:-1] # <<<<<<<<<<<<<< * * for provider in six.itervalues(cls.providers): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1L, NULL, NULL, &__pyx_slice__3, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1L, NULL, NULL, &__pyx_slice__3, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_cls, __pyx_n_s_overridden, __pyx_t_5) < 0) __PYX_ERR(0, 626, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_cls, __pyx_n_s_overridden, __pyx_t_5) < 0) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/containers.pyx":628 + /* "dependency_injector/containers.pyx":667 * cls.overridden = cls.overridden[:-1] * * for provider in six.itervalues(cls.providers): # <<<<<<<<<<<<<< * provider.reset_last_overriding() * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -14243,16 +15403,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 628, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_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_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 667, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -14260,17 +15420,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 667, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 667, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -14280,7 +15440,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 628, __pyx_L1_error) + else __PYX_ERR(0, 667, __pyx_L1_error) } break; } @@ -14289,14 +15449,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/containers.pyx":629 + /* "dependency_injector/containers.pyx":668 * * for provider in six.itervalues(cls.providers): * provider.reset_last_overriding() # <<<<<<<<<<<<<< * * @classmethod */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -14310,12 +15470,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/containers.pyx":628 + /* "dependency_injector/containers.pyx":667 * cls.overridden = cls.overridden[:-1] * * for provider in six.itervalues(cls.providers): # <<<<<<<<<<<<<< @@ -14325,7 +15485,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":618 + /* "dependency_injector/containers.pyx":657 * * @classmethod * def reset_last_overriding(cls): # <<<<<<<<<<<<<< @@ -14351,7 +15511,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":632 +/* "dependency_injector/containers.pyx":671 * * @classmethod * def reset_override(cls): # <<<<<<<<<<<<<< @@ -14389,31 +15549,31 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_override", 0); - /* "dependency_injector/containers.pyx":637 + /* "dependency_injector/containers.pyx":676 * :rtype: None * """ * cls.overridden = tuple() # <<<<<<<<<<<<<< * * for provider in six.itervalues(cls.providers): */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_cls, __pyx_n_s_overridden, __pyx_t_1) < 0) __PYX_ERR(0, 637, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_cls, __pyx_n_s_overridden, __pyx_t_1) < 0) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":639 + /* "dependency_injector/containers.pyx":678 * cls.overridden = tuple() * * for provider in six.itervalues(cls.providers): # <<<<<<<<<<<<<< * provider.reset_override() * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -14428,16 +15588,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __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_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -14445,17 +15605,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 678, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 678, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -14465,7 +15625,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 639, __pyx_L1_error) + else __PYX_ERR(0, 678, __pyx_L1_error) } break; } @@ -14474,14 +15634,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":640 + /* "dependency_injector/containers.pyx":679 * * for provider in six.itervalues(cls.providers): * provider.reset_override() # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -14495,12 +15655,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":639 + /* "dependency_injector/containers.pyx":678 * cls.overridden = tuple() * * for provider in six.itervalues(cls.providers): # <<<<<<<<<<<<<< @@ -14510,7 +15670,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":632 + /* "dependency_injector/containers.pyx":671 * * @classmethod * def reset_override(cls): # <<<<<<<<<<<<<< @@ -14535,7 +15695,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_20DeclarativeContai return __pyx_r; } -/* "dependency_injector/containers.pyx":645 +/* "dependency_injector/containers.pyx":684 * class SingletonResetContext: * * def __init__(self, container): # <<<<<<<<<<<<<< @@ -14578,11 +15738,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_21SingletonResetCon case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_container)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 645, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 684, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 645, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 684, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -14595,7 +15755,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_21SingletonResetCon } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 645, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 684, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.SingletonResetContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -14616,16 +15776,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_21SingletonResetCon int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/containers.pyx":646 + /* "dependency_injector/containers.pyx":685 * * def __init__(self, container): * self._container = container # <<<<<<<<<<<<<< * * def __enter__(self): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_container_2, __pyx_v_container) < 0) __PYX_ERR(0, 646, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_container_2, __pyx_v_container) < 0) __PYX_ERR(0, 685, __pyx_L1_error) - /* "dependency_injector/containers.pyx":645 + /* "dependency_injector/containers.pyx":684 * class SingletonResetContext: * * def __init__(self, container): # <<<<<<<<<<<<<< @@ -14645,7 +15805,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_21SingletonResetCon return __pyx_r; } -/* "dependency_injector/containers.pyx":648 +/* "dependency_injector/containers.pyx":687 * self._container = container * * def __enter__(self): # <<<<<<<<<<<<<< @@ -14676,7 +15836,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_21SingletonResetCon int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__enter__", 0); - /* "dependency_injector/containers.pyx":649 + /* "dependency_injector/containers.pyx":688 * * def __enter__(self): * return self._container # <<<<<<<<<<<<<< @@ -14684,13 +15844,13 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_21SingletonResetCon * def __exit__(self, *_): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_container_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_container_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/containers.pyx":648 + /* "dependency_injector/containers.pyx":687 * self._container = container * * def __enter__(self): # <<<<<<<<<<<<<< @@ -14709,7 +15869,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_21SingletonResetCon return __pyx_r; } -/* "dependency_injector/containers.pyx":651 +/* "dependency_injector/containers.pyx":690 * return self._container * * def __exit__(self, *_): # <<<<<<<<<<<<<< @@ -14759,7 +15919,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_21SingletonResetCon } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__exit__") < 0)) __PYX_ERR(0, 651, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__exit__") < 0)) __PYX_ERR(0, 690, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -14770,7 +15930,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_21SingletonResetCon } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 651, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 690, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__); __pyx_v__ = 0; __Pyx_AddTraceback("dependency_injector.containers.SingletonResetContext.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -14796,16 +15956,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_21SingletonResetCon int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "dependency_injector/containers.pyx":652 + /* "dependency_injector/containers.pyx":691 * * def __exit__(self, *_): * self._container.reset_singletons() # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_container_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_container_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reset_singletons); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reset_singletons); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -14820,12 +15980,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_21SingletonResetCon } __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, 652, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":651 + /* "dependency_injector/containers.pyx":690 * return self._container * * def __exit__(self, *_): # <<<<<<<<<<<<<< @@ -14848,7 +16008,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_21SingletonResetCon return __pyx_r; } -/* "dependency_injector/containers.pyx":655 +/* "dependency_injector/containers.pyx":694 * * * def override(object container): # <<<<<<<<<<<<<< @@ -14871,7 +16031,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_5override(PyObject return __pyx_r; } -/* "dependency_injector/containers.pyx":665 +/* "dependency_injector/containers.pyx":704 * :rtype: callable(:py:class:`DeclarativeContainer`) * """ * def _decorator(object overriding_container): # <<<<<<<<<<<<<< @@ -14909,15 +16069,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_8override__decorato __pyx_outer_scope = (struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_2_override *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "dependency_injector/containers.pyx":667 + /* "dependency_injector/containers.pyx":706 * def _decorator(object overriding_container): * """Overriding decorator.""" * container.override(overriding_container) # <<<<<<<<<<<<<< * return overriding_container * return _decorator */ - if (unlikely(!__pyx_cur_scope->__pyx_v_container)) { __Pyx_RaiseClosureNameError("container"); __PYX_ERR(0, 667, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_container, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_container)) { __Pyx_RaiseClosureNameError("container"); __PYX_ERR(0, 706, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_container, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -14931,12 +16091,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_8override__decorato } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_overriding_container) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_overriding_container); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":668 + /* "dependency_injector/containers.pyx":707 * """Overriding decorator.""" * container.override(overriding_container) * return overriding_container # <<<<<<<<<<<<<< @@ -14948,7 +16108,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_8override__decorato __pyx_r = __pyx_v_overriding_container; goto __pyx_L0; - /* "dependency_injector/containers.pyx":665 + /* "dependency_injector/containers.pyx":704 * :rtype: callable(:py:class:`DeclarativeContainer`) * """ * def _decorator(object overriding_container): # <<<<<<<<<<<<<< @@ -14969,7 +16129,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_8override__decorato return __pyx_r; } -/* "dependency_injector/containers.pyx":655 +/* "dependency_injector/containers.pyx":694 * * * def override(object container): # <<<<<<<<<<<<<< @@ -14991,7 +16151,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4override(CYTHON_UN if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_2_override *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 655, __pyx_L1_error) + __PYX_ERR(0, 694, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -14999,19 +16159,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4override(CYTHON_UN __Pyx_INCREF(__pyx_cur_scope->__pyx_v_container); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_container); - /* "dependency_injector/containers.pyx":665 + /* "dependency_injector/containers.pyx":704 * :rtype: callable(:py:class:`DeclarativeContainer`) * """ * def _decorator(object overriding_container): # <<<<<<<<<<<<<< * """Overriding decorator.""" * container.override(overriding_container) */ - __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_8override_1_decorator, 0, __pyx_n_s_override_locals__decorator, ((PyObject*)__pyx_cur_scope), __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_8override_1_decorator, 0, __pyx_n_s_override_locals__decorator, ((PyObject*)__pyx_cur_scope), __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__decorator = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":669 + /* "dependency_injector/containers.pyx":708 * container.override(overriding_container) * return overriding_container * return _decorator # <<<<<<<<<<<<<< @@ -15023,7 +16183,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4override(CYTHON_UN __pyx_r = __pyx_v__decorator; goto __pyx_L0; - /* "dependency_injector/containers.pyx":655 + /* "dependency_injector/containers.pyx":694 * * * def override(object container): # <<<<<<<<<<<<<< @@ -15044,7 +16204,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4override(CYTHON_UN return __pyx_r; } -/* "dependency_injector/containers.pyx":672 +/* "dependency_injector/containers.pyx":711 * * * def copy(object container): # <<<<<<<<<<<<<< @@ -15067,7 +16227,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_7copy(PyObject *__p return __pyx_r; } -/* "dependency_injector/containers.pyx":685 +/* "dependency_injector/containers.pyx":724 * :rtype: callable(:py:class:`DeclarativeContainer`) * """ * def _get_providers_memo(from_providers, source_providers): # <<<<<<<<<<<<<< @@ -15110,11 +16270,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_4copy_1_get_provide case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source_providers)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_get_providers_memo", 1, 2, 2, 1); __PYX_ERR(0, 685, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get_providers_memo", 1, 2, 2, 1); __PYX_ERR(0, 724, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_providers_memo") < 0)) __PYX_ERR(0, 685, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_providers_memo") < 0)) __PYX_ERR(0, 724, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -15127,7 +16287,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_4copy_1_get_provide } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_get_providers_memo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 685, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get_providers_memo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 724, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers.copy._get_providers_memo", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -15172,26 +16332,26 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider __pyx_outer_scope = (struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_3_copy *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "dependency_injector/containers.pyx":686 + /* "dependency_injector/containers.pyx":725 * """ * def _get_providers_memo(from_providers, source_providers): * memo = dict() # <<<<<<<<<<<<<< * * for name, provider in from_providers.items(): */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_memo = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":688 + /* "dependency_injector/containers.pyx":727 * memo = dict() * * for name, provider in from_providers.items(): # <<<<<<<<<<<<<< * try: * source_provider = source_providers[name] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_providers, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_providers, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -15205,16 +16365,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -15222,17 +16382,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 727, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 727, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -15242,7 +16402,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 688, __pyx_L1_error) + else __PYX_ERR(0, 727, __pyx_L1_error) } break; } @@ -15254,7 +16414,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 688, __pyx_L1_error) + __PYX_ERR(0, 727, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -15267,15 +16427,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __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, 688, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __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; @@ -15283,7 +16443,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider __Pyx_GOTREF(__pyx_t_3); 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, 688, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 727, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -15291,7 +16451,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 688, __pyx_L1_error) + __PYX_ERR(0, 727, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); @@ -15299,7 +16459,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":689 + /* "dependency_injector/containers.pyx":728 * * for name, provider in from_providers.items(): * try: # <<<<<<<<<<<<<< @@ -15315,19 +16475,19 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { - /* "dependency_injector/containers.pyx":690 + /* "dependency_injector/containers.pyx":729 * for name, provider in from_providers.items(): * try: * source_provider = source_providers[name] # <<<<<<<<<<<<<< * except KeyError: * continue */ - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_source_providers, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_source_providers, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_source_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":689 + /* "dependency_injector/containers.pyx":728 * * for name, provider in from_providers.items(): * try: # <<<<<<<<<<<<<< @@ -15336,7 +16496,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider */ } - /* "dependency_injector/containers.pyx":694 + /* "dependency_injector/containers.pyx":733 * continue * else: * memo[id(source_provider)] = provider # <<<<<<<<<<<<<< @@ -15344,62 +16504,62 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider * if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'): */ /*else:*/ { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_source_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L9_except_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_source_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyDict_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_provider) < 0)) __PYX_ERR(0, 694, __pyx_L9_except_error) + if (unlikely(PyDict_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_provider) < 0)) __PYX_ERR(0, 733, __pyx_L9_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":696 + /* "dependency_injector/containers.pyx":735 * memo[id(source_provider)] = provider * * if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'): # <<<<<<<<<<<<<< * sub_memo = _get_providers_memo(provider.providers, source_provider.providers) * memo.update(sub_memo) */ - __pyx_t_13 = __Pyx_HasAttr(__pyx_v_provider, __pyx_n_s_providers); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 696, __pyx_L9_except_error) + __pyx_t_13 = __Pyx_HasAttr(__pyx_v_provider, __pyx_n_s_providers); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 735, __pyx_L9_except_error) __pyx_t_14 = (__pyx_t_13 != 0); if (__pyx_t_14) { } else { __pyx_t_12 = __pyx_t_14; goto __pyx_L16_bool_binop_done; } - __pyx_t_14 = __Pyx_HasAttr(__pyx_v_source_provider, __pyx_n_s_providers); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 696, __pyx_L9_except_error) + __pyx_t_14 = __Pyx_HasAttr(__pyx_v_source_provider, __pyx_n_s_providers); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 735, __pyx_L9_except_error) __pyx_t_13 = (__pyx_t_14 != 0); __pyx_t_12 = __pyx_t_13; __pyx_L16_bool_binop_done:; if (__pyx_t_12) { - /* "dependency_injector/containers.pyx":697 + /* "dependency_injector/containers.pyx":736 * * if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'): * sub_memo = _get_providers_memo(provider.providers, source_provider.providers) # <<<<<<<<<<<<<< * memo.update(sub_memo) * return memo */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L9_except_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_source_provider, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 697, __pyx_L9_except_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_source_provider, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 736, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely(!__pyx_cur_scope->__pyx_v__get_providers_memo)) { __Pyx_RaiseClosureNameError("_get_providers_memo"); __PYX_ERR(0, 697, __pyx_L9_except_error) } - __pyx_t_3 = __pyx_pf_19dependency_injector_10containers_4copy__get_providers_memo(__pyx_cur_scope->__pyx_v__get_providers_memo, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L9_except_error) + if (unlikely(!__pyx_cur_scope->__pyx_v__get_providers_memo)) { __Pyx_RaiseClosureNameError("_get_providers_memo"); __PYX_ERR(0, 736, __pyx_L9_except_error) } + __pyx_t_3 = __pyx_pf_19dependency_injector_10containers_4copy__get_providers_memo(__pyx_cur_scope->__pyx_v__get_providers_memo, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_sub_memo, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":698 + /* "dependency_injector/containers.pyx":737 * if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'): * sub_memo = _get_providers_memo(provider.providers, source_provider.providers) * memo.update(sub_memo) # <<<<<<<<<<<<<< * return memo * */ - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_memo, __pyx_v_sub_memo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L9_except_error) + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_memo, __pyx_v_sub_memo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 737, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":696 + /* "dependency_injector/containers.pyx":735 * memo[id(source_provider)] = provider * * if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'): # <<<<<<<<<<<<<< @@ -15418,7 +16578,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/containers.pyx":691 + /* "dependency_injector/containers.pyx":730 * try: * source_provider = source_providers[name] * except KeyError: # <<<<<<<<<<<<<< @@ -15428,12 +16588,12 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_15) { __Pyx_AddTraceback("dependency_injector.containers.copy._get_providers_memo", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 691, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 730, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/containers.pyx":692 + /* "dependency_injector/containers.pyx":731 * source_provider = source_providers[name] * except KeyError: * continue # <<<<<<<<<<<<<< @@ -15450,7 +16610,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider goto __pyx_L9_except_error; __pyx_L9_except_error:; - /* "dependency_injector/containers.pyx":689 + /* "dependency_injector/containers.pyx":728 * * for name, provider in from_providers.items(): * try: # <<<<<<<<<<<<<< @@ -15471,7 +16631,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider __pyx_L14_try_end:; } - /* "dependency_injector/containers.pyx":688 + /* "dependency_injector/containers.pyx":727 * memo = dict() * * for name, provider in from_providers.items(): # <<<<<<<<<<<<<< @@ -15482,7 +16642,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":699 + /* "dependency_injector/containers.pyx":738 * sub_memo = _get_providers_memo(provider.providers, source_provider.providers) * memo.update(sub_memo) * return memo # <<<<<<<<<<<<<< @@ -15494,7 +16654,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider __pyx_r = __pyx_v_memo; goto __pyx_L0; - /* "dependency_injector/containers.pyx":685 + /* "dependency_injector/containers.pyx":724 * :rtype: callable(:py:class:`DeclarativeContainer`) * """ * def _get_providers_memo(from_providers, source_providers): # <<<<<<<<<<<<<< @@ -15522,7 +16682,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_provider return __pyx_r; } -/* "dependency_injector/containers.pyx":701 +/* "dependency_injector/containers.pyx":740 * return memo * * def _decorator(copied_container): # <<<<<<<<<<<<<< @@ -15570,40 +16730,40 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P __pyx_outer_scope = (struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_3_copy *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "dependency_injector/containers.pyx":702 + /* "dependency_injector/containers.pyx":741 * * def _decorator(copied_container): * memo = _get_providers_memo(copied_container.cls_providers, container.providers) # <<<<<<<<<<<<<< * * providers_copy = providers.deepcopy(container.providers, memo) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied_container, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied_container, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_container)) { __Pyx_RaiseClosureNameError("container"); __PYX_ERR(0, 702, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_container)) { __Pyx_RaiseClosureNameError("container"); __PYX_ERR(0, 741, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(!__pyx_cur_scope->__pyx_v__get_providers_memo)) { __Pyx_RaiseClosureNameError("_get_providers_memo"); __PYX_ERR(0, 702, __pyx_L1_error) } - __pyx_t_3 = __pyx_pf_19dependency_injector_10containers_4copy__get_providers_memo(__pyx_cur_scope->__pyx_v__get_providers_memo, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v__get_providers_memo)) { __Pyx_RaiseClosureNameError("_get_providers_memo"); __PYX_ERR(0, 741, __pyx_L1_error) } + __pyx_t_3 = __pyx_pf_19dependency_injector_10containers_4copy__get_providers_memo(__pyx_cur_scope->__pyx_v__get_providers_memo, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_memo = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":704 + /* "dependency_injector/containers.pyx":743 * memo = _get_providers_memo(copied_container.cls_providers, container.providers) * * providers_copy = providers.deepcopy(container.providers, memo) # <<<<<<<<<<<<<< * for name, provider in six.iteritems(providers_copy): * setattr(copied_container, name, provider) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_v_container)) { __Pyx_RaiseClosureNameError("container"); __PYX_ERR(0, 704, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_container)) { __Pyx_RaiseClosureNameError("container"); __PYX_ERR(0, 743, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -15620,7 +16780,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_memo}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -15629,14 +16789,14 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_memo}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -15647,7 +16807,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P __Pyx_GIVEREF(__pyx_v_memo); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_memo); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -15655,16 +16815,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P __pyx_v_providers_copy = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/containers.pyx":705 + /* "dependency_injector/containers.pyx":744 * * providers_copy = providers.deepcopy(container.providers, memo) * for name, provider in six.iteritems(providers_copy): # <<<<<<<<<<<<<< * setattr(copied_container, name, provider) * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -15679,16 +16839,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_v_providers_copy) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_providers_copy); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 744, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -15696,17 +16856,17 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 744, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 744, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -15716,7 +16876,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 705, __pyx_L1_error) + else __PYX_ERR(0, 744, __pyx_L1_error) } break; } @@ -15728,7 +16888,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 705, __pyx_L1_error) + __PYX_ERR(0, 744, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -15741,15 +16901,15 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -15757,7 +16917,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 705, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 744, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6_unpacking_done; @@ -15765,7 +16925,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 705, __pyx_L1_error) + __PYX_ERR(0, 744, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); @@ -15773,16 +16933,16 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/containers.pyx":706 + /* "dependency_injector/containers.pyx":745 * providers_copy = providers.deepcopy(container.providers, memo) * for name, provider in six.iteritems(providers_copy): * setattr(copied_container, name, provider) # <<<<<<<<<<<<<< * * return copied_container */ - __pyx_t_10 = PyObject_SetAttr(__pyx_v_copied_container, __pyx_v_name, __pyx_v_provider); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_10 = PyObject_SetAttr(__pyx_v_copied_container, __pyx_v_name, __pyx_v_provider); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 745, __pyx_L1_error) - /* "dependency_injector/containers.pyx":705 + /* "dependency_injector/containers.pyx":744 * * providers_copy = providers.deepcopy(container.providers, memo) * for name, provider in six.iteritems(providers_copy): # <<<<<<<<<<<<<< @@ -15792,7 +16952,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":708 + /* "dependency_injector/containers.pyx":747 * setattr(copied_container, name, provider) * * return copied_container # <<<<<<<<<<<<<< @@ -15804,7 +16964,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P __pyx_r = __pyx_v_copied_container; goto __pyx_L0; - /* "dependency_injector/containers.pyx":701 + /* "dependency_injector/containers.pyx":740 * return memo * * def _decorator(copied_container): # <<<<<<<<<<<<<< @@ -15831,7 +16991,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P return __pyx_r; } -/* "dependency_injector/containers.pyx":672 +/* "dependency_injector/containers.pyx":711 * * * def copy(object container): # <<<<<<<<<<<<<< @@ -15853,7 +17013,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_6copy(CYTHON_UNUSED if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_3_copy *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 672, __pyx_L1_error) + __PYX_ERR(0, 711, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -15861,32 +17021,32 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_6copy(CYTHON_UNUSED __Pyx_INCREF(__pyx_cur_scope->__pyx_v_container); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_container); - /* "dependency_injector/containers.pyx":685 + /* "dependency_injector/containers.pyx":724 * :rtype: callable(:py:class:`DeclarativeContainer`) * """ * def _get_providers_memo(from_providers, source_providers): # <<<<<<<<<<<<<< * memo = dict() * */ - __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_4copy_1_get_providers_memo, 0, __pyx_n_s_copy_locals__get_providers_memo, ((PyObject*)__pyx_cur_scope), __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_4copy_1_get_providers_memo, 0, __pyx_n_s_copy_locals__get_providers_memo, ((PyObject*)__pyx_cur_scope), __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v__get_providers_memo = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":701 + /* "dependency_injector/containers.pyx":740 * return memo * * def _decorator(copied_container): # <<<<<<<<<<<<<< * memo = _get_providers_memo(copied_container.cls_providers, container.providers) * */ - __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_4copy_3_decorator, 0, __pyx_n_s_copy_locals__decorator, ((PyObject*)__pyx_cur_scope), __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_4copy_3_decorator, 0, __pyx_n_s_copy_locals__decorator, ((PyObject*)__pyx_cur_scope), __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__decorator = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":709 + /* "dependency_injector/containers.pyx":748 * * return copied_container * return _decorator # <<<<<<<<<<<<<< @@ -15898,7 +17058,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_6copy(CYTHON_UNUSED __pyx_r = __pyx_v__decorator; goto __pyx_L0; - /* "dependency_injector/containers.pyx":672 + /* "dependency_injector/containers.pyx":711 * * * def copy(object container): # <<<<<<<<<<<<<< @@ -15919,7 +17079,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_6copy(CYTHON_UNUSED return __pyx_r; } -/* "dependency_injector/containers.pyx":712 +/* "dependency_injector/containers.pyx":751 * * * cpdef bint is_container(object instance): # <<<<<<<<<<<<<< @@ -15938,21 +17098,21 @@ static int __pyx_f_19dependency_injector_10containers_is_container(PyObject *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_container", 0); - /* "dependency_injector/containers.pyx":720 + /* "dependency_injector/containers.pyx":759 * :rtype: bool * """ * return getattr(instance, '__IS_CONTAINER__', False) is True # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_CONTAINER, Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_CONTAINER, Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_True); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "dependency_injector/containers.pyx":712 + /* "dependency_injector/containers.pyx":751 * * * cpdef bint is_container(object instance): # <<<<<<<<<<<<<< @@ -15993,7 +17153,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_8is_container(CYTHO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_container", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_10containers_is_container(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_10containers_is_container(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16010,7 +17170,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_8is_container(CYTHO return __pyx_r; } -/* "dependency_injector/containers.pyx":723 +/* "dependency_injector/containers.pyx":762 * * * cpdef object _check_provider_type(object container, object provider): # <<<<<<<<<<<<<< @@ -16037,40 +17197,40 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_provider_type", 0); - /* "dependency_injector/containers.pyx":724 + /* "dependency_injector/containers.pyx":763 * * cpdef object _check_provider_type(object container, object provider): * if not isinstance(provider, container.provider_type): # <<<<<<<<<<<<<< * raise errors.Error('{0} can contain only {1} ' * 'instances'.format(container, container.provider_type)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_provider_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_provider_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_provider, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v_provider, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 763, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); if (unlikely(__pyx_t_3)) { - /* "dependency_injector/containers.pyx":725 + /* "dependency_injector/containers.pyx":764 * cpdef object _check_provider_type(object container, object provider): * if not isinstance(provider, container.provider_type): * raise errors.Error('{0} can contain only {1} ' # <<<<<<<<<<<<<< * 'instances'.format(container, container.provider_type)) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 725, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/containers.pyx":726 + /* "dependency_injector/containers.pyx":765 * if not isinstance(provider, container.provider_type): * raise errors.Error('{0} can contain only {1} ' * 'instances'.format(container, container.provider_type)) # <<<<<<<<<<<<<< */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_contain_only_1_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_contain_only_1_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_provider_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_provider_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -16087,7 +17247,7 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_container, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -16096,14 +17256,14 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_container, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -16114,7 +17274,7 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -16132,14 +17292,14 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 725, __pyx_L1_error) + __PYX_ERR(0, 764, __pyx_L1_error) - /* "dependency_injector/containers.pyx":724 + /* "dependency_injector/containers.pyx":763 * * cpdef object _check_provider_type(object container, object provider): * if not isinstance(provider, container.provider_type): # <<<<<<<<<<<<<< @@ -16148,7 +17308,7 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type */ } - /* "dependency_injector/containers.pyx":723 + /* "dependency_injector/containers.pyx":762 * * * cpdef object _check_provider_type(object container, object provider): # <<<<<<<<<<<<<< @@ -16209,11 +17369,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_11_check_provider_t case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_check_provider_type", 1, 2, 2, 1); __PYX_ERR(0, 723, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_check_provider_type", 1, 2, 2, 1); __PYX_ERR(0, 762, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_provider_type") < 0)) __PYX_ERR(0, 723, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_provider_type") < 0)) __PYX_ERR(0, 762, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -16226,7 +17386,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_11_check_provider_t } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_check_provider_type", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 723, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_check_provider_type", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 762, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.containers._check_provider_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -16248,7 +17408,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_10_check_provider_t int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_provider_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_10containers__check_provider_type(__pyx_v_container, __pyx_v_provider, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_10containers__check_provider_type(__pyx_v_container, __pyx_v_provider, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16659,7 +17819,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa * plain_kwargs[key] = value * continue */ - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__13, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 353, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__14, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 353, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { @@ -16709,7 +17869,7 @@ 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__13) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s__13); + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_n_s__14) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s__14); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -21211,7 +22371,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__15)); 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__16)); 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; @@ -21399,7 +22559,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__17)); 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__18)); 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; @@ -21598,7 +22758,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__19)); 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__20)); 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; @@ -21791,7 +22951,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__21)); 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__22)); 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; @@ -22746,6 +23906,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_DynamicContainer_assign_parent, __pyx_k_DynamicContainer_assign_parent, sizeof(__pyx_k_DynamicContainer_assign_parent), 0, 0, 1, 1}, {&__pyx_n_s_DynamicContainer_check_dependenc, __pyx_k_DynamicContainer_check_dependenc, sizeof(__pyx_k_DynamicContainer_check_dependenc), 0, 0, 1, 1}, {&__pyx_n_s_DynamicContainer_dependencies, __pyx_k_DynamicContainer_dependencies, sizeof(__pyx_k_DynamicContainer_dependencies), 0, 0, 1, 1}, + {&__pyx_n_s_DynamicContainer_from_json_schem, __pyx_k_DynamicContainer_from_json_schem, sizeof(__pyx_k_DynamicContainer_from_json_schem), 0, 0, 1, 1}, + {&__pyx_n_s_DynamicContainer_from_schema, __pyx_k_DynamicContainer_from_schema, sizeof(__pyx_k_DynamicContainer_from_schema), 0, 0, 1, 1}, + {&__pyx_n_s_DynamicContainer_from_yaml_schem, __pyx_k_DynamicContainer_from_yaml_schem, sizeof(__pyx_k_DynamicContainer_from_yaml_schem), 0, 0, 1, 1}, {&__pyx_n_s_DynamicContainer_init_resources, __pyx_k_DynamicContainer_init_resources, sizeof(__pyx_k_DynamicContainer_init_resources), 0, 0, 1, 1}, {&__pyx_n_s_DynamicContainer_override, __pyx_k_DynamicContainer_override, sizeof(__pyx_k_DynamicContainer_override), 0, 0, 1, 1}, {&__pyx_n_s_DynamicContainer_override_provid, __pyx_k_DynamicContainer_override_provid, sizeof(__pyx_k_DynamicContainer_override_provid), 0, 0, 1, 1}, @@ -22773,15 +23936,17 @@ 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_SafeLoader, __pyx_k_SafeLoader, sizeof(__pyx_k_SafeLoader), 0, 0, 1, 1}, {&__pyx_n_s_Self, __pyx_k_Self, sizeof(__pyx_k_Self), 0, 0, 1, 1}, {&__pyx_n_s_SingletonResetContext, __pyx_k_SingletonResetContext, sizeof(__pyx_k_SingletonResetContext), 0, 0, 1, 1}, {&__pyx_n_s_SingletonResetContext___enter, __pyx_k_SingletonResetContext___enter, sizeof(__pyx_k_SingletonResetContext___enter), 0, 0, 1, 1}, {&__pyx_n_s_SingletonResetContext___exit, __pyx_k_SingletonResetContext___exit, sizeof(__pyx_k_SingletonResetContext___exit), 0, 0, 1, 1}, {&__pyx_n_s_SingletonResetContext___init, __pyx_k_SingletonResetContext___init, sizeof(__pyx_k_SingletonResetContext___init), 0, 0, 1, 1}, + {&__pyx_kp_s_Unable_to_load_yaml_schema_PyYAM, __pyx_k_Unable_to_load_yaml_schema_PyYAM, sizeof(__pyx_k_Unable_to_load_yaml_schema_PyYAM), 0, 0, 1, 0}, {&__pyx_kp_s_Wiring_requires_Python_3_6_or_ab, __pyx_k_Wiring_requires_Python_3_6_or_ab, sizeof(__pyx_k_Wiring_requires_Python_3_6_or_ab), 0, 0, 1, 0}, - {&__pyx_n_s__103, __pyx_k__103, sizeof(__pyx_k__103), 0, 0, 1, 1}, - {&__pyx_n_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 1}, - {&__pyx_n_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 1}, + {&__pyx_n_s__111, __pyx_k__111, sizeof(__pyx_k__111), 0, 0, 1, 1}, + {&__pyx_n_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 1}, + {&__pyx_n_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 1}, {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0}, {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0}, {&__pyx_n_s_add_done_callback, __pyx_k_add_done_callback, sizeof(__pyx_k_add_done_callback), 0, 0, 1, 1}, @@ -22798,6 +23963,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1}, {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, {&__pyx_n_s_bases, __pyx_k_bases, sizeof(__pyx_k_bases), 0, 0, 1, 1}, + {&__pyx_n_s_build_schema, __pyx_k_build_schema, sizeof(__pyx_k_build_schema), 0, 0, 1, 1}, {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1}, {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1}, {&__pyx_n_s_check_dependencies, __pyx_k_check_dependencies, sizeof(__pyx_k_check_dependencies), 0, 0, 1, 1}, @@ -22835,8 +24001,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1}, {&__pyx_n_s_fetch_self, __pyx_k_fetch_self, sizeof(__pyx_k_fetch_self), 0, 0, 1, 1}, + {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, + {&__pyx_n_s_filepath, __pyx_k_filepath, sizeof(__pyx_k_filepath), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, + {&__pyx_n_s_from_json_schema, __pyx_k_from_json_schema, sizeof(__pyx_k_from_json_schema), 0, 0, 1, 1}, {&__pyx_n_s_from_providers, __pyx_k_from_providers, sizeof(__pyx_k_from_providers), 0, 0, 1, 1}, + {&__pyx_n_s_from_schema, __pyx_k_from_schema, sizeof(__pyx_k_from_schema), 0, 0, 1, 1}, + {&__pyx_n_s_from_yaml_schema, __pyx_k_from_yaml_schema, sizeof(__pyx_k_from_yaml_schema), 0, 0, 1, 1}, {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1}, {&__pyx_n_s_future, __pyx_k_future, sizeof(__pyx_k_future), 0, 0, 1, 1}, {&__pyx_n_s_future_args_kwargs, __pyx_k_future_args_kwargs, sizeof(__pyx_k_future_args_kwargs), 0, 0, 1, 1}, @@ -22862,7 +24033,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1}, {&__pyx_n_s_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 0, 0, 1, 1}, {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, + {&__pyx_n_s_json, __pyx_k_json, sizeof(__pyx_k_json), 0, 0, 1, 1}, {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, + {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1}, + {&__pyx_n_s_loader, __pyx_k_loader, sizeof(__pyx_k_loader), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_mcs, __pyx_k_mcs, sizeof(__pyx_k_mcs), 0, 0, 1, 1}, {&__pyx_n_s_memo, __pyx_k_memo, sizeof(__pyx_k_memo), 0, 0, 1, 1}, @@ -22873,6 +24047,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, + {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, {&__pyx_n_s_overridden, __pyx_k_overridden, sizeof(__pyx_k_overridden), 0, 0, 1, 1}, {&__pyx_n_s_override, __pyx_k_override, sizeof(__pyx_k_override), 0, 0, 1, 1}, {&__pyx_n_s_override_locals__decorator, __pyx_k_override_locals__decorator, sizeof(__pyx_k_override_locals__decorator), 0, 0, 1, 1}, @@ -22903,6 +24078,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_resolve_provider_name, __pyx_k_resolve_provider_name, sizeof(__pyx_k_resolve_provider_name), 0, 0, 1, 1}, {&__pyx_n_s_resource, __pyx_k_resource, sizeof(__pyx_k_resource), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, + {&__pyx_n_s_schema, __pyx_k_schema, sizeof(__pyx_k_schema), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_self_2, __pyx_k_self_2, sizeof(__pyx_k_self_2), 0, 0, 1, 1}, {&__pyx_kp_s_self_3, __pyx_k_self_3, sizeof(__pyx_k_self_3), 0, 0, 1, 0}, @@ -22941,19 +24117,21 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_wired_to_packages, __pyx_k_wired_to_packages, sizeof(__pyx_k_wired_to_packages), 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_yaml, __pyx_k_yaml, sizeof(__pyx_k_yaml), 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_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 7, __pyx_L1_error) - __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 26, __pyx_L1_error) - __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 141, __pyx_L1_error) - __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 481, __pyx_L1_error) - __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 20, __pyx_L1_error) - __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 74, __pyx_L1_error) - __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 78, __pyx_L1_error) - __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 206, __pyx_L1_error) - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 520, __pyx_L1_error) + __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 730, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 382, __pyx_L1_error) __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(1, 471, __pyx_L1_error) return 0; @@ -22965,63 +24143,74 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "dependency_injector/containers.pyx":20 + /* "dependency_injector/containers.pyx":26 * else: * def wire(*args, **kwargs): * raise NotImplementedError('Wiring requires Python 3.6 or above') # <<<<<<<<<<<<<< * * def unwire(*args, **kwargs): */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Wiring_requires_Python_3_6_or_ab); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Wiring_requires_Python_3_6_or_ab); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "dependency_injector/containers.pyx":230 + /* "dependency_injector/containers.pyx":236 * raise errors.Error('Container {0} is not overridden'.format(self)) * * self.overridden = self.overridden[:-1] # <<<<<<<<<<<<<< * * for provider in six.itervalues(self.providers): */ - __pyx_slice__3 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_slice__3 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__3); __Pyx_GIVEREF(__pyx_slice__3); - /* "dependency_injector/containers.pyx":665 + /* "dependency_injector/containers.pyx":361 + * loader = yaml.SafeLoader + * + * with open(filepath) as file: # <<<<<<<<<<<<<< + * schema = yaml.load(file, loader) + * + */ + __pyx_tuple__6 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); + + /* "dependency_injector/containers.pyx":704 * :rtype: callable(:py:class:`DeclarativeContainer`) * """ * def _decorator(object overriding_container): # <<<<<<<<<<<<<< * """Overriding decorator.""" * container.override(overriding_container) */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_overriding_container); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 665, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__7); - __Pyx_GIVEREF(__pyx_tuple__7); - __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_decorator, 665, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_overriding_container); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); + __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_decorator, 704, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 704, __pyx_L1_error) - /* "dependency_injector/containers.pyx":685 + /* "dependency_injector/containers.pyx":724 * :rtype: callable(:py:class:`DeclarativeContainer`) * """ * def _get_providers_memo(from_providers, source_providers): # <<<<<<<<<<<<<< * memo = dict() * */ - __pyx_tuple__9 = PyTuple_Pack(7, __pyx_n_s_from_providers, __pyx_n_s_source_providers, __pyx_n_s_memo, __pyx_n_s_name, __pyx_n_s_provider, __pyx_n_s_source_provider, __pyx_n_s_sub_memo); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 685, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__9); - __Pyx_GIVEREF(__pyx_tuple__9); - __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_get_providers_memo, 685, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 685, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(7, __pyx_n_s_from_providers, __pyx_n_s_source_providers, __pyx_n_s_memo, __pyx_n_s_name, __pyx_n_s_provider, __pyx_n_s_source_provider, __pyx_n_s_sub_memo); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); + __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_get_providers_memo, 724, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 724, __pyx_L1_error) - /* "dependency_injector/containers.pyx":701 + /* "dependency_injector/containers.pyx":740 * return memo * * def _decorator(copied_container): # <<<<<<<<<<<<<< * memo = _get_providers_memo(copied_container.cls_providers, container.providers) * */ - __pyx_tuple__11 = PyTuple_Pack(5, __pyx_n_s_copied_container, __pyx_n_s_memo, __pyx_n_s_providers_copy, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__11); - __Pyx_GIVEREF(__pyx_tuple__11); - __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 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_src_dependency_injector_containe, __pyx_n_s_decorator, 701, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 701, __pyx_L1_error) + __pyx_tuple__12 = PyTuple_Pack(5, __pyx_n_s_copied_container, __pyx_n_s_memo, __pyx_n_s_providers_copy, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 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_src_dependency_injector_containe, __pyx_n_s_decorator, 740, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 740, __pyx_L1_error) /* "cfunc.to_py":65 * @cname("__Pyx_CFunc_void____object____object____object____object___to_py") @@ -23030,548 +24219,587 @@ 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__14 = 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__14)) __PYX_ERR(2, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__14); - __Pyx_GIVEREF(__pyx_tuple__14); - __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(4, 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_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(2, 65, __pyx_L1_error) - __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_s_future_result, __pyx_n_s_future); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__16); - __Pyx_GIVEREF(__pyx_tuple__16); - __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(2, 65, __pyx_L1_error) - __pyx_tuple__18 = PyTuple_Pack(3, __pyx_n_s_future_result, __pyx_n_s_call, __pyx_n_s_future); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(2, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__18); - __Pyx_GIVEREF(__pyx_tuple__18); - __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(2, 65, __pyx_L1_error) - __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_s_future_result, __pyx_n_s_future); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(2, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__20); - __Pyx_GIVEREF(__pyx_tuple__20); - __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__15 = 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__15)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 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_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_s_future_result, __pyx_n_s_future); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__19 = PyTuple_Pack(3, __pyx_n_s_future_result, __pyx_n_s_call, __pyx_n_s_future); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); + __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(2, __pyx_n_s_future_result, __pyx_n_s_future); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(2, 65, __pyx_L1_error) - /* "dependency_injector/containers.pyx":16 + /* "dependency_injector/containers.pyx":22 * * * if sys.version_info[:2] >= (3, 6): # <<<<<<<<<<<<<< * from .wiring import wire, unwire * else: */ - __pyx_slice__23 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__23)) __PYX_ERR(0, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__23); - __Pyx_GIVEREF(__pyx_slice__23); - __pyx_tuple__24 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_6); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__24); - __Pyx_GIVEREF(__pyx_tuple__24); + __pyx_slice__24 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__24); + __Pyx_GIVEREF(__pyx_slice__24); + __pyx_tuple__25 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_6); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__25); + __Pyx_GIVEREF(__pyx_tuple__25); - /* "dependency_injector/containers.pyx":19 + /* "dependency_injector/containers.pyx":25 * from .wiring import wire, unwire * else: * def wire(*args, **kwargs): # <<<<<<<<<<<<<< * raise NotImplementedError('Wiring requires Python 3.6 or above') * */ - __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 19, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__25); - __Pyx_GIVEREF(__pyx_tuple__25); - __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_wire, 19, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_tuple__26 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__26); + __Pyx_GIVEREF(__pyx_tuple__26); + __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_wire, 25, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 25, __pyx_L1_error) - /* "dependency_injector/containers.pyx":22 + /* "dependency_injector/containers.pyx":28 * raise NotImplementedError('Wiring requires Python 3.6 or above') * * def unwire(*args, **kwargs): # <<<<<<<<<<<<<< * raise NotImplementedError('Wiring requires Python 3.6 or above') * */ - __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 22, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); - __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_unwire, 22, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 22, __pyx_L1_error) + __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__28); + __Pyx_GIVEREF(__pyx_tuple__28); + __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_unwire, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 28, __pyx_L1_error) - /* "dependency_injector/containers.pyx":26 + /* "dependency_injector/containers.pyx":32 * * * class Container(object): # <<<<<<<<<<<<<< * """Abstract container.""" * */ - __pyx_tuple__29 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 26, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__29); - __Pyx_GIVEREF(__pyx_tuple__29); + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); - /* "dependency_injector/containers.pyx":61 + /* "dependency_injector/containers.pyx":67 * __IS_CONTAINER__ = True * * def __init__(self): # <<<<<<<<<<<<<< * """Initializer. * */ - __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 61, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__30); - __Pyx_GIVEREF(__pyx_tuple__30); - __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_init, 61, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); + __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_init, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 67, __pyx_L1_error) - /* "dependency_injector/containers.pyx":76 + /* "dependency_injector/containers.pyx":82 * super(DynamicContainer, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * """Create and return full copy of container.""" * copied = memo.get(id(self)) */ - __pyx_tuple__32 = PyTuple_Pack(5, __pyx_n_s_self_2, __pyx_n_s_memo, __pyx_n_s_copied, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 76, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__32); - __Pyx_GIVEREF(__pyx_tuple__32); - __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_deepcopy_2, 76, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_tuple__33 = PyTuple_Pack(5, __pyx_n_s_self_2, __pyx_n_s_memo, __pyx_n_s_copied, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_deepcopy_2, 82, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 82, __pyx_L1_error) - /* "dependency_injector/containers.pyx":100 + /* "dependency_injector/containers.pyx":106 * return copied * * def __setattr__(self, str name, object value): # <<<<<<<<<<<<<< * """Set instance attribute. * */ - __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 100, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__34); - __Pyx_GIVEREF(__pyx_tuple__34); - __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_setattr, 100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_tuple__35 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); + __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_setattr, 106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 106, __pyx_L1_error) - /* "dependency_injector/containers.pyx":126 + /* "dependency_injector/containers.pyx":132 * super(DynamicContainer, self).__setattr__(name, value) * * def __delattr__(self, str name): # <<<<<<<<<<<<<< * """Delete instance attribute. * */ - __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_name); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 126, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__36); - __Pyx_GIVEREF(__pyx_tuple__36); - __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_delattr, 126, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_name); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__37); + __Pyx_GIVEREF(__pyx_tuple__37); + __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_delattr, 132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 132, __pyx_L1_error) - /* "dependency_injector/containers.pyx":142 + /* "dependency_injector/containers.pyx":148 * * @property * def dependencies(self): # <<<<<<<<<<<<<< * """Return dependency providers dictionary. * */ - __pyx_tuple__38 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 142, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__38); - __Pyx_GIVEREF(__pyx_tuple__38); - __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_dependencies, 142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_tuple__39 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_dependencies, 148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 148, __pyx_L1_error) - /* "dependency_injector/containers.pyx":157 + /* "dependency_injector/containers.pyx":163 * } * * def traverse(self, types=None): # <<<<<<<<<<<<<< * """Return providers traversal generator.""" * yield from providers.traverse(*self.providers.values(), types=types) */ - __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_types); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 157, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__40); - __Pyx_GIVEREF(__pyx_tuple__40); - __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_traverse, 157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 157, __pyx_L1_error) - __pyx_tuple__41 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_types); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); + __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_traverse, 163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_tuple__42 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__42); + __Pyx_GIVEREF(__pyx_tuple__42); - /* "dependency_injector/containers.pyx":161 + /* "dependency_injector/containers.pyx":167 * yield from providers.traverse(*self.providers.values(), types=types) * * def set_providers(self, **providers): # <<<<<<<<<<<<<< * """Set container providers. * */ - __pyx_tuple__42 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_providers, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 161, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__42); - __Pyx_GIVEREF(__pyx_tuple__42); - __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_set_providers, 161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_providers, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_set_providers, 167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 167, __pyx_L1_error) - /* "dependency_injector/containers.pyx":173 + /* "dependency_injector/containers.pyx":179 * setattr(self, name, provider) * * def set_provider(self, name, provider): # <<<<<<<<<<<<<< * """Set container provider. * */ - __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 173, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__44); - __Pyx_GIVEREF(__pyx_tuple__44); - __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_set_provider, 173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_tuple__45 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_set_provider, 179, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 179, __pyx_L1_error) - /* "dependency_injector/containers.pyx":186 + /* "dependency_injector/containers.pyx":192 * setattr(self, name, provider) * * def override(self, object overriding): # <<<<<<<<<<<<<< * """Override current container by overriding container. * */ - __pyx_tuple__46 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_overriding, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 186, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__46); - __Pyx_GIVEREF(__pyx_tuple__46); - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override, 186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_tuple__47 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_overriding, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__47); + __Pyx_GIVEREF(__pyx_tuple__47); + __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override, 192, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 192, __pyx_L1_error) - /* "dependency_injector/containers.pyx":209 + /* "dependency_injector/containers.pyx":215 * pass * * def override_providers(self, **overriding_providers): # <<<<<<<<<<<<<< * """Override container providers. * */ - __pyx_tuple__48 = PyTuple_Pack(5, __pyx_n_s_self_2, __pyx_n_s_overriding_providers, __pyx_n_s_name, __pyx_n_s_overriding_provider, __pyx_n_s_container_provider); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 209, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__48); - __Pyx_GIVEREF(__pyx_tuple__48); - __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override_providers, 209, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_self_2, __pyx_n_s_overriding_providers, __pyx_n_s_name, __pyx_n_s_overriding_provider, __pyx_n_s_container_provider); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); + __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override_providers, 215, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 215, __pyx_L1_error) - /* "dependency_injector/containers.pyx":222 + /* "dependency_injector/containers.pyx":228 * container_provider.override(overriding_provider) * * def reset_last_overriding(self): # <<<<<<<<<<<<<< * """Reset last overriding provider for each container providers. * */ - __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 222, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__50); - __Pyx_GIVEREF(__pyx_tuple__50); - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_last_overriding, 222, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_tuple__51 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__51); + __Pyx_GIVEREF(__pyx_tuple__51); + __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_last_overriding, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 228, __pyx_L1_error) - /* "dependency_injector/containers.pyx":235 + /* "dependency_injector/containers.pyx":241 * provider.reset_last_overriding() * * def reset_override(self): # <<<<<<<<<<<<<< * """Reset all overridings for each container providers. * */ - __pyx_tuple__52 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 235, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__52); - __Pyx_GIVEREF(__pyx_tuple__52); - __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_override, 235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__53); + __Pyx_GIVEREF(__pyx_tuple__53); + __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_override, 241, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 241, __pyx_L1_error) - /* "dependency_injector/containers.pyx":245 + /* "dependency_injector/containers.pyx":251 * provider.reset_override() * * def wire(self, modules=None, packages=None): # <<<<<<<<<<<<<< * """Wire container providers with provided packages and modules. * */ - __pyx_tuple__54 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_modules, __pyx_n_s_packages); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 245, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__54); - __Pyx_GIVEREF(__pyx_tuple__54); - __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_wire, 245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 245, __pyx_L1_error) - __pyx_tuple__56 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 245, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__56); - __Pyx_GIVEREF(__pyx_tuple__56); + __pyx_tuple__55 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_modules, __pyx_n_s_packages); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__55); + __Pyx_GIVEREF(__pyx_tuple__55); + __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_wire, 251, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_tuple__57 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__57); + __Pyx_GIVEREF(__pyx_tuple__57); - /* "dependency_injector/containers.pyx":262 + /* "dependency_injector/containers.pyx":268 * self.wired_to_packages.extend(packages) * * def unwire(self): # <<<<<<<<<<<<<< * """Unwire container providers from previously wired packages and modules.""" * unwire( */ - __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 262, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__57); - __Pyx_GIVEREF(__pyx_tuple__57); - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_unwire, 262, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__58); + __Pyx_GIVEREF(__pyx_tuple__58); + __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_unwire, 268, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 268, __pyx_L1_error) - /* "dependency_injector/containers.pyx":272 + /* "dependency_injector/containers.pyx":278 * self.wired_to_packages.clear() * * def init_resources(self): # <<<<<<<<<<<<<< * """Initialize all container resources.""" * futures = [] */ - __pyx_tuple__59 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_futures, __pyx_n_s_provider, __pyx_n_s_resource); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 272, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__59); - __Pyx_GIVEREF(__pyx_tuple__59); - __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_init_resources, 272, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_tuple__60 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_futures, __pyx_n_s_provider, __pyx_n_s_resource); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__60); + __Pyx_GIVEREF(__pyx_tuple__60); + __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_init_resources, 278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 278, __pyx_L1_error) - /* "dependency_injector/containers.pyx":285 + /* "dependency_injector/containers.pyx":291 * return asyncio.gather(*futures) * * def shutdown_resources(self): # <<<<<<<<<<<<<< * """Shutdown all container resources.""" * futures = [] */ - __pyx_tuple__61 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_futures, __pyx_n_s_provider, __pyx_n_s_shutdown); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__61); - __Pyx_GIVEREF(__pyx_tuple__61); - __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_shutdown_resources, 285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_tuple__62 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_futures, __pyx_n_s_provider, __pyx_n_s_shutdown); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__62); + __Pyx_GIVEREF(__pyx_tuple__62); + __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_shutdown_resources, 291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 291, __pyx_L1_error) - /* "dependency_injector/containers.pyx":298 + /* "dependency_injector/containers.pyx":304 * return asyncio.gather(*futures) * * def apply_container_providers_overridings(self): # <<<<<<<<<<<<<< * """Apply container providers' overridings.""" * for provider in self.traverse(types=[providers.Container]): */ - __pyx_tuple__63 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 298, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__63); - __Pyx_GIVEREF(__pyx_tuple__63); - __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_apply_container_providers_overri, 298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_tuple__64 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__64); + __Pyx_GIVEREF(__pyx_tuple__64); + __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_apply_container_providers_overri, 304, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 304, __pyx_L1_error) - /* "dependency_injector/containers.pyx":303 + /* "dependency_injector/containers.pyx":309 * provider.apply_overridings() * * def reset_singletons(self): # <<<<<<<<<<<<<< * """Reset container singletons.""" * for provider in self.traverse(types=[providers.BaseSingleton]): */ - __pyx_tuple__65 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 303, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__65); - __Pyx_GIVEREF(__pyx_tuple__65); - __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_singletons, 303, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_tuple__66 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__66); + __Pyx_GIVEREF(__pyx_tuple__66); + __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_singletons, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 309, __pyx_L1_error) - /* "dependency_injector/containers.pyx":309 + /* "dependency_injector/containers.pyx":315 * return SingletonResetContext(self) * * def check_dependencies(self): # <<<<<<<<<<<<<< * """Check if container dependencies are defined. * */ - __pyx_tuple__67 = PyTuple_Pack(5, __pyx_n_s_self_2, __pyx_n_s_undefined, __pyx_n_s_container_name, __pyx_n_s_undefined_names, __pyx_n_s_dependency); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__67); - __Pyx_GIVEREF(__pyx_tuple__67); - __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_check_dependencies, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_tuple__68 = PyTuple_Pack(5, __pyx_n_s_self_2, __pyx_n_s_undefined, __pyx_n_s_container_name, __pyx_n_s_undefined_names, __pyx_n_s_dependency); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__68); + __Pyx_GIVEREF(__pyx_tuple__68); + __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_check_dependencies, 315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 315, __pyx_L1_error) - /* "dependency_injector/containers.pyx":333 + /* "dependency_injector/containers.pyx":339 * ) * + * def from_schema(self, schema): # <<<<<<<<<<<<<< + * """Build container providers from schema.""" + * from .schema import build_schema + */ + __pyx_tuple__70 = PyTuple_Pack(5, __pyx_n_s_self_2, __pyx_n_s_schema, __pyx_n_s_build_schema, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__70); + __Pyx_GIVEREF(__pyx_tuple__70); + __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_from_schema, 339, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 339, __pyx_L1_error) + + /* "dependency_injector/containers.pyx":345 + * self.set_provider(name, provider) + * + * def from_yaml_schema(self, filepath, loader=None): # <<<<<<<<<<<<<< + * """Build container providers from YAML schema. + * + */ + __pyx_tuple__72 = PyTuple_Pack(5, __pyx_n_s_self_2, __pyx_n_s_filepath, __pyx_n_s_loader, __pyx_n_s_file, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__72); + __Pyx_GIVEREF(__pyx_tuple__72); + __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_from_yaml_schema, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_tuple__74 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__74); + __Pyx_GIVEREF(__pyx_tuple__74); + + /* "dependency_injector/containers.pyx":366 + * self.from_schema(schema) + * + * def from_json_schema(self, filepath): # <<<<<<<<<<<<<< + * """Build container providers from JSON schema.""" + * with open(filepath) as file: + */ + __pyx_tuple__75 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_filepath, __pyx_n_s_file, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__75); + __Pyx_GIVEREF(__pyx_tuple__75); + __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_from_json_schema, 366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 366, __pyx_L1_error) + + /* "dependency_injector/containers.pyx":372 + * self.from_schema(schema) + * * def resolve_provider_name(self, provider): # <<<<<<<<<<<<<< * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): */ - __pyx_tuple__69 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_provider, __pyx_n_s_provider_name, __pyx_n_s_container_provider); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 333, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__69); - __Pyx_GIVEREF(__pyx_tuple__69); - __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_resolve_provider_name, 333, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_tuple__77 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_provider, __pyx_n_s_provider_name, __pyx_n_s_container_provider); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__77); + __Pyx_GIVEREF(__pyx_tuple__77); + __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_resolve_provider_name, 372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 372, __pyx_L1_error) - /* "dependency_injector/containers.pyx":342 + /* "dependency_injector/containers.pyx":381 * * @property * def parent_name(self): # <<<<<<<<<<<<<< * """Return parent name.""" * if self.parent: */ - __pyx_tuple__71 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 342, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__71); - __Pyx_GIVEREF(__pyx_tuple__71); - __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_parent_name, 342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_tuple__79 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_parent_name, 381, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 381, __pyx_L1_error) - /* "dependency_injector/containers.pyx":352 + /* "dependency_injector/containers.pyx":391 * return None * * def assign_parent(self, parent): # <<<<<<<<<<<<<< * """Assign parent.""" * self.parent = parent */ - __pyx_tuple__73 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_parent); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 352, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__73); - __Pyx_GIVEREF(__pyx_tuple__73); - __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_assign_parent, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_tuple__81 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_parent); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_assign_parent, 391, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 391, __pyx_L1_error) - /* "dependency_injector/containers.pyx":360 + /* "dependency_injector/containers.pyx":399 * """Declarative inversion of control container meta class.""" * * def __new__(type mcs, str class_name, tuple bases, dict attributes): # <<<<<<<<<<<<<< * """Declarative container class factory.""" * self = mcs.__fetch_self(attributes) */ - __pyx_tuple__75 = PyTuple_Pack(18, __pyx_n_s_mcs, __pyx_n_s_class_name, __pyx_n_s_bases, __pyx_n_s_attributes, __pyx_n_s_self_2, __pyx_n_s_containers, __pyx_n_s_cls_providers, __pyx_n_s_inherited_providers, __pyx_n_s_all_providers, __pyx_n_s_cls, __pyx_n_s_provider, __pyx_n_s_name, __pyx_n_s_container, __pyx_n_s_name, __pyx_n_s_provider, __pyx_n_s_base, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 360, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__75); - __Pyx_GIVEREF(__pyx_tuple__75); - __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(4, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_new, 360, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 360, __pyx_L1_error) + __pyx_tuple__83 = PyTuple_Pack(18, __pyx_n_s_mcs, __pyx_n_s_class_name, __pyx_n_s_bases, __pyx_n_s_attributes, __pyx_n_s_self_2, __pyx_n_s_containers, __pyx_n_s_cls_providers, __pyx_n_s_inherited_providers, __pyx_n_s_all_providers, __pyx_n_s_cls, __pyx_n_s_provider, __pyx_n_s_name, __pyx_n_s_container, __pyx_n_s_name, __pyx_n_s_provider, __pyx_n_s_base, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__83); + __Pyx_GIVEREF(__pyx_tuple__83); + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(4, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_new, 399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 399, __pyx_L1_error) - /* "dependency_injector/containers.pyx":408 + /* "dependency_injector/containers.pyx":447 * return cls * * def __setattr__(cls, str name, object value): # <<<<<<<<<<<<<< * """Set class attribute. * */ - __pyx_tuple__77 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 408, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__77); - __Pyx_GIVEREF(__pyx_tuple__77); - __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_setattr, 408, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_tuple__85 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); + __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_setattr, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 447, __pyx_L1_error) - /* "dependency_injector/containers.pyx":432 + /* "dependency_injector/containers.pyx":471 * super(DeclarativeContainerMetaClass, cls).__setattr__(name, value) * * def __delattr__(cls, str name): # <<<<<<<<<<<<<< * """Delete class attribute. * */ - __pyx_tuple__79 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_name); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 432, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__79); - __Pyx_GIVEREF(__pyx_tuple__79); - __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_delattr, 432, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_tuple__87 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_name); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__87); + __Pyx_GIVEREF(__pyx_tuple__87); + __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_delattr, 471, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 471, __pyx_L1_error) - /* "dependency_injector/containers.pyx":449 + /* "dependency_injector/containers.pyx":488 * * @property * def dependencies(cls): # <<<<<<<<<<<<<< * """Return dependency providers dictionary. * */ - __pyx_tuple__81 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 449, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__81); - __Pyx_GIVEREF(__pyx_tuple__81); - __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_dependencies, 449, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_tuple__89 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__89); + __Pyx_GIVEREF(__pyx_tuple__89); + __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_dependencies, 488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 488, __pyx_L1_error) - /* "dependency_injector/containers.pyx":464 + /* "dependency_injector/containers.pyx":503 * } * * def traverse(cls, types=None): # <<<<<<<<<<<<<< * """Return providers traversal generator.""" * yield from providers.traverse(*cls.providers.values(), types=types) */ - __pyx_tuple__83 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_types); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 464, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__83); - __Pyx_GIVEREF(__pyx_tuple__83); - __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__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_traverse, 464, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 464, __pyx_L1_error) - __pyx_tuple__84 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 464, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__84); - __Pyx_GIVEREF(__pyx_tuple__84); + __pyx_tuple__91 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_types); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__91); + __Pyx_GIVEREF(__pyx_tuple__91); + __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_traverse, 503, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_tuple__92 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__92); + __Pyx_GIVEREF(__pyx_tuple__92); - /* "dependency_injector/containers.pyx":468 + /* "dependency_injector/containers.pyx":507 * yield from providers.traverse(*cls.providers.values(), types=types) * * def resolve_provider_name(cls, provider): # <<<<<<<<<<<<<< * """Try to resolve provider name.""" * for provider_name, container_provider in cls.providers.items(): */ - __pyx_tuple__85 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_provider, __pyx_n_s_provider_name, __pyx_n_s_container_provider); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 468, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__85); - __Pyx_GIVEREF(__pyx_tuple__85); - __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_resolve_provider_name, 468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_tuple__93 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_provider, __pyx_n_s_provider_name, __pyx_n_s_container_provider); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__93); + __Pyx_GIVEREF(__pyx_tuple__93); + __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_resolve_provider_name, 507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 507, __pyx_L1_error) - /* "dependency_injector/containers.pyx":477 + /* "dependency_injector/containers.pyx":516 * * @property * def parent_name(cls): # <<<<<<<<<<<<<< * """Return parent name.""" * return cls.__name__ */ - __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_cls); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 477, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__87); - __Pyx_GIVEREF(__pyx_tuple__87); - __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_parent_name, 477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 477, __pyx_L1_error) + __pyx_tuple__95 = PyTuple_Pack(1, __pyx_n_s_cls); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__95); + __Pyx_GIVEREF(__pyx_tuple__95); + __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_parent_name, 516, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 516, __pyx_L1_error) - /* "dependency_injector/containers.pyx":482 + /* "dependency_injector/containers.pyx":521 * * @staticmethod * def __fetch_self(attributes): # <<<<<<<<<<<<<< * self = None * alt_names = [] */ - __pyx_tuple__89 = PyTuple_Pack(5, __pyx_n_s_attributes, __pyx_n_s_self_2, __pyx_n_s_alt_names, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 482, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__89); - __Pyx_GIVEREF(__pyx_tuple__89); - __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_fetch_self, 482, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_tuple__97 = PyTuple_Pack(5, __pyx_n_s_attributes, __pyx_n_s_self_2, __pyx_n_s_alt_names, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__97); + __Pyx_GIVEREF(__pyx_tuple__97); + __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_fetch_self, 521, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 521, __pyx_L1_error) - /* "dependency_injector/containers.pyx":567 + /* "dependency_injector/containers.pyx":606 * """ * * def __new__(cls, **overriding_providers): # <<<<<<<<<<<<<< * """Constructor. * */ - __pyx_tuple__91 = PyTuple_Pack(7, __pyx_n_s_cls, __pyx_n_s_overriding_providers, __pyx_n_s_container, __pyx_n_s_copied_providers, __pyx_n_s_copied_self, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 567, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__91); - __Pyx_GIVEREF(__pyx_tuple__91); - __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_new, 567, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 567, __pyx_L1_error) + __pyx_tuple__99 = PyTuple_Pack(7, __pyx_n_s_cls, __pyx_n_s_overriding_providers, __pyx_n_s_container, __pyx_n_s_copied_providers, __pyx_n_s_copied_self, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__99); + __Pyx_GIVEREF(__pyx_tuple__99); + __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_new, 606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 606, __pyx_L1_error) - /* "dependency_injector/containers.pyx":594 + /* "dependency_injector/containers.pyx":633 * * @classmethod * def override(cls, object overriding): # <<<<<<<<<<<<<< * """Override current container by overriding container. * */ - __pyx_tuple__93 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_overriding, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 594, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__93); - __Pyx_GIVEREF(__pyx_tuple__93); - __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override, 594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_tuple__101 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_overriding, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__101); + __Pyx_GIVEREF(__pyx_tuple__101); + __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override, 633, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 633, __pyx_L1_error) - /* "dependency_injector/containers.pyx":618 + /* "dependency_injector/containers.pyx":657 * * @classmethod * def reset_last_overriding(cls): # <<<<<<<<<<<<<< * """Reset last overriding provider for each container providers. * */ - __pyx_tuple__95 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__95); - __Pyx_GIVEREF(__pyx_tuple__95); - __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_last_overriding, 618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 618, __pyx_L1_error) + __pyx_tuple__103 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__103); + __Pyx_GIVEREF(__pyx_tuple__103); + __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_last_overriding, 657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 657, __pyx_L1_error) - /* "dependency_injector/containers.pyx":632 + /* "dependency_injector/containers.pyx":671 * * @classmethod * def reset_override(cls): # <<<<<<<<<<<<<< * """Reset all overridings for each container providers. * */ - __pyx_tuple__97 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 632, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__97); - __Pyx_GIVEREF(__pyx_tuple__97); - __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_override, 632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 632, __pyx_L1_error) + __pyx_tuple__105 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__105); + __Pyx_GIVEREF(__pyx_tuple__105); + __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_override, 671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 671, __pyx_L1_error) - /* "dependency_injector/containers.pyx":645 + /* "dependency_injector/containers.pyx":684 * class SingletonResetContext: * * def __init__(self, container): # <<<<<<<<<<<<<< * self._container = container * */ - __pyx_tuple__99 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_container); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 645, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__99); - __Pyx_GIVEREF(__pyx_tuple__99); - __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_init, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_tuple__107 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_container); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__107); + __Pyx_GIVEREF(__pyx_tuple__107); + __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_init, 684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 684, __pyx_L1_error) - /* "dependency_injector/containers.pyx":648 + /* "dependency_injector/containers.pyx":687 * self._container = container * * def __enter__(self): # <<<<<<<<<<<<<< * return self._container * */ - __pyx_tuple__101 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 648, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__101); - __Pyx_GIVEREF(__pyx_tuple__101); - __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_enter, 648, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_tuple__109 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__109); + __Pyx_GIVEREF(__pyx_tuple__109); + __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_enter, 687, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 687, __pyx_L1_error) - /* "dependency_injector/containers.pyx":651 + /* "dependency_injector/containers.pyx":690 * return self._container * * def __exit__(self, *_): # <<<<<<<<<<<<<< * self._container.reset_singletons() * */ - __pyx_tuple__104 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s__103); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 651, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__104); - __Pyx_GIVEREF(__pyx_tuple__104); - __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_exit, 651, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 651, __pyx_L1_error) + __pyx_tuple__112 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s__111); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__112); + __Pyx_GIVEREF(__pyx_tuple__112); + __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_exit, 690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 690, __pyx_L1_error) - /* "dependency_injector/containers.pyx":655 + /* "dependency_injector/containers.pyx":694 * * * def override(object container): # <<<<<<<<<<<<<< * """:py:class:`DeclarativeContainer` overriding decorator. * */ - __pyx_tuple__106 = PyTuple_Pack(3, __pyx_n_s_container, __pyx_n_s_decorator, __pyx_n_s_decorator); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__106); - __Pyx_GIVEREF(__pyx_tuple__106); - __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override, 655, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 655, __pyx_L1_error) + __pyx_tuple__114 = PyTuple_Pack(3, __pyx_n_s_container, __pyx_n_s_decorator, __pyx_n_s_decorator); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__114); + __Pyx_GIVEREF(__pyx_tuple__114); + __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override, 694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 694, __pyx_L1_error) - /* "dependency_injector/containers.pyx":672 + /* "dependency_injector/containers.pyx":711 * * * def copy(object container): # <<<<<<<<<<<<<< * """:py:class:`DeclarativeContainer` copying decorator. * */ - __pyx_tuple__108 = PyTuple_Pack(5, __pyx_n_s_container, __pyx_n_s_get_providers_memo, __pyx_n_s_get_providers_memo, __pyx_n_s_decorator, __pyx_n_s_decorator); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 672, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__108); - __Pyx_GIVEREF(__pyx_tuple__108); - __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_copy, 672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_tuple__116 = PyTuple_Pack(5, __pyx_n_s_container, __pyx_n_s_get_providers_memo, __pyx_n_s_get_providers_memo, __pyx_n_s_decorator, __pyx_n_s_decorator); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__116); + __Pyx_GIVEREF(__pyx_tuple__116); + __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_copy, 711, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -23639,7 +24867,7 @@ static int __Pyx_modinit_type_init_code(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_19dependency_injector_10containers___pyx_scope_struct__traverse) < 0) __PYX_ERR(0, 157, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_10containers___pyx_scope_struct__traverse) < 0) __PYX_ERR(0, 163, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_10containers___pyx_scope_struct__traverse.tp_print = 0; #endif @@ -23647,7 +24875,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_10containers___pyx_scope_struct__traverse.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_10containers___pyx_scope_struct__traverse = &__pyx_type_19dependency_injector_10containers___pyx_scope_struct__traverse; - if (PyType_Ready(&__pyx_type_19dependency_injector_10containers___pyx_scope_struct_1_traverse) < 0) __PYX_ERR(0, 464, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_10containers___pyx_scope_struct_1_traverse) < 0) __PYX_ERR(0, 503, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_10containers___pyx_scope_struct_1_traverse.tp_print = 0; #endif @@ -23655,7 +24883,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_10containers___pyx_scope_struct_1_traverse.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_10containers___pyx_scope_struct_1_traverse = &__pyx_type_19dependency_injector_10containers___pyx_scope_struct_1_traverse; - if (PyType_Ready(&__pyx_type_19dependency_injector_10containers___pyx_scope_struct_2_override) < 0) __PYX_ERR(0, 655, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_10containers___pyx_scope_struct_2_override) < 0) __PYX_ERR(0, 694, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_10containers___pyx_scope_struct_2_override.tp_print = 0; #endif @@ -23663,7 +24891,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_10containers___pyx_scope_struct_2_override.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_10containers___pyx_scope_struct_2_override = &__pyx_type_19dependency_injector_10containers___pyx_scope_struct_2_override; - if (PyType_Ready(&__pyx_type_19dependency_injector_10containers___pyx_scope_struct_3_copy) < 0) __PYX_ERR(0, 672, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_10containers___pyx_scope_struct_3_copy) < 0) __PYX_ERR(0, 711, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_10containers___pyx_scope_struct_3_copy.tp_print = 0; #endif @@ -24111,16 +25339,28 @@ if (!__Pyx_RefNanny) { /* "dependency_injector/containers.pyx":3 * """Containers module.""" * + * import json # <<<<<<<<<<<<<< + * import sys + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/containers.pyx":4 + * + * import json * import sys # <<<<<<<<<<<<<< * * try: */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":5 + /* "dependency_injector/containers.pyx":6 * import sys * * try: # <<<<<<<<<<<<<< @@ -24136,19 +25376,19 @@ if (!__Pyx_RefNanny) { __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "dependency_injector/containers.pyx":6 + /* "dependency_injector/containers.pyx":7 * * try: * import asyncio # <<<<<<<<<<<<<< * except ImportError: * asyncio = None */ - __pyx_t_1 = __Pyx_patch_asyncio(__Pyx_Import(__pyx_n_s_asyncio, 0, -1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L2_error) + __pyx_t_1 = __Pyx_patch_asyncio(__Pyx_Import(__pyx_n_s_asyncio, 0, -1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L2_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L2_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":5 + /* "dependency_injector/containers.pyx":6 * import sys * * try: # <<<<<<<<<<<<<< @@ -24163,7 +25403,7 @@ if (!__Pyx_RefNanny) { __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":7 + /* "dependency_injector/containers.pyx":8 * try: * import asyncio * except ImportError: # <<<<<<<<<<<<<< @@ -24173,19 +25413,19 @@ if (!__Pyx_RefNanny) { __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_5) { __Pyx_AddTraceback("dependency_injector.containers", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 7, __pyx_L4_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 8, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "dependency_injector/containers.pyx":8 + /* "dependency_injector/containers.pyx":9 * import asyncio * except ImportError: * asyncio = None # <<<<<<<<<<<<<< * - * import six + * try: */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, Py_None) < 0) __PYX_ERR(0, 8, __pyx_L4_except_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, Py_None) < 0) __PYX_ERR(0, 9, __pyx_L4_except_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -24194,7 +25434,7 @@ if (!__Pyx_RefNanny) { goto __pyx_L4_except_error; __pyx_L4_except_error:; - /* "dependency_injector/containers.pyx":5 + /* "dependency_injector/containers.pyx":6 * import sys * * try: # <<<<<<<<<<<<<< @@ -24214,106 +25454,202 @@ if (!__Pyx_RefNanny) { __pyx_L7_try_end:; } - /* "dependency_injector/containers.pyx":10 + /* "dependency_injector/containers.pyx":11 * asyncio = None * + * try: # <<<<<<<<<<<<<< + * import yaml + * except ImportError: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + /*try:*/ { + + /* "dependency_injector/containers.pyx":12 + * + * try: + * import yaml # <<<<<<<<<<<<<< + * except ImportError: + * yaml = None + */ + __pyx_t_7 = __Pyx_Import(__pyx_n_s_yaml, 0, -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_yaml, __pyx_t_7) < 0) __PYX_ERR(0, 12, __pyx_L10_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "dependency_injector/containers.pyx":11 + * asyncio = None + * + * try: # <<<<<<<<<<<<<< + * import yaml + * except ImportError: + */ + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L15_try_end; + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "dependency_injector/containers.pyx":13 + * try: + * import yaml + * except ImportError: # <<<<<<<<<<<<<< + * yaml = None + * + */ + __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); + if (__pyx_t_5) { + __Pyx_AddTraceback("dependency_injector.containers", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_1); + + /* "dependency_injector/containers.pyx":14 + * import yaml + * except ImportError: + * yaml = None # <<<<<<<<<<<<<< + * + * import six + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_yaml, Py_None) < 0) __PYX_ERR(0, 14, __pyx_L12_except_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L11_exception_handled; + } + goto __pyx_L12_except_error; + __pyx_L12_except_error:; + + /* "dependency_injector/containers.pyx":11 + * asyncio = None + * + * try: # <<<<<<<<<<<<<< + * import yaml + * except ImportError: + */ + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2); + goto __pyx_L1_error; + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2); + __pyx_L15_try_end:; + } + + /* "dependency_injector/containers.pyx":16 + * yaml = None + * * import six # <<<<<<<<<<<<<< * * from . import providers, errors */ - __pyx_t_7 = __Pyx_Import(__pyx_n_s_six, 0, -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 10, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_six, __pyx_t_7) < 0) __PYX_ERR(0, 10, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_Import(__pyx_n_s_six, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_six, __pyx_t_1) < 0) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":12 + /* "dependency_injector/containers.pyx":18 * import six * * from . import providers, errors # <<<<<<<<<<<<<< * from .providers cimport __is_future_or_coroutine * */ - __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_providers); __Pyx_GIVEREF(__pyx_n_s_providers); - PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_providers); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_providers); __Pyx_INCREF(__pyx_n_s_errors); __Pyx_GIVEREF(__pyx_n_s_errors); - PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_errors); - __pyx_t_6 = __Pyx_Import(__pyx_n_s__22, __pyx_t_7, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12, __pyx_L1_error) + PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_errors); + __pyx_t_6 = __Pyx_Import(__pyx_n_s__23, __pyx_t_1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_providers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_providers, __pyx_t_7) < 0) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_providers, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":16 + /* "dependency_injector/containers.pyx":22 * * * if sys.version_info[:2] >= (3, 6): # <<<<<<<<<<<<<< * from .wiring import wire, unwire * else: */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_version_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_version_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 2, NULL, NULL, &__pyx_slice__23, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 16, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 2, NULL, NULL, &__pyx_slice__24, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__24, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__25, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 16, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_8) { - /* "dependency_injector/containers.pyx":17 + /* "dependency_injector/containers.pyx":23 * * if sys.version_info[:2] >= (3, 6): * from .wiring import wire, unwire # <<<<<<<<<<<<<< * else: * def wire(*args, **kwargs): */ - __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_wire); __Pyx_GIVEREF(__pyx_n_s_wire); - PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_wire); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_wire); __Pyx_INCREF(__pyx_n_s_unwire); __Pyx_GIVEREF(__pyx_n_s_unwire); - PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_unwire); - __pyx_t_6 = __Pyx_Import(__pyx_n_s_wiring, __pyx_t_7, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 17, __pyx_L1_error) + PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_unwire); + __pyx_t_6 = __Pyx_Import(__pyx_n_s_wiring, __pyx_t_1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_wire); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_wire, __pyx_t_7) < 0) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_unwire); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_unwire, __pyx_t_7) < 0) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_wire); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_wire, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_unwire); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_unwire, __pyx_t_1) < 0) __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; - /* "dependency_injector/containers.pyx":16 + /* "dependency_injector/containers.pyx":22 * * * if sys.version_info[:2] >= (3, 6): # <<<<<<<<<<<<<< * from .wiring import wire, unwire * else: */ - goto __pyx_L10; + goto __pyx_L18; } - /* "dependency_injector/containers.pyx":19 + /* "dependency_injector/containers.pyx":25 * from .wiring import wire, unwire * else: * def wire(*args, **kwargs): # <<<<<<<<<<<<<< @@ -24321,565 +25657,602 @@ if (!__Pyx_RefNanny) { * */ /*else*/ { - __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_10containers_1wire, NULL, __pyx_n_s_dependency_injector_containers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_10containers_1wire, NULL, __pyx_n_s_dependency_injector_containers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_wire, __pyx_t_6) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_wire, __pyx_t_6) < 0) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":22 + /* "dependency_injector/containers.pyx":28 * raise NotImplementedError('Wiring requires Python 3.6 or above') * * def unwire(*args, **kwargs): # <<<<<<<<<<<<<< * raise NotImplementedError('Wiring requires Python 3.6 or above') * */ - __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_10containers_3unwire, NULL, __pyx_n_s_dependency_injector_containers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 22, __pyx_L1_error) + __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_10containers_3unwire, NULL, __pyx_n_s_dependency_injector_containers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_unwire, __pyx_t_6) < 0) __PYX_ERR(0, 22, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_unwire, __pyx_t_6) < 0) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_L10:; + __pyx_L18:; - /* "dependency_injector/containers.pyx":26 + /* "dependency_injector/containers.pyx":32 * * * class Container(object): # <<<<<<<<<<<<<< * """Abstract container.""" * */ - __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__29); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__30); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_tuple__29, __pyx_n_s_Container, __pyx_n_s_Container, (PyObject *) NULL, __pyx_n_s_dependency_injector_containers, __pyx_kp_s_Abstract_container); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_Container, __pyx_tuple__29, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_tuple__30, __pyx_n_s_Container, __pyx_n_s_Container, (PyObject *) NULL, __pyx_n_s_dependency_injector_containers, __pyx_kp_s_Abstract_container); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Container, __pyx_t_1) < 0) __PYX_ERR(0, 26, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_Container, __pyx_tuple__30, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Container, __pyx_t_7) < 0) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":30 + /* "dependency_injector/containers.pyx":36 * * * class DynamicContainer(Container): # <<<<<<<<<<<<<< * """Dynamic inversion of control container. * */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Container); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Container); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 30, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_DynamicContainer, __pyx_n_s_DynamicContainer, (PyObject *) NULL, __pyx_n_s_dependency_injector_containers, __pyx_kp_s_Dynamic_inversion_of_control_con); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_1, __pyx_n_s_DynamicContainer, __pyx_n_s_DynamicContainer, (PyObject *) NULL, __pyx_n_s_dependency_injector_containers, __pyx_kp_s_Dynamic_inversion_of_control_con); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); - /* "dependency_injector/containers.pyx":59 + /* "dependency_injector/containers.pyx":65 * """ * * __IS_CONTAINER__ = True # <<<<<<<<<<<<<< * * def __init__(self): */ - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_IS_CONTAINER, Py_True) < 0) __PYX_ERR(0, 59, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_IS_CONTAINER, Py_True) < 0) __PYX_ERR(0, 65, __pyx_L1_error) - /* "dependency_injector/containers.pyx":61 + /* "dependency_injector/containers.pyx":67 * __IS_CONTAINER__ = True * * def __init__(self): # <<<<<<<<<<<<<< * """Initializer. * */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_1__init__, 0, __pyx_n_s_DynamicContainer___init, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_1__init__, 0, __pyx_n_s_DynamicContainer___init, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_9) < 0) __PYX_ERR(0, 61, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_9) < 0) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":76 + /* "dependency_injector/containers.pyx":82 * super(DynamicContainer, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * """Create and return full copy of container.""" * copied = memo.get(id(self)) */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_3__deepcopy__, 0, __pyx_n_s_DynamicContainer___deepcopy, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_3__deepcopy__, 0, __pyx_n_s_DynamicContainer___deepcopy, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_deepcopy_2, __pyx_t_9) < 0) __PYX_ERR(0, 76, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_deepcopy_2, __pyx_t_9) < 0) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":100 + /* "dependency_injector/containers.pyx":106 * return copied * * def __setattr__(self, str name, object value): # <<<<<<<<<<<<<< * """Set instance attribute. * */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_5__setattr__, 0, __pyx_n_s_DynamicContainer___setattr, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_5__setattr__, 0, __pyx_n_s_DynamicContainer___setattr, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_setattr, __pyx_t_9) < 0) __PYX_ERR(0, 100, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_setattr, __pyx_t_9) < 0) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":126 + /* "dependency_injector/containers.pyx":132 * super(DynamicContainer, self).__setattr__(name, value) * * def __delattr__(self, str name): # <<<<<<<<<<<<<< * """Delete instance attribute. * */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_7__delattr__, 0, __pyx_n_s_DynamicContainer___delattr, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_7__delattr__, 0, __pyx_n_s_DynamicContainer___delattr, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_delattr, __pyx_t_9) < 0) __PYX_ERR(0, 126, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_delattr, __pyx_t_9) < 0) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":142 + /* "dependency_injector/containers.pyx":148 * * @property * def dependencies(self): # <<<<<<<<<<<<<< * """Return dependency providers dictionary. * */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_9dependencies, 0, __pyx_n_s_DynamicContainer_dependencies, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_9dependencies, 0, __pyx_n_s_DynamicContainer_dependencies, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "dependency_injector/containers.pyx":141 + /* "dependency_injector/containers.pyx":147 * super(DynamicContainer, self).__delattr__(name) * * @property # <<<<<<<<<<<<<< * def dependencies(self): * """Return dependency providers dictionary. */ - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_dependencies, __pyx_t_10) < 0) __PYX_ERR(0, 142, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_dependencies, __pyx_t_10) < 0) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":157 + /* "dependency_injector/containers.pyx":163 * } * * def traverse(self, types=None): # <<<<<<<<<<<<<< * """Return providers traversal generator.""" * yield from providers.traverse(*self.providers.values(), types=types) */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_11traverse, 0, __pyx_n_s_DynamicContainer_traverse, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_11traverse, 0, __pyx_n_s_DynamicContainer_traverse, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_tuple__41); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_traverse, __pyx_t_10) < 0) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_tuple__42); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_traverse, __pyx_t_10) < 0) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":161 + /* "dependency_injector/containers.pyx":167 * yield from providers.traverse(*self.providers.values(), types=types) * * def set_providers(self, **providers): # <<<<<<<<<<<<<< * """Set container providers. * */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_14set_providers, 0, __pyx_n_s_DynamicContainer_set_providers, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_14set_providers, 0, __pyx_n_s_DynamicContainer_set_providers, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_set_providers, __pyx_t_10) < 0) __PYX_ERR(0, 161, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_providers, __pyx_t_10) < 0) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":173 + /* "dependency_injector/containers.pyx":179 * setattr(self, name, provider) * * def set_provider(self, name, provider): # <<<<<<<<<<<<<< * """Set container provider. * */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_16set_provider, 0, __pyx_n_s_DynamicContainer_set_provider, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_16set_provider, 0, __pyx_n_s_DynamicContainer_set_provider, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_set_provider, __pyx_t_10) < 0) __PYX_ERR(0, 173, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_provider, __pyx_t_10) < 0) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":186 + /* "dependency_injector/containers.pyx":192 * setattr(self, name, provider) * * def override(self, object overriding): # <<<<<<<<<<<<<< * """Override current container by overriding container. * */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_18override, 0, __pyx_n_s_DynamicContainer_override, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_18override, 0, __pyx_n_s_DynamicContainer_override, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_override, __pyx_t_10) < 0) __PYX_ERR(0, 186, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_override, __pyx_t_10) < 0) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":209 + /* "dependency_injector/containers.pyx":215 * pass * * def override_providers(self, **overriding_providers): # <<<<<<<<<<<<<< * """Override container providers. * */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_20override_providers, 0, __pyx_n_s_DynamicContainer_override_provid, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_20override_providers, 0, __pyx_n_s_DynamicContainer_override_provid, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_override_providers, __pyx_t_10) < 0) __PYX_ERR(0, 209, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_override_providers, __pyx_t_10) < 0) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":222 + /* "dependency_injector/containers.pyx":228 * container_provider.override(overriding_provider) * * def reset_last_overriding(self): # <<<<<<<<<<<<<< * """Reset last overriding provider for each container providers. * */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_22reset_last_overriding, 0, __pyx_n_s_DynamicContainer_reset_last_over, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_22reset_last_overriding, 0, __pyx_n_s_DynamicContainer_reset_last_over, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_reset_last_overriding, __pyx_t_10) < 0) __PYX_ERR(0, 222, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_reset_last_overriding, __pyx_t_10) < 0) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":235 + /* "dependency_injector/containers.pyx":241 * provider.reset_last_overriding() * * def reset_override(self): # <<<<<<<<<<<<<< * """Reset all overridings for each container providers. * */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_24reset_override, 0, __pyx_n_s_DynamicContainer_reset_override, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_24reset_override, 0, __pyx_n_s_DynamicContainer_reset_override, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_reset_override, __pyx_t_10) < 0) __PYX_ERR(0, 235, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_reset_override, __pyx_t_10) < 0) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":245 + /* "dependency_injector/containers.pyx":251 * provider.reset_override() * * def wire(self, modules=None, packages=None): # <<<<<<<<<<<<<< * """Wire container providers with provided packages and modules. * */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_26wire, 0, __pyx_n_s_DynamicContainer_wire, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_26wire, 0, __pyx_n_s_DynamicContainer_wire, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_tuple__56); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_wire, __pyx_t_10) < 0) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_tuple__57); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_wire, __pyx_t_10) < 0) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":262 + /* "dependency_injector/containers.pyx":268 * self.wired_to_packages.extend(packages) * * def unwire(self): # <<<<<<<<<<<<<< * """Unwire container providers from previously wired packages and modules.""" * unwire( */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_28unwire, 0, __pyx_n_s_DynamicContainer_unwire, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_28unwire, 0, __pyx_n_s_DynamicContainer_unwire, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_unwire, __pyx_t_10) < 0) __PYX_ERR(0, 262, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unwire, __pyx_t_10) < 0) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":272 + /* "dependency_injector/containers.pyx":278 * self.wired_to_packages.clear() * * def init_resources(self): # <<<<<<<<<<<<<< * """Initialize all container resources.""" * futures = [] */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_30init_resources, 0, __pyx_n_s_DynamicContainer_init_resources, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_30init_resources, 0, __pyx_n_s_DynamicContainer_init_resources, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_resources, __pyx_t_10) < 0) __PYX_ERR(0, 272, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init_resources, __pyx_t_10) < 0) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":285 + /* "dependency_injector/containers.pyx":291 * return asyncio.gather(*futures) * * def shutdown_resources(self): # <<<<<<<<<<<<<< * """Shutdown all container resources.""" * futures = [] */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_32shutdown_resources, 0, __pyx_n_s_DynamicContainer_shutdown_resour, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_32shutdown_resources, 0, __pyx_n_s_DynamicContainer_shutdown_resour, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_shutdown_resources, __pyx_t_10) < 0) __PYX_ERR(0, 285, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown_resources, __pyx_t_10) < 0) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":298 + /* "dependency_injector/containers.pyx":304 * return asyncio.gather(*futures) * * def apply_container_providers_overridings(self): # <<<<<<<<<<<<<< * """Apply container providers' overridings.""" * for provider in self.traverse(types=[providers.Container]): */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_34apply_container_providers_overridings, 0, __pyx_n_s_DynamicContainer_apply_container, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_34apply_container_providers_overridings, 0, __pyx_n_s_DynamicContainer_apply_container, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_apply_container_providers_overri, __pyx_t_10) < 0) __PYX_ERR(0, 298, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_apply_container_providers_overri, __pyx_t_10) < 0) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":303 + /* "dependency_injector/containers.pyx":309 * provider.apply_overridings() * * def reset_singletons(self): # <<<<<<<<<<<<<< * """Reset container singletons.""" * for provider in self.traverse(types=[providers.BaseSingleton]): */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_36reset_singletons, 0, __pyx_n_s_DynamicContainer_reset_singleton, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_36reset_singletons, 0, __pyx_n_s_DynamicContainer_reset_singleton, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_reset_singletons, __pyx_t_10) < 0) __PYX_ERR(0, 303, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_reset_singletons, __pyx_t_10) < 0) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":309 + /* "dependency_injector/containers.pyx":315 * return SingletonResetContext(self) * * def check_dependencies(self): # <<<<<<<<<<<<<< * """Check if container dependencies are defined. * */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_38check_dependencies, 0, __pyx_n_s_DynamicContainer_check_dependenc, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_38check_dependencies, 0, __pyx_n_s_DynamicContainer_check_dependenc, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_check_dependencies, __pyx_t_10) < 0) __PYX_ERR(0, 309, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_check_dependencies, __pyx_t_10) < 0) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":333 + /* "dependency_injector/containers.pyx":339 * ) * + * def from_schema(self, schema): # <<<<<<<<<<<<<< + * """Build container providers from schema.""" + * from .schema import build_schema + */ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_40from_schema, 0, __pyx_n_s_DynamicContainer_from_schema, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_from_schema, __pyx_t_10) < 0) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "dependency_injector/containers.pyx":345 + * self.set_provider(name, provider) + * + * def from_yaml_schema(self, filepath, loader=None): # <<<<<<<<<<<<<< + * """Build container providers from YAML schema. + * + */ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_42from_yaml_schema, 0, __pyx_n_s_DynamicContainer_from_yaml_schem, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_tuple__74); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_from_yaml_schema, __pyx_t_10) < 0) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "dependency_injector/containers.pyx":366 + * self.from_schema(schema) + * + * def from_json_schema(self, filepath): # <<<<<<<<<<<<<< + * """Build container providers from JSON schema.""" + * with open(filepath) as file: + */ + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_44from_json_schema, 0, __pyx_n_s_DynamicContainer_from_json_schem, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_from_json_schema, __pyx_t_10) < 0) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "dependency_injector/containers.pyx":372 + * self.from_schema(schema) + * * def resolve_provider_name(self, provider): # <<<<<<<<<<<<<< * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_40resolve_provider_name, 0, __pyx_n_s_DynamicContainer_resolve_provide, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_46resolve_provider_name, 0, __pyx_n_s_DynamicContainer_resolve_provide, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_resolve_provider_name, __pyx_t_10) < 0) __PYX_ERR(0, 333, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_resolve_provider_name, __pyx_t_10) < 0) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":342 + /* "dependency_injector/containers.pyx":381 * * @property * def parent_name(self): # <<<<<<<<<<<<<< * """Return parent name.""" * if self.parent: */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_42parent_name, 0, __pyx_n_s_DynamicContainer_parent_name, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_48parent_name, 0, __pyx_n_s_DynamicContainer_parent_name, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - /* "dependency_injector/containers.pyx":341 + /* "dependency_injector/containers.pyx":380 * raise errors.Error(f'Can not resolve name for provider "{provider}"') * * @property # <<<<<<<<<<<<<< * def parent_name(self): * """Return parent name.""" */ - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 341, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_parent_name, __pyx_t_9) < 0) __PYX_ERR(0, 342, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_parent_name, __pyx_t_9) < 0) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":352 + /* "dependency_injector/containers.pyx":391 * return None * * def assign_parent(self, parent): # <<<<<<<<<<<<<< * """Assign parent.""" * self.parent = parent */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_44assign_parent, 0, __pyx_n_s_DynamicContainer_assign_parent, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_16DynamicContainer_50assign_parent, 0, __pyx_n_s_DynamicContainer_assign_parent, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_assign_parent, __pyx_t_9) < 0) __PYX_ERR(0, 352, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_assign_parent, __pyx_t_9) < 0) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":30 + /* "dependency_injector/containers.pyx":36 * * * class DynamicContainer(Container): # <<<<<<<<<<<<<< * """Dynamic inversion of control container. * */ - __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_DynamicContainer, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_DynamicContainer, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DynamicContainer, __pyx_t_9) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DynamicContainer, __pyx_t_9) < 0) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":357 + /* "dependency_injector/containers.pyx":396 * * * class DeclarativeContainerMetaClass(type): # <<<<<<<<<<<<<< * """Declarative inversion of control container meta class.""" * */ - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 357, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)(&PyType_Type))); __Pyx_GIVEREF(((PyObject *)(&PyType_Type))); - PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&PyType_Type))); - __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 357, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyType_Type))); + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_DeclarativeContainerMetaClass_2, __pyx_n_s_DeclarativeContainerMetaClass_2, (PyObject *) NULL, __pyx_n_s_dependency_injector_containers, __pyx_kp_s_Declarative_inversion_of_control); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_1, __pyx_n_s_DeclarativeContainerMetaClass_2, __pyx_n_s_DeclarativeContainerMetaClass_2, (PyObject *) NULL, __pyx_n_s_dependency_injector_containers, __pyx_kp_s_Declarative_inversion_of_control); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); - /* "dependency_injector/containers.pyx":360 + /* "dependency_injector/containers.pyx":399 * """Declarative inversion of control container meta class.""" * * def __new__(type mcs, str class_name, tuple bases, dict attributes): # <<<<<<<<<<<<<< * """Declarative container class factory.""" * self = mcs.__fetch_self(attributes) */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DeclarativeContainerMetaClass_3, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 360, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DeclarativeContainerMetaClass_3, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_new, __pyx_t_9) < 0) __PYX_ERR(0, 360, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_new, __pyx_t_9) < 0) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":408 + /* "dependency_injector/containers.pyx":447 * return cls * * def __setattr__(cls, str name, object value): # <<<<<<<<<<<<<< * """Set class attribute. * */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_3__setattr__, 0, __pyx_n_s_DeclarativeContainerMetaClass_4, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_3__setattr__, 0, __pyx_n_s_DeclarativeContainerMetaClass_4, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_setattr, __pyx_t_9) < 0) __PYX_ERR(0, 408, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_setattr, __pyx_t_9) < 0) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":432 + /* "dependency_injector/containers.pyx":471 * super(DeclarativeContainerMetaClass, cls).__setattr__(name, value) * * def __delattr__(cls, str name): # <<<<<<<<<<<<<< * """Delete class attribute. * */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_5__delattr__, 0, __pyx_n_s_DeclarativeContainerMetaClass_5, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_5__delattr__, 0, __pyx_n_s_DeclarativeContainerMetaClass_5, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_delattr, __pyx_t_9) < 0) __PYX_ERR(0, 432, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_delattr, __pyx_t_9) < 0) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":449 + /* "dependency_injector/containers.pyx":488 * * @property * def dependencies(cls): # <<<<<<<<<<<<<< * """Return dependency providers dictionary. * */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_7dependencies, 0, __pyx_n_s_DeclarativeContainerMetaClass_de, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_7dependencies, 0, __pyx_n_s_DeclarativeContainerMetaClass_de, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "dependency_injector/containers.pyx":448 + /* "dependency_injector/containers.pyx":487 * super(DeclarativeContainerMetaClass, cls).__delattr__(name) * * @property # <<<<<<<<<<<<<< * def dependencies(cls): * """Return dependency providers dictionary. */ - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 448, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_dependencies, __pyx_t_10) < 0) __PYX_ERR(0, 449, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_dependencies, __pyx_t_10) < 0) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":464 + /* "dependency_injector/containers.pyx":503 * } * * def traverse(cls, types=None): # <<<<<<<<<<<<<< * """Return providers traversal generator.""" * yield from providers.traverse(*cls.providers.values(), types=types) */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_9traverse, 0, __pyx_n_s_DeclarativeContainerMetaClass_tr, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_9traverse, 0, __pyx_n_s_DeclarativeContainerMetaClass_tr, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_tuple__84); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_traverse, __pyx_t_10) < 0) __PYX_ERR(0, 464, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_tuple__92); + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_traverse, __pyx_t_10) < 0) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":468 + /* "dependency_injector/containers.pyx":507 * yield from providers.traverse(*cls.providers.values(), types=types) * * def resolve_provider_name(cls, provider): # <<<<<<<<<<<<<< * """Try to resolve provider name.""" * for provider_name, container_provider in cls.providers.items(): */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_12resolve_provider_name, 0, __pyx_n_s_DeclarativeContainerMetaClass_re, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_12resolve_provider_name, 0, __pyx_n_s_DeclarativeContainerMetaClass_re, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_resolve_provider_name, __pyx_t_10) < 0) __PYX_ERR(0, 468, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_resolve_provider_name, __pyx_t_10) < 0) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":477 + /* "dependency_injector/containers.pyx":516 * * @property * def parent_name(cls): # <<<<<<<<<<<<<< * """Return parent name.""" * return cls.__name__ */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_14parent_name, 0, __pyx_n_s_DeclarativeContainerMetaClass_pa, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 477, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_14parent_name, 0, __pyx_n_s_DeclarativeContainerMetaClass_pa, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - /* "dependency_injector/containers.pyx":476 + /* "dependency_injector/containers.pyx":515 * raise errors.Error(f'Can not resolve name for provider "{provider}"') * * @property # <<<<<<<<<<<<<< * def parent_name(cls): * """Return parent name.""" */ - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_parent_name, __pyx_t_9) < 0) __PYX_ERR(0, 477, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_parent_name, __pyx_t_9) < 0) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":482 + /* "dependency_injector/containers.pyx":521 * * @staticmethod * def __fetch_self(attributes): # <<<<<<<<<<<<<< * self = None * alt_names = [] */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_16__fetch_self, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DeclarativeContainerMetaClass_6, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_29DeclarativeContainerMetaClass_16__fetch_self, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DeclarativeContainerMetaClass_6, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "dependency_injector/containers.pyx":481 + /* "dependency_injector/containers.pyx":520 * return cls.__name__ * * @staticmethod # <<<<<<<<<<<<<< * def __fetch_self(attributes): * self = None */ - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_DeclarativeContainerMetaClass, __pyx_t_10) < 0) __PYX_ERR(0, 482, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_DeclarativeContainerMetaClass, __pyx_t_10) < 0) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":357 + /* "dependency_injector/containers.pyx":396 * * * class DeclarativeContainerMetaClass(type): # <<<<<<<<<<<<<< * """Declarative inversion of control container meta class.""" * */ - __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_DeclarativeContainerMetaClass_2, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_DeclarativeContainerMetaClass_2, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeclarativeContainerMetaClass_2, __pyx_t_10) < 0) __PYX_ERR(0, 357, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeclarativeContainerMetaClass_2, __pyx_t_10) < 0) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":505 + /* "dependency_injector/containers.pyx":544 * * @six.add_metaclass(DeclarativeContainerMetaClass) * class DeclarativeContainer(Container): # <<<<<<<<<<<<<< * """Declarative inversion of control container. * */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Container); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 505, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 505, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 505, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_DeclarativeContainer, __pyx_n_s_DeclarativeContainer, (PyObject *) NULL, __pyx_n_s_dependency_injector_containers, __pyx_kp_s_Declarative_inversion_of_control_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Container); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_6, __pyx_n_s_DeclarativeContainer, __pyx_n_s_DeclarativeContainer, (PyObject *) NULL, __pyx_n_s_dependency_injector_containers, __pyx_kp_s_Declarative_inversion_of_control_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); - /* "dependency_injector/containers.pyx":516 + /* "dependency_injector/containers.pyx":555 * """ * * __IS_CONTAINER__ = True # <<<<<<<<<<<<<< * * provider_type = providers.Provider */ - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_IS_CONTAINER, Py_True) < 0) __PYX_ERR(0, 516, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_IS_CONTAINER, Py_True) < 0) __PYX_ERR(0, 555, __pyx_L1_error) - /* "dependency_injector/containers.pyx":518 + /* "dependency_injector/containers.pyx":557 * __IS_CONTAINER__ = True * * provider_type = providers.Provider # <<<<<<<<<<<<<< @@ -24887,189 +26260,189 @@ if (!__Pyx_RefNanny) { * */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_providers); - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 518, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_Provider); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_Provider); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_provider_type, __pyx_t_9) < 0) __PYX_ERR(0, 518, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_provider_type, __pyx_t_9) < 0) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":524 + /* "dependency_injector/containers.pyx":563 * """ * * instance_type = DynamicContainer # <<<<<<<<<<<<<< * """Type of container that is returned on instantiating declarative * container. */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_DynamicContainer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_DynamicContainer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_instance_type, __pyx_t_9) < 0) __PYX_ERR(0, 524, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_instance_type, __pyx_t_9) < 0) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":531 + /* "dependency_injector/containers.pyx":570 * """ * * containers = dict() # <<<<<<<<<<<<<< * """Read-only dictionary of all nested containers. * */ - __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 531, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_containers, __pyx_t_9) < 0) __PYX_ERR(0, 531, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_containers, __pyx_t_9) < 0) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":537 + /* "dependency_injector/containers.pyx":576 * """ * * providers = dict() # <<<<<<<<<<<<<< * """Read-only dictionary of all providers. * */ - __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_providers, __pyx_t_9) < 0) __PYX_ERR(0, 537, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_providers, __pyx_t_9) < 0) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":543 + /* "dependency_injector/containers.pyx":582 * """ * * cls_providers = dict() # <<<<<<<<<<<<<< * """Read-only dictionary of current container providers. * */ - __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_cls_providers, __pyx_t_9) < 0) __PYX_ERR(0, 543, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_cls_providers, __pyx_t_9) < 0) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":549 + /* "dependency_injector/containers.pyx":588 * """ * * inherited_providers = dict() # <<<<<<<<<<<<<< * """Read-only dictionary of inherited providers. * */ - __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 549, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_inherited_providers, __pyx_t_9) < 0) __PYX_ERR(0, 549, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_inherited_providers, __pyx_t_9) < 0) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":555 + /* "dependency_injector/containers.pyx":594 * """ * * overridden = tuple() # <<<<<<<<<<<<<< * """Tuple of overriding containers. * */ - __pyx_t_9 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_overridden, __pyx_t_9) < 0) __PYX_ERR(0, 555, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_overridden, __pyx_t_9) < 0) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":561 + /* "dependency_injector/containers.pyx":600 * """ * * __self__ = None # <<<<<<<<<<<<<< * """Provider that provides current container. * */ - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_self, Py_None) < 0) __PYX_ERR(0, 561, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_self, Py_None) < 0) __PYX_ERR(0, 600, __pyx_L1_error) - /* "dependency_injector/containers.pyx":567 + /* "dependency_injector/containers.pyx":606 * """ * * def __new__(cls, **overriding_providers): # <<<<<<<<<<<<<< * """Constructor. * */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_20DeclarativeContainer_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DeclarativeContainer___new, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 567, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_20DeclarativeContainer_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_DeclarativeContainer___new, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_new, __pyx_t_9) < 0) __PYX_ERR(0, 567, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_new, __pyx_t_9) < 0) __PYX_ERR(0, 606, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":594 + /* "dependency_injector/containers.pyx":633 * * @classmethod * def override(cls, object overriding): # <<<<<<<<<<<<<< * """Override current container by overriding container. * */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_20DeclarativeContainer_3override, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_DeclarativeContainer_override, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_20DeclarativeContainer_3override, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_DeclarativeContainer_override, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "dependency_injector/containers.pyx":593 + /* "dependency_injector/containers.pyx":632 * return container * * @classmethod # <<<<<<<<<<<<<< * def override(cls, object overriding): * """Override current container by overriding container. */ - __pyx_t_10 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 593, __pyx_L1_error) + __pyx_t_10 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_override, __pyx_t_10) < 0) __PYX_ERR(0, 594, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_override, __pyx_t_10) < 0) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":618 + /* "dependency_injector/containers.pyx":657 * * @classmethod * def reset_last_overriding(cls): # <<<<<<<<<<<<<< * """Reset last overriding provider for each container providers. * */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_20DeclarativeContainer_5reset_last_overriding, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_DeclarativeContainer_reset_last, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 618, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_20DeclarativeContainer_5reset_last_overriding, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_DeclarativeContainer_reset_last, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - /* "dependency_injector/containers.pyx":617 + /* "dependency_injector/containers.pyx":656 * pass * * @classmethod # <<<<<<<<<<<<<< * def reset_last_overriding(cls): * """Reset last overriding provider for each container providers. */ - __pyx_t_9 = __Pyx_Method_ClassMethod(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_t_9 = __Pyx_Method_ClassMethod(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_reset_last_overriding, __pyx_t_9) < 0) __PYX_ERR(0, 618, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_reset_last_overriding, __pyx_t_9) < 0) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/containers.pyx":632 + /* "dependency_injector/containers.pyx":671 * * @classmethod * def reset_override(cls): # <<<<<<<<<<<<<< * """Reset all overridings for each container providers. * */ - __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_20DeclarativeContainer_7reset_override, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_DeclarativeContainer_reset_overr, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 632, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_20DeclarativeContainer_7reset_override, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_DeclarativeContainer_reset_overr, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "dependency_injector/containers.pyx":631 + /* "dependency_injector/containers.pyx":670 * provider.reset_last_overriding() * * @classmethod # <<<<<<<<<<<<<< * def reset_override(cls): * """Reset all overridings for each container providers. */ - __pyx_t_10 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_10 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_reset_override, __pyx_t_10) < 0) __PYX_ERR(0, 632, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_reset_override, __pyx_t_10) < 0) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/containers.pyx":504 + /* "dependency_injector/containers.pyx":543 * * * @six.add_metaclass(DeclarativeContainerMetaClass) # <<<<<<<<<<<<<< * class DeclarativeContainer(Container): * """Declarative inversion of control container. */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_six); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_six); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_add_metaclass); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_add_metaclass); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_DeclarativeContainerMetaClass_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_DeclarativeContainerMetaClass_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { @@ -25084,18 +26457,18 @@ if (!__Pyx_RefNanny) { __pyx_t_9 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 504, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "dependency_injector/containers.pyx":505 + /* "dependency_injector/containers.pyx":544 * * @six.add_metaclass(DeclarativeContainerMetaClass) * class DeclarativeContainer(Container): # <<<<<<<<<<<<<< * """Declarative inversion of control container. * */ - __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_DeclarativeContainer, __pyx_t_6, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 505, __pyx_L1_error) + __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DeclarativeContainer, __pyx_t_6, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { @@ -25110,102 +26483,102 @@ if (!__Pyx_RefNanny) { __pyx_t_10 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_12); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 504, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeclarativeContainer, __pyx_t_10) < 0) __PYX_ERR(0, 505, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeclarativeContainer, __pyx_t_10) < 0) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":643 + /* "dependency_injector/containers.pyx":682 * * * class SingletonResetContext: # <<<<<<<<<<<<<< * * def __init__(self, container): */ - __pyx_t_6 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_SingletonResetContext, __pyx_n_s_SingletonResetContext, (PyObject *) NULL, __pyx_n_s_dependency_injector_containers, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_SingletonResetContext, __pyx_n_s_SingletonResetContext, (PyObject *) NULL, __pyx_n_s_dependency_injector_containers, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "dependency_injector/containers.pyx":645 + /* "dependency_injector/containers.pyx":684 * class SingletonResetContext: * * def __init__(self, container): # <<<<<<<<<<<<<< * self._container = container * */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_21SingletonResetContext_1__init__, 0, __pyx_n_s_SingletonResetContext___init, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 645, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 645, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_21SingletonResetContext_1__init__, 0, __pyx_n_s_SingletonResetContext___init, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":648 + /* "dependency_injector/containers.pyx":687 * self._container = container * * def __enter__(self): # <<<<<<<<<<<<<< * return self._container * */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_21SingletonResetContext_3__enter__, 0, __pyx_n_s_SingletonResetContext___enter, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 648, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_enter, __pyx_t_7) < 0) __PYX_ERR(0, 648, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_21SingletonResetContext_3__enter__, 0, __pyx_n_s_SingletonResetContext___enter, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_enter, __pyx_t_1) < 0) __PYX_ERR(0, 687, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":651 + /* "dependency_injector/containers.pyx":690 * return self._container * * def __exit__(self, *_): # <<<<<<<<<<<<<< * self._container.reset_singletons() * */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_21SingletonResetContext_5__exit__, 0, __pyx_n_s_SingletonResetContext___exit, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 651, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_exit, __pyx_t_7) < 0) __PYX_ERR(0, 651, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_10containers_21SingletonResetContext_5__exit__, 0, __pyx_n_s_SingletonResetContext___exit, NULL, __pyx_n_s_dependency_injector_containers, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_exit, __pyx_t_1) < 0) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/containers.pyx":643 + /* "dependency_injector/containers.pyx":682 * * * class SingletonResetContext: # <<<<<<<<<<<<<< * * def __init__(self, container): */ - __pyx_t_7 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_SingletonResetContext, __pyx_empty_tuple, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SingletonResetContext, __pyx_t_7) < 0) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_SingletonResetContext, __pyx_empty_tuple, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SingletonResetContext, __pyx_t_1) < 0) __PYX_ERR(0, 682, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":655 + /* "dependency_injector/containers.pyx":694 * * * def override(object container): # <<<<<<<<<<<<<< * """:py:class:`DeclarativeContainer` overriding decorator. * */ - __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_10containers_5override, NULL, __pyx_n_s_dependency_injector_containers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 655, __pyx_L1_error) + __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_10containers_5override, NULL, __pyx_n_s_dependency_injector_containers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_override, __pyx_t_6) < 0) __PYX_ERR(0, 655, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_override, __pyx_t_6) < 0) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/containers.pyx":672 + /* "dependency_injector/containers.pyx":711 * * * def copy(object container): # <<<<<<<<<<<<<< * """:py:class:`DeclarativeContainer` copying decorator. * */ - __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_10containers_7copy, NULL, __pyx_n_s_dependency_injector_containers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_10containers_7copy, NULL, __pyx_n_s_dependency_injector_containers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy, __pyx_t_6) < 0) __PYX_ERR(0, 672, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy, __pyx_t_6) < 0) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "dependency_injector/containers.pyx":1 * """Containers module.""" # <<<<<<<<<<<<<< * - * import sys + * import json */ __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -27707,6 +29080,164 @@ static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* value } #endif +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* None */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + /* UnpackUnboundCMethod */ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method; @@ -28535,80 +30066,6 @@ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { } } -/* GetException */ -#if CYTHON_FAST_THREAD_STATE -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) -#else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) -#endif -{ - PyObject *local_type, *local_value, *local_tb; -#if CYTHON_FAST_THREAD_STATE - PyObject *tmp_type, *tmp_value, *tmp_tb; - local_type = tstate->curexc_type; - local_value = tstate->curexc_value; - local_tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -#else - PyErr_Fetch(&local_type, &local_value, &local_tb); -#endif - PyErr_NormalizeException(&local_type, &local_value, &local_tb); -#if CYTHON_FAST_THREAD_STATE - if (unlikely(tstate->curexc_type)) -#else - if (unlikely(PyErr_Occurred())) -#endif - goto bad; - #if PY_MAJOR_VERSION >= 3 - if (local_tb) { - if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) - goto bad; - } - #endif - Py_XINCREF(local_tb); - Py_XINCREF(local_type); - Py_XINCREF(local_value); - *type = local_type; - *value = local_value; - *tb = local_tb; -#if CYTHON_FAST_THREAD_STATE - #if CYTHON_USE_EXC_INFO_STACK - { - _PyErr_StackItem *exc_info = tstate->exc_info; - tmp_type = exc_info->exc_type; - tmp_value = exc_info->exc_value; - tmp_tb = exc_info->exc_traceback; - exc_info->exc_type = local_type; - exc_info->exc_value = local_value; - exc_info->exc_traceback = local_tb; - } - #else - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = local_type; - tstate->exc_value = local_value; - tstate->exc_traceback = local_tb; - #endif - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -#else - PyErr_SetExcInfo(local_type, local_value, local_tb); -#endif - return 0; -bad: - *type = 0; - *value = 0; - *tb = 0; - Py_XDECREF(local_type); - Py_XDECREF(local_value); - Py_XDECREF(local_tb); - return -1; -} - /* GetAttr3 */ static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare @@ -28927,71 +30384,6 @@ bad: return NULL; } -/* Import */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - PyObject *empty_list = 0; - PyObject *module = 0; - PyObject *global_dict = 0; - PyObject *empty_dict = 0; - PyObject *list; - #if PY_MAJOR_VERSION < 3 - PyObject *py_import; - py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); - if (!py_import) - goto bad; - #endif - if (from_list) - list = from_list; - else { - empty_list = PyList_New(0); - if (!empty_list) - goto bad; - list = empty_list; - } - global_dict = PyModule_GetDict(__pyx_m); - if (!global_dict) - goto bad; - empty_dict = PyDict_New(); - if (!empty_dict) - goto bad; - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { - if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, 1); - if (!module) { - if (!PyErr_ExceptionMatches(PyExc_ImportError)) - goto bad; - PyErr_Clear(); - } - } - level = 0; - } - #endif - if (!module) { - #if PY_MAJOR_VERSION < 3 - PyObject *py_level = PyInt_FromLong(level); - if (!py_level) - goto bad; - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); - Py_DECREF(py_level); - #else - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, level); - #endif - } - } -bad: - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(py_import); - #endif - Py_XDECREF(empty_list); - Py_XDECREF(empty_dict); - return module; -} - /* PatchInspect */ static PyObject* __Pyx_patch_inspect(PyObject* module) { #if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT) @@ -29100,20 +30492,6 @@ ignore: return module; } -/* ImportFrom */ -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { - PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); - if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_Format(PyExc_ImportError, - #if PY_MAJOR_VERSION < 3 - "cannot import name %.230s", PyString_AS_STRING(name)); - #else - "cannot import name %S", name); - #endif - } - return value; -} - /* CalculateMetaclass */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); diff --git a/src/dependency_injector/containers.pyi b/src/dependency_injector/containers.pyi index 0e66462d..af398e3b 100644 --- a/src/dependency_injector/containers.pyi +++ b/src/dependency_injector/containers.pyi @@ -1,3 +1,4 @@ +from pathlib import Path from typing import ( Generic, Type, @@ -34,6 +35,7 @@ class Container: def __init__(self) -> None: ... def __deepcopy__(self, memo: Optional[Dict[str, Any]]) -> Provider: ... def __setattr__(self, name: str, value: Union[Provider, Any]) -> None: ... + def __getattr__(self, name: str) -> Provider: ... def __delattr__(self, name: str) -> None: ... def set_providers(self, **providers: Provider): ... def set_provider(self, name: str, provider: Provider) -> None: ... @@ -48,6 +50,9 @@ class Container: def apply_container_providers_overridings(self) -> None: ... def reset_singletons(self) -> SingletonResetContext[C_Base]: ... def check_dependencies(self) -> None: ... + def from_schema(self, schema: Dict[Any, Any]) -> None: ... + def from_yaml_schema(self, filepath: Union[Path, str], loader: Optional[Any]=None) -> None: ... + def from_json_schema(self, filepath: Union[Path, str]) -> None: ... @overload def resolve_provider_name(self, provider: Provider) -> str: ... @classmethod diff --git a/src/dependency_injector/containers.pyx b/src/dependency_injector/containers.pyx index 204425a9..82305a22 100644 --- a/src/dependency_injector/containers.pyx +++ b/src/dependency_injector/containers.pyx @@ -1,5 +1,6 @@ """Containers module.""" +import json import sys try: @@ -7,6 +8,11 @@ try: except ImportError: asyncio = None +try: + import yaml +except ImportError: + yaml = None + import six from . import providers, errors @@ -330,6 +336,39 @@ class DynamicContainer(Container): f'{", ".join(undefined_names)}', ) + def from_schema(self, schema): + """Build container providers from schema.""" + from .schema import build_schema + for name, provider in build_schema(schema).items(): + self.set_provider(name, provider) + + def from_yaml_schema(self, filepath, loader=None): + """Build container providers from YAML schema. + + You can specify type of loader as a second argument. By default, method + uses ``SafeLoader``. + """ + if yaml is None: + raise errors.Error( + 'Unable to load yaml schema - PyYAML is not installed. ' + 'Install PyYAML or install Dependency Injector with yaml extras: ' + '"pip install dependency-injector[yaml]"' + ) + + if loader is None: + loader = yaml.SafeLoader + + with open(filepath) as file: + schema = yaml.load(file, loader) + + self.from_schema(schema) + + def from_json_schema(self, filepath): + """Build container providers from JSON schema.""" + with open(filepath) as file: + schema = json.load(file) + self.from_schema(schema) + def resolve_provider_name(self, provider): """Try to resolve provider name.""" for provider_name, container_provider in self.providers.items(): diff --git a/src/dependency_injector/providers.c b/src/dependency_injector/providers.c index f860c71b..a8ed6478 100644 --- a/src/dependency_injector/providers.c +++ b/src/dependency_injector/providers.c @@ -1360,12 +1360,12 @@ struct __pyx_obj_19dependency_injector_9providers_Dict { * * * cdef class Resource(Provider): # <<<<<<<<<<<<<< - * cdef object __initializer + * cdef object __provides * cdef bint __initialized */ struct __pyx_obj_19dependency_injector_9providers_Resource { struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; - PyObject *__pyx___initializer; + PyObject *__pyx___provides; int __pyx___initialized; PyObject *__pyx___shutdowner; PyObject *__pyx___resource; @@ -1410,12 +1410,12 @@ struct __pyx_obj_19dependency_injector_9providers_Selector { * # Provided instance * * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider + * cdef object __provides * */ struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance { struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; - struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___provider; + PyObject *__pyx___provides; }; @@ -1423,13 +1423,13 @@ struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance { * * * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider - * cdef object __attribute + * cdef object __provides + * cdef object __name */ struct __pyx_obj_19dependency_injector_9providers_AttributeGetter { struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; - struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___provider; - PyObject *__pyx___attribute; + PyObject *__pyx___provides; + PyObject *__pyx___name; }; @@ -1437,13 +1437,13 @@ struct __pyx_obj_19dependency_injector_9providers_AttributeGetter { * * * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider - * cdef object __item + * cdef object __provides + * cdef object __name */ struct __pyx_obj_19dependency_injector_9providers_ItemGetter { struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; - struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___provider; - PyObject *__pyx___item; + PyObject *__pyx___provides; + PyObject *__pyx___name; }; @@ -1451,12 +1451,12 @@ struct __pyx_obj_19dependency_injector_9providers_ItemGetter { * * * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< - * cdef Provider __provider + * cdef object __provides * cdef tuple __args */ struct __pyx_obj_19dependency_injector_9providers_MethodCaller { struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; - struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___provider; + PyObject *__pyx___provides; PyObject *__pyx___args; int __pyx___args_len; PyObject *__pyx___kwargs; @@ -1569,7 +1569,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct____get__ { }; -/* "dependency_injector/providers.pyx":439 +/* "dependency_injector/providers.pyx":447 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1582,7 +1582,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_1___get__ { }; -/* "dependency_injector/providers.pyx":571 +/* "dependency_injector/providers.pyx":580 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1595,12 +1595,12 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_2___get__ { }; -/* "dependency_injector/providers.pyx":743 +/* "dependency_injector/providers.pyx":759 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * if self.__default is not UNDEFINED: + * if self.__default: */ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_3___get__ { PyObject_HEAD @@ -1608,7 +1608,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_3___get__ { }; -/* "dependency_injector/providers.pyx":952 +/* "dependency_injector/providers.pyx":968 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1621,7 +1621,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_4___get__ { }; -/* "dependency_injector/providers.pyx":1163 +/* "dependency_injector/providers.pyx":1184 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1634,7 +1634,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_5___get__ { }; -/* "dependency_injector/providers.pyx":1433 +/* "dependency_injector/providers.pyx":1446 * return value * * def _get_self_name(self): # <<<<<<<<<<<<<< @@ -1647,7 +1647,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_6__get_self }; -/* "dependency_injector/providers.pyx":1435 +/* "dependency_injector/providers.pyx":1448 * def _get_self_name(self): * return '.'.join( * segment() if is_provider(segment) else segment for segment in self.__name # <<<<<<<<<<<<<< @@ -1663,7 +1663,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_7_genexpr { }; -/* "dependency_injector/providers.pyx":1657 +/* "dependency_injector/providers.pyx":1670 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1676,7 +1676,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_8___get__ { }; -/* "dependency_injector/providers.pyx":2028 +/* "dependency_injector/providers.pyx":2072 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1689,7 +1689,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_9___get__ { }; -/* "dependency_injector/providers.pyx":2250 +/* "dependency_injector/providers.pyx":2303 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1702,7 +1702,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_10___get__ }; -/* "dependency_injector/providers.pyx":2421 +/* "dependency_injector/providers.pyx":2474 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1715,7 +1715,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_11___get__ }; -/* "dependency_injector/providers.pyx":2615 +/* "dependency_injector/providers.pyx":2676 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1728,7 +1728,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_12___get__ }; -/* "dependency_injector/providers.pyx":3060 +/* "dependency_injector/providers.pyx":3121 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1741,7 +1741,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_13___get__ }; -/* "dependency_injector/providers.pyx":3178 +/* "dependency_injector/providers.pyx":3239 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1754,12 +1754,12 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_14___get__ }; -/* "dependency_injector/providers.pyx":3358 +/* "dependency_injector/providers.pyx":3426 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield from filter(is_provider, [self.__initializer]) + * yield from filter(is_provider, [self.provides]) */ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_15___get__ { PyObject_HEAD @@ -1767,7 +1767,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_15___get__ }; -/* "dependency_injector/providers.pyx":3624 +/* "dependency_injector/providers.pyx":3692 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1780,7 +1780,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_16___get__ }; -/* "dependency_injector/providers.pyx":3730 +/* "dependency_injector/providers.pyx":3802 * return self.__providers[name] * * def __str__(self): # <<<<<<<<<<<<<< @@ -1793,7 +1793,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_17___str__ }; -/* "dependency_injector/providers.pyx":3740 +/* "dependency_injector/providers.pyx":3812 * selector=self.__selector, * providers=', '.join(( * '{0}={1}'.format(name, provider) # <<<<<<<<<<<<<< @@ -1811,7 +1811,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_18_genexpr }; -/* "dependency_injector/providers.pyx":3752 +/* "dependency_injector/providers.pyx":3839 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -1824,12 +1824,12 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_19___get__ }; -/* "dependency_injector/providers.pyx":3835 +/* "dependency_injector/providers.pyx":3926 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_20___get__ { PyObject_HEAD @@ -1837,12 +1837,12 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_20___get__ }; -/* "dependency_injector/providers.pyx":3890 +/* "dependency_injector/providers.pyx":3993 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_21___get__ { PyObject_HEAD @@ -1850,12 +1850,12 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_21___get__ }; -/* "dependency_injector/providers.pyx":3960 +/* "dependency_injector/providers.pyx":4075 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_22___get__ { PyObject_HEAD @@ -1863,12 +1863,12 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_22___get__ }; -/* "dependency_injector/providers.pyx":4058 +/* "dependency_injector/providers.pyx":4203 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_23___get__ { PyObject_HEAD @@ -1876,7 +1876,7 @@ struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_23___get__ }; -/* "dependency_injector/providers.pyx":4388 +/* "dependency_injector/providers.pyx":4538 * * * def traverse(*providers, types=None): # <<<<<<<<<<<<<< @@ -1952,7 +1952,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Object { static struct __pyx_vtabstruct_19dependency_injector_9providers_Object *__pyx_vtabptr_19dependency_injector_9providers_Object; -/* "dependency_injector/providers.pyx":459 +/* "dependency_injector/providers.pyx":467 * * * cdef class Self(Provider): # <<<<<<<<<<<<<< @@ -1966,7 +1966,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Self { static struct __pyx_vtabstruct_19dependency_injector_9providers_Self *__pyx_vtabptr_19dependency_injector_9providers_Self; -/* "dependency_injector/providers.pyx":512 +/* "dependency_injector/providers.pyx":520 * * * cdef class Delegate(Provider): # <<<<<<<<<<<<<< @@ -1980,7 +1980,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate *__pyx_vtabptr_19dependency_injector_9providers_Delegate; -/* "dependency_injector/providers.pyx":590 +/* "dependency_injector/providers.pyx":599 * * * cdef class Dependency(Provider): # <<<<<<<<<<<<<< @@ -1994,7 +1994,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency { static struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency *__pyx_vtabptr_19dependency_injector_9providers_Dependency; -/* "dependency_injector/providers.pyx":793 +/* "dependency_injector/providers.pyx":809 * * * cdef class ExternalDependency(Dependency): # <<<<<<<<<<<<<< @@ -2008,7 +2008,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency { static struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency *__pyx_vtabptr_19dependency_injector_9providers_ExternalDependency; -/* "dependency_injector/providers.pyx":821 +/* "dependency_injector/providers.pyx":837 * * * cdef class DependenciesContainer(Object): # <<<<<<<<<<<<<< @@ -2023,7 +2023,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer { static struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *__pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer; -/* "dependency_injector/providers.pyx":1001 +/* "dependency_injector/providers.pyx":1017 * * * cdef class Callable(Provider): # <<<<<<<<<<<<<< @@ -2037,7 +2037,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Callable { static struct __pyx_vtabstruct_19dependency_injector_9providers_Callable *__pyx_vtabptr_19dependency_injector_9providers_Callable; -/* "dependency_injector/providers.pyx":1175 +/* "dependency_injector/providers.pyx":1196 * * * cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<< @@ -2051,7 +2051,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable *__pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable; -/* "dependency_injector/providers.pyx":1184 +/* "dependency_injector/providers.pyx":1205 * * * cdef class AbstractCallable(Callable): # <<<<<<<<<<<<<< @@ -2065,7 +2065,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable *__pyx_vtabptr_19dependency_injector_9providers_AbstractCallable; -/* "dependency_injector/providers.pyx":1225 +/* "dependency_injector/providers.pyx":1246 * * * cdef class CallableDelegate(Delegate): # <<<<<<<<<<<<<< @@ -2079,7 +2079,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate *__pyx_vtabptr_19dependency_injector_9providers_CallableDelegate; -/* "dependency_injector/providers.pyx":1247 +/* "dependency_injector/providers.pyx":1268 * * * cdef class Coroutine(Callable): # <<<<<<<<<<<<<< @@ -2093,7 +2093,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine { static struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine *__pyx_vtabptr_19dependency_injector_9providers_Coroutine; -/* "dependency_injector/providers.pyx":1291 +/* "dependency_injector/providers.pyx":1304 * * * cdef class DelegatedCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -2107,7 +2107,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine *__pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine; -/* "dependency_injector/providers.pyx":1300 +/* "dependency_injector/providers.pyx":1313 * * * cdef class AbstractCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -2121,7 +2121,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine *__pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine; -/* "dependency_injector/providers.pyx":1341 +/* "dependency_injector/providers.pyx":1354 * * * cdef class CoroutineDelegate(Delegate): # <<<<<<<<<<<<<< @@ -2135,7 +2135,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate *__pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate; -/* "dependency_injector/providers.pyx":1363 +/* "dependency_injector/providers.pyx":1376 * * * cdef class ConfigurationOption(Provider): # <<<<<<<<<<<<<< @@ -2149,7 +2149,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption { static struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption *__pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption; -/* "dependency_injector/providers.pyx":1667 +/* "dependency_injector/providers.pyx":1680 * * * cdef class TypedConfigurationOption(Callable): # <<<<<<<<<<<<<< @@ -2163,7 +2163,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOptio static struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOption *__pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption; -/* "dependency_injector/providers.pyx":1674 +/* "dependency_injector/providers.pyx":1687 * * * cdef class Configuration(Object): # <<<<<<<<<<<<<< @@ -2177,7 +2177,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration { static struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *__pyx_vtabptr_19dependency_injector_9providers_Configuration; -/* "dependency_injector/providers.pyx":2037 +/* "dependency_injector/providers.pyx":2081 * * * cdef class Factory(Provider): # <<<<<<<<<<<<<< @@ -2191,7 +2191,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Factory { static struct __pyx_vtabstruct_19dependency_injector_9providers_Factory *__pyx_vtabptr_19dependency_injector_9providers_Factory; -/* "dependency_injector/providers.pyx":2263 +/* "dependency_injector/providers.pyx":2316 * * * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< @@ -2205,7 +2205,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory *__pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory; -/* "dependency_injector/providers.pyx":2285 +/* "dependency_injector/providers.pyx":2338 * * * cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<< @@ -2219,7 +2219,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory *__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory; -/* "dependency_injector/providers.pyx":2326 +/* "dependency_injector/providers.pyx":2379 * * * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< @@ -2233,7 +2233,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate *__pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate; -/* "dependency_injector/providers.pyx":2348 +/* "dependency_injector/providers.pyx":2401 * * * cdef class FactoryAggregate(Provider): # <<<<<<<<<<<<<< @@ -2248,7 +2248,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate { static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *__pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate; -/* "dependency_injector/providers.pyx":2447 +/* "dependency_injector/providers.pyx":2500 * * * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< @@ -2262,7 +2262,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; -/* "dependency_injector/providers.pyx":2634 +/* "dependency_injector/providers.pyx":2695 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2276,7 +2276,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton *__pyx_vtabptr_19dependency_injector_9providers_Singleton; -/* "dependency_injector/providers.pyx":2702 +/* "dependency_injector/providers.pyx":2763 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -2290,7 +2290,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton; -/* "dependency_injector/providers.pyx":2724 +/* "dependency_injector/providers.pyx":2785 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2304,7 +2304,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton; -/* "dependency_injector/providers.pyx":2775 +/* "dependency_injector/providers.pyx":2836 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -2318,7 +2318,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSing static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton; -/* "dependency_injector/providers.pyx":2797 +/* "dependency_injector/providers.pyx":2858 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2332,7 +2332,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton; -/* "dependency_injector/providers.pyx":2873 +/* "dependency_injector/providers.pyx":2934 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -2346,7 +2346,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSin static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton; -/* "dependency_injector/providers.pyx":2895 +/* "dependency_injector/providers.pyx":2956 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2360,7 +2360,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton *__pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton; -/* "dependency_injector/providers.pyx":2940 +/* "dependency_injector/providers.pyx":3001 * * * cdef class SingletonDelegate(Delegate): # <<<<<<<<<<<<<< @@ -2374,7 +2374,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate *__pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate; -/* "dependency_injector/providers.pyx":2962 +/* "dependency_injector/providers.pyx":3023 * * * cdef class List(Provider): # <<<<<<<<<<<<<< @@ -2388,7 +2388,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_List { static struct __pyx_vtabstruct_19dependency_injector_9providers_List *__pyx_vtabptr_19dependency_injector_9providers_List; -/* "dependency_injector/providers.pyx":3070 +/* "dependency_injector/providers.pyx":3131 * * * cdef class Dict(Provider): # <<<<<<<<<<<<<< @@ -2402,7 +2402,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Dict { static struct __pyx_vtabstruct_19dependency_injector_9providers_Dict *__pyx_vtabptr_19dependency_injector_9providers_Dict; -/* "dependency_injector/providers.pyx":3188 +/* "dependency_injector/providers.pyx":3249 * * * cdef class Resource(Provider): # <<<<<<<<<<<<<< @@ -2416,7 +2416,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Resource { static struct __pyx_vtabstruct_19dependency_injector_9providers_Resource *__pyx_vtabptr_19dependency_injector_9providers_Resource; -/* "dependency_injector/providers.pyx":3523 +/* "dependency_injector/providers.pyx":3591 * * * cdef class Container(Provider): # <<<<<<<<<<<<<< @@ -2430,7 +2430,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Container { static struct __pyx_vtabstruct_19dependency_injector_9providers_Container *__pyx_vtabptr_19dependency_injector_9providers_Container; -/* "dependency_injector/providers.pyx":3667 +/* "dependency_injector/providers.pyx":3735 * * * cdef class Selector(Provider): # <<<<<<<<<<<<<< @@ -2444,7 +2444,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Selector { static struct __pyx_vtabstruct_19dependency_injector_9providers_Selector *__pyx_vtabptr_19dependency_injector_9providers_Selector; -/* "dependency_injector/providers.pyx":3771 +/* "dependency_injector/providers.pyx":3858 * * * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< @@ -2458,7 +2458,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance { static struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance *__pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance; -/* "dependency_injector/providers.pyx":3844 +/* "dependency_injector/providers.pyx":3936 * * * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< @@ -2472,7 +2472,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter { static struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter *__pyx_vtabptr_19dependency_injector_9providers_AttributeGetter; -/* "dependency_injector/providers.pyx":3914 +/* "dependency_injector/providers.pyx":4018 * * * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< @@ -2486,7 +2486,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter { static struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter *__pyx_vtabptr_19dependency_injector_9providers_ItemGetter; -/* "dependency_injector/providers.pyx":3980 +/* "dependency_injector/providers.pyx":4100 * * * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< @@ -3055,24 +3055,6 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); #define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj) #endif -/* StringJoin.proto */ -#if PY_MAJOR_VERSION < 3 -#define __Pyx_PyString_Join __Pyx_PyBytes_Join -#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) -#else -#define __Pyx_PyString_Join PyUnicode_Join -#define __Pyx_PyBaseString_Join PyUnicode_Join -#endif -#if CYTHON_COMPILING_IN_CPYTHON - #if PY_MAJOR_VERSION < 3 - #define __Pyx_PyBytes_Join _PyString_Join - #else - #define __Pyx_PyBytes_Join _PyBytes_Join - #endif -#else -static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); -#endif - /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { @@ -3093,6 +3075,24 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { /* None.proto */ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); +/* StringJoin.proto */ +#if PY_MAJOR_VERSION < 3 +#define __Pyx_PyString_Join __Pyx_PyBytes_Join +#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) +#else +#define __Pyx_PyString_Join PyUnicode_Join +#define __Pyx_PyBaseString_Join PyUnicode_Join +#endif +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION < 3 + #define __Pyx_PyBytes_Join _PyString_Join + #else + #define __Pyx_PyBytes_Join _PyBytes_Join + #endif +#else +static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); +#endif + /* PyObjectSetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) @@ -3538,6 +3538,9 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future_result(PyObject *); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_19dependency_injector_9providers__memorized_duplicate(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_19dependency_injector_9providers__copy_if_provider(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_19dependency_injector_9providers__class_qualname(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Provider__set_state(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Object__set_state(struct __pyx_obj_19dependency_injector_9providers_Object *, PyObject *); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Self__set_state(struct __pyx_obj_19dependency_injector_9providers_Self *, PyObject *); /*proto*/ @@ -3606,33 +3609,33 @@ static PyObject *__pyx_builtin_id; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_DeprecationWarning; static PyObject *__pyx_builtin_NotImplementedError; -static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_hex; +static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_filter; static PyObject *__pyx_builtin_IOError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_StopIteration; static const char __pyx_k__2[] = "_"; -static const char __pyx_k__5[] = "\""; -static const char __pyx_k__6[] = "<"; -static const char __pyx_k__7[] = "."; -static const char __pyx_k__8[] = "("; -static const char __pyx_k__9[] = ">"; +static const char __pyx_k__4[] = "\""; +static const char __pyx_k__5[] = "<"; +static const char __pyx_k__6[] = "."; +static const char __pyx_k__7[] = "("; +static const char __pyx_k__8[] = ">"; +static const char __pyx_k__9[] = ""; static const char __pyx_k_at[] = ") at "; static const char __pyx_k_id[] = "id"; static const char __pyx_k_os[] = "os"; static const char __pyx_k_re[] = "re"; static const char __pyx_k_to[] = "to"; static const char __pyx_k_0_1[] = "{0}={1}"; -static const char __pyx_k__10[] = ""; -static const char __pyx_k__11[] = "__"; -static const char __pyx_k__29[] = ", "; -static const char __pyx_k__30[] = "('"; -static const char __pyx_k__31[] = "')"; -static const char __pyx_k__32[] = ")"; -static const char __pyx_k__49[] = "\\$\\{([^}^{]+)\\}"; +static const char __pyx_k__10[] = "__"; +static const char __pyx_k__28[] = ", "; +static const char __pyx_k__29[] = "('"; +static const char __pyx_k__30[] = "')"; +static const char __pyx_k__31[] = ")"; +static const char __pyx_k__48[] = "\\$\\{([^}^{]+)\\}"; static const char __pyx_k_cls[] = "cls"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_get[] = "get"; @@ -3655,7 +3658,6 @@ static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_exit[] = "__exit__"; static const char __pyx_k_from[] = "from_"; static const char __pyx_k_init[] = "__init__"; -static const char __pyx_k_item[] = "item"; static const char __pyx_k_join[] = "join"; static const char __pyx_k_load[] = "load"; static const char __pyx_k_main[] = "__main__"; @@ -3743,6 +3745,7 @@ static const char __pyx_k_genexpr[] = "genexpr"; static const char __pyx_k_im_func[] = "im_func"; static const char __pyx_k_im_self[] = "im_self"; static const char __pyx_k_inspect[] = "inspect"; +static const char __pyx_k_instead[] = " instead"; static const char __pyx_k_options[] = "options"; static const char __pyx_k_partial[] = "partial"; static const char __pyx_k_prepare[] = "__prepare__"; @@ -3781,6 +3784,7 @@ static const char __pyx_k_required[] = "required"; static const char __pyx_k_sections[] = "sections"; static const char __pyx_k_selector[] = "selector"; static const char __pyx_k_set_args[] = "set_args"; +static const char __pyx_k_set_name[] = "set_name"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_settings[] = "settings"; static const char __pyx_k_shutdown[] = "shutdown"; @@ -3796,7 +3800,6 @@ static const char __pyx_k_Injection[] = "Injection"; static const char __pyx_k_Singleton[] = "Singleton"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_UNDEFINED[] = "UNDEFINED"; -static const char __pyx_k_attribute[] = "attribute"; static const char __pyx_k_container[] = "container"; static const char __pyx_k_coroutine[] = "coroutine"; static const char __pyx_k_factories[] = "factories"; @@ -3816,7 +3819,8 @@ static const char __pyx_k_IndexError[] = "IndexError"; static const char __pyx_k_ItemGetter[] = "ItemGetter"; static const char __pyx_k_List___get[] = "List.__get__"; static const char __pyx_k_MethodType[] = "MethodType"; -static const char __pyx_k_Provider_2[] = "Provider"; +static const char __pyx_k_Provider_2[] = "Provider "; +static const char __pyx_k_Provider_3[] = "Provider"; static const char __pyx_k_SafeLoader[] = "SafeLoader"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_YamlLoader[] = "YamlLoader"; @@ -3827,6 +3831,7 @@ static const char __pyx_k_clear_args[] = "clear_args"; static const char __pyx_k_coroutines[] = "coroutines"; static const char __pyx_k_expandvars[] = "expandvars"; static const char __pyx_k_full_reset[] = "full_reset"; +static const char __pyx_k_get_strict[] = "get_strict"; static const char __pyx_k_isasyncgen[] = "isasyncgen"; static const char __pyx_k_overridden[] = "overridden"; static const char __pyx_k_overriding[] = "overriding"; @@ -3834,6 +3839,7 @@ static const char __pyx_k_pyx_result[] = "__pyx_result"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static const char __pyx_k_set_kwargs[] = "set_kwargs"; static const char __pyx_k_set_result[] = "set_result"; +static const char __pyx_k_set_strict[] = "set_strict"; static const char __pyx_k_shutdowner[] = "shutdowner"; static const char __pyx_k_startswith[] = "startswith"; static const char __pyx_k_CLASS_TYPES[] = "CLASS_TYPES"; @@ -3843,6 +3849,7 @@ static const char __pyx_k_PickleError[] = "PickleError"; static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py"; static const char __pyx_k_config_file[] = "config_file"; static const char __pyx_k_copy_parent[] = "_copy_parent"; +static const char __pyx_k_get_default[] = "get_default"; static const char __pyx_k_initializer[] = "initializer"; static const char __pyx_k_instance_of[] = "instance_of"; static const char __pyx_k_is_provider[] = "is_provider"; @@ -3851,6 +3858,7 @@ static const char __pyx_k_iscoroutine[] = "iscoroutine"; static const char __pyx_k_merge_dicts[] = "merge_dicts"; static const char __pyx_k_parent_name[] = "parent_name"; static const char __pyx_k_reset_cache[] = "reset_cache"; +static const char __pyx_k_set_default[] = "set_default"; static const char __pyx_k_BaseSettings[] = "BaseSettings"; static const char __pyx_k_ConfigParser[] = "ConfigParser"; static const char __pyx_k_DEFAULT_NAME[] = "DEFAULT_NAME"; @@ -3862,9 +3870,12 @@ static const char __pyx_k_Object___get[] = "Object.__get__"; static const char __pyx_k_clear_kwargs[] = "clear_kwargs"; static const char __pyx_k_configparser[] = "configparser"; static const char __pyx_k_factory_name[] = "factory_name"; +static const char __pyx_k_get_children[] = "get_children"; static const char __pyx_k_is_coroutine[] = "_is_coroutine"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; +static const char __pyx_k_set_children[] = "set_children"; static const char __pyx_k_set_provides[] = "set_provides"; +static const char __pyx_k_set_selector[] = "set_selector"; static const char __pyx_k_staticmethod[] = "staticmethod"; static const char __pyx_k_storage_lock[] = "storage_lock"; static const char __pyx_k_stringsource[] = "stringsource"; @@ -3889,6 +3900,8 @@ static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; static const char __pyx_k_set_alt_names[] = "set_alt_names"; static const char __pyx_k_set_container[] = "set_container"; static const char __pyx_k_set_exception[] = "set_exception"; +static const char __pyx_k_set_factories[] = "set_factories"; +static const char __pyx_k_set_providers[] = "set_providers"; static const char __pyx_k_AttributeError[] = "AttributeError"; static const char __pyx_k_Callable___get[] = "Callable.__get__"; static const char __pyx_k_Delegate___get[] = "Delegate.__get__"; @@ -3914,6 +3927,7 @@ static const char __pyx_k_iniconfigparser[] = "iniconfigparser"; static const char __pyx_k_last_overriding[] = "last_overriding"; static const char __pyx_k_overriding_lock[] = "overriding_lock"; static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; +static const char __pyx_k_set_instance_of[] = "set_instance_of"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_AbstractCallable[] = "AbstractCallable"; static const char __pyx_k_CallableDelegate[] = "CallableDelegate"; @@ -4040,6 +4054,7 @@ static const char __pyx_k_0_can_aggregate_only_instances[] = "{0} can aggregate static const char __pyx_k_0_can_provide_only_1_instances[] = "{0} can provide only {1} instances"; static const char __pyx_k_0_must_be_overridden_only_by_1[] = "{0} must be overridden only by {1} providers"; 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_instance_of_has_incorrect_type[] = "\"instance_of\" has incorrect type (expected {0}, got {1}))"; static const char __pyx_k_provider_selector_providers_at[] = "<{provider}({selector}, {providers}) at {address}>"; static const char __pyx_k_pyx_unpickle_AbstractCoroutine[] = "__pyx_unpickle_AbstractCoroutine"; static const char __pyx_k_pyx_unpickle_AbstractSingleton[] = "__pyx_unpickle_AbstractSingleton"; @@ -4065,8 +4080,8 @@ static const char __pyx_k_0_does_not_contain_factory_with[] = "{0} does not cont static const char __pyx_k_0_must_be_overridden_before_cal[] = "{0} must be overridden before calling"; static const char __pyx_k_0_providers_could_not_be_overri[] = "{0} providers could not be overridden"; static const char __pyx_k_cls_object_has_no_attribute_att[] = "'{cls}' object has no attribute '{attribute_name}'"; +static const char __pyx_k_expected_to_get_coroutine_funct[] = " expected to get coroutine function, got "; static const char __pyx_k_Abstract_provider_forward_provid[] = "Abstract provider forward providing logic to overriding provider"; -static const char __pyx_k_Argument_instance_of_has_incorre[] = "Argument 'instance_of' has incorrect type (expected {0}, got {1}))"; static const char __pyx_k_Can_not_copy_initialized_resourc[] = "Can not copy initialized resource"; static const char __pyx_k_Can_not_resolve_name_for_provide[] = "Can not resolve name for provider \""; static const char __pyx_k_Configuration_option_can_only_be[] = "Configuration option can only be overridden by a value"; @@ -4085,28 +4100,24 @@ static const char __pyx_k_Incompatible_checksums_s_vs_0x2e[] = "Incompatible che static const char __pyx_k_Incompatible_checksums_s_vs_0x32[] = "Incompatible checksums (%s vs 0x328787b = (__async_mode, __last_overriding, __overridden, __provides))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x3e[] = "Incompatible checksums (%s vs 0x3e02ba6 = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x42[] = "Incompatible checksums (%s vs 0x42fe861 = (__async_mode, __children, __last_overriding, __name, __overridden, __provides, __strict))"; +static const char __pyx_k_Incompatible_checksums_s_vs_0x5f[] = "Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))"; +static const char __pyx_k_Incompatible_checksums_s_vs_0x62[] = "Incompatible checksums (%s vs 0x62e918c = (__args, __args_len, __async_mode, __initialized, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides, __resource, __shutdowner))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x64[] = "Incompatible checksums (%s vs 0x64f395f = (__call, __is_delegated, __is_provider, __name, __value))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x6a[] = "Incompatible checksums (%s vs 0x6a94d6b = (__async_mode, __last_overriding, __overridden, __providers, __selector))"; -static const char __pyx_k_Incompatible_checksums_s_vs_0x73[] = "Incompatible checksums (%s vs 0x734cfcb = (__args, __args_len, __async_mode, __initialized, __initializer, __kwargs, __kwargs_len, __last_overriding, __overridden, __resource, __shutdowner))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x75[] = "Incompatible checksums (%s vs 0x7545337 = (__async_mode, __attributes, __attributes_len, __instantiator, __last_overriding, __overridden))"; -static const char __pyx_k_Incompatible_checksums_s_vs_0x7e[] = "Incompatible checksums (%s vs 0x7ec84e3 = (__async_mode, __attribute, __last_overriding, __overridden, __provider))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x91[] = "Incompatible checksums (%s vs 0x91e5fbc = (__async_mode, __cache, __children, __last_overriding, __name, __overridden, __required, __root))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x99[] = "Incompatible checksums (%s vs 0x9900f6d = (__async_mode, __default, __instance_of, __last_overriding, __overridden, __parent))"; -static const char __pyx_k_Incompatible_checksums_s_vs_0xa0[] = "Incompatible checksums (%s vs 0xa0575be = (__async_mode, __item, __last_overriding, __overridden, __provider))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xa2[] = "Incompatible checksums (%s vs 0xa264cf2 = (__async_mode, __factories, __last_overriding, __overridden))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xac[] = "Incompatible checksums (%s vs 0xac42855 = (__alt_names, __async_mode, __container, __last_overriding, __overridden))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xce[] = "Incompatible checksums (%s vs 0xce4d239 = (__async_mode, __instantiator, __last_overriding, __overridden, __storage))"; -static const char __pyx_k_Incompatible_checksums_s_vs_0xe5[] = "Incompatible checksums (%s vs 0xe57552f = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provider))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xf2[] = "Incompatible checksums (%s vs 0xf2cdbd7 = (__async_mode, __container, __container_cls, __last_overriding, __overridden, __overriding_providers, __parent))"; -static const char __pyx_k_Incompatible_checksums_s_vs_0xfd[] = "Incompatible checksums (%s vs 0xfd61095 = (__async_mode, __last_overriding, __overridden, __provider))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xfe[] = "Incompatible checksums (%s vs 0xfeb8198 = (__async_mode, __last_overriding, __overridden))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xff[] = "Incompatible checksums (%s vs 0xff73c9f = (__async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden))"; static const char __pyx_k_Interpolation_which_expands_envi[] = "Interpolation which expands environment variables in values."; static const char __pyx_k_Method_delegate_is_deprecated_si[] = "Method \".delegate()\" is deprecated since version 4.0.0. Use \".provider\" attribute instead."; static const char __pyx_k_Package_asyncio_is_not_available[] = "Package asyncio is not available"; static const char __pyx_k_Provider_0_could_not_be_overridd[] = "Provider {0} could not be overridden with itself"; -static const char __pyx_k_Provider_0_expected_to_get_calla[] = "Provider {0} expected to get callable, got {0}"; -static const char __pyx_k_Provider_0_expected_to_get_corou[] = "Provider {0} expected to get coroutine function, got {1}"; +static const char __pyx_k_Provider_0_expected_to_get_calla[] = "Provider {0} expected to get callable, got {1} instead"; 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_Unable_to_load_configuration_fil[] = "Unable to load configuration file {0}"; @@ -4131,7 +4142,6 @@ static PyObject *__pyx_n_s_AbstractCoroutine; static PyObject *__pyx_n_s_AbstractFactory; static PyObject *__pyx_n_s_AbstractSingleton; static PyObject *__pyx_kp_s_Abstract_provider_forward_provid; -static PyObject *__pyx_kp_s_Argument_instance_of_has_incorre; static PyObject *__pyx_n_s_AsyncResource; static PyObject *__pyx_n_s_AttributeError; static PyObject *__pyx_n_s_AttributeGetter; @@ -4211,20 +4221,17 @@ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x32; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x3e; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x42; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x42_2; +static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x5f; +static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x62; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x64; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x6a; -static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x73; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x75; -static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x7e; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x91; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x99; -static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xa0; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xa2; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xac; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xce; -static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xe5; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xf2; -static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xfd; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xfe; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xff; static PyObject *__pyx_n_s_IndexError; @@ -4253,9 +4260,9 @@ static PyObject *__pyx_n_s_ProvidedInstance___get; static PyObject *__pyx_kp_u_Provider; static PyObject *__pyx_kp_s_Provider_0_could_not_be_overridd; static PyObject *__pyx_kp_s_Provider_0_expected_to_get_calla; -static PyObject *__pyx_kp_s_Provider_0_expected_to_get_corou; static PyObject *__pyx_kp_s_Provider_0_is_not_overridden; -static PyObject *__pyx_n_s_Provider_2; +static PyObject *__pyx_kp_u_Provider_2; +static PyObject *__pyx_n_s_Provider_3; static PyObject *__pyx_n_s_Provider___get; static PyObject *__pyx_n_s_Pyx_CFunc_object____object; static PyObject *__pyx_n_s_Pyx_CFunc_void____object____ob; @@ -4289,20 +4296,20 @@ static PyObject *__pyx_kp_s_Undefined_configuration_option_0; static PyObject *__pyx_kp_s_Unknown_type_of_resource_initial; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_YamlLoader; -static PyObject *__pyx_kp_s__10; -static PyObject *__pyx_n_s__11; +static PyObject *__pyx_n_s__10; static PyObject *__pyx_n_s__2; -static PyObject *__pyx_kp_s__29; +static PyObject *__pyx_kp_s__28; +static PyObject *__pyx_kp_u__29; static PyObject *__pyx_kp_u__30; static PyObject *__pyx_kp_u__31; -static PyObject *__pyx_kp_u__32; -static PyObject *__pyx_kp_s__49; +static PyObject *__pyx_kp_u__4; +static PyObject *__pyx_kp_s__48; static PyObject *__pyx_kp_u__5; +static PyObject *__pyx_kp_s__6; static PyObject *__pyx_kp_u__6; -static PyObject *__pyx_kp_s__7; static PyObject *__pyx_kp_u__7; static PyObject *__pyx_kp_u__8; -static PyObject *__pyx_kp_u__9; +static PyObject *__pyx_kp_s__9; static PyObject *__pyx_n_s_add_args; static PyObject *__pyx_n_s_add_attributes; static PyObject *__pyx_n_s_add_constructor; @@ -4326,7 +4333,6 @@ static PyObject *__pyx_n_s_asyncio; static PyObject *__pyx_n_s_asyncio_coroutines; static PyObject *__pyx_n_s_asyncio_tasks; static PyObject *__pyx_kp_u_at; -static PyObject *__pyx_n_s_attribute; static PyObject *__pyx_n_s_attribute_name; static PyObject *__pyx_n_s_attributes; static PyObject *__pyx_n_s_before_get; @@ -4386,6 +4392,7 @@ static PyObject *__pyx_n_s_errno; static PyObject *__pyx_n_s_errors; static PyObject *__pyx_n_s_exit; static PyObject *__pyx_n_s_expandvars; +static PyObject *__pyx_kp_u_expected_to_get_coroutine_funct; static PyObject *__pyx_n_s_factories; static PyObject *__pyx_n_s_factory; static PyObject *__pyx_n_s_factory_name; @@ -4403,9 +4410,12 @@ static PyObject *__pyx_n_s_gather; static PyObject *__pyx_n_s_genexpr; static PyObject *__pyx_n_s_get; static PyObject *__pyx_n_s_get_2; +static PyObject *__pyx_n_s_get_children; +static PyObject *__pyx_n_s_get_default; static PyObject *__pyx_n_s_get_name; static PyObject *__pyx_n_s_get_self_name; static PyObject *__pyx_n_s_get_self_name_locals_genexpr; +static PyObject *__pyx_n_s_get_strict; static PyObject *__pyx_n_s_getstate; static PyObject *__pyx_kp_u_has_no_attribute; static PyObject *__pyx_n_s_hex; @@ -4423,6 +4433,8 @@ static PyObject *__pyx_n_s_initializer_future; static PyObject *__pyx_n_s_inspect; static PyObject *__pyx_n_s_instance; static PyObject *__pyx_n_s_instance_of; +static PyObject *__pyx_kp_s_instance_of_has_incorrect_type; +static PyObject *__pyx_kp_u_instead; static PyObject *__pyx_n_s_interpolation; static PyObject *__pyx_n_s_is_async_mode_disabled; static PyObject *__pyx_n_s_is_async_mode_enabled; @@ -4441,7 +4453,6 @@ static PyObject *__pyx_n_s_iscoroutine; static PyObject *__pyx_n_s_iscoroutinefunction; static PyObject *__pyx_n_s_isfuture; static PyObject *__pyx_n_s_isgeneratorfunction; -static PyObject *__pyx_n_s_item; static PyObject *__pyx_n_s_items; static PyObject *__pyx_n_s_join; static PyObject *__pyx_n_s_key; @@ -4574,11 +4585,19 @@ static PyObject *__pyx_n_s_set; static PyObject *__pyx_n_s_set_alt_names; static PyObject *__pyx_n_s_set_args; static PyObject *__pyx_n_s_set_attributes; +static PyObject *__pyx_n_s_set_children; static PyObject *__pyx_n_s_set_container; +static PyObject *__pyx_n_s_set_default; static PyObject *__pyx_n_s_set_exception; +static PyObject *__pyx_n_s_set_factories; +static PyObject *__pyx_n_s_set_instance_of; static PyObject *__pyx_n_s_set_kwargs; +static PyObject *__pyx_n_s_set_name; +static PyObject *__pyx_n_s_set_providers; static PyObject *__pyx_n_s_set_provides; static PyObject *__pyx_n_s_set_result; +static PyObject *__pyx_n_s_set_selector; +static PyObject *__pyx_n_s_set_strict; static PyObject *__pyx_n_s_setstate; static PyObject *__pyx_n_s_setstate_cython; static PyObject *__pyx_n_s_settings; @@ -4656,10 +4675,12 @@ static int __pyx_pf_19dependency_injector_9providers_6Object___init__(struct __p static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_4__str__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_6__repr__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_8set_provides(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_7related___get__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_8_provide(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_10__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_12__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_10_provide(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_12__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_14__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_19dependency_injector_9providers_4Self___init__(struct __pyx_obj_19dependency_injector_9providers_Self *__pyx_v_self, PyObject *__pyx_v_container); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Self *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_4__str__(struct __pyx_obj_19dependency_injector_9providers_Self *__pyx_v_self); /* proto */ @@ -4687,19 +4708,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6__getat static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10__repr__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11instance_of___get__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_12set_instance_of(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_instance_of); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_7default___get__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_14set_default(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_default); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10is_defined___get__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_12provided_by(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_16provided_by(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_7related___get__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6parent___get__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11parent_name___get__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_14assign_parent(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_parent); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_16_copy_parent(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_copied, PyObject *__pyx_v_memo); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async_provide(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_check_instance_type(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_instance); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_raise_undefined_error(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_24__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_26__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18assign_parent(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_parent); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_copy_parent(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_copied, PyObject *__pyx_v_memo); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_async_provide(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_24_check_instance_type(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_instance); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_26_raise_undefined_error(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_28__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_30__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_18ExternalDependency___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_18ExternalDependency_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___init__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_dependencies); /* proto */ @@ -4722,18 +4745,19 @@ static int __pyx_pf_19dependency_injector_9providers_8Callable___init__(struct _ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4__str__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6set_provides(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4args___get__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6add_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8set_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10clear_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8add_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10set_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12clear_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_18clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_7related___get__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_18_provide(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_20__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_22__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_20_provide(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_22__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_24__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_17DelegatedCallable___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_17DelegatedCallable_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ @@ -4744,7 +4768,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_8_ static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *__pyx_v_self, PyObject *__pyx_v_callable); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16CallableDelegate_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16CallableDelegate_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ -static int __pyx_pf_19dependency_injector_9providers_9Coroutine___init__(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_9Coroutine_set_provides(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_9Coroutine_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_9Coroutine_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedCoroutine___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *__pyx_v_self); /* proto */ @@ -4800,43 +4824,51 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_8__st static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__getattr__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12__getitem__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_14get_name(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_selector, PyObject *__pyx_v_required); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_selector, PyObject *__pyx_v_value); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22reset_last_overriding(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24reset_override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26reset_cache(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_28update(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30from_ini(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_filepath, PyObject *__pyx_v_required); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32from_yaml(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_filepath, PyObject *__pyx_v_required, PyObject *__pyx_v_loader); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34from_pydantic(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_settings, PyObject *__pyx_v_required, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36from_dict(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_required); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38from_env(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default, PyObject *__pyx_v_required); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16set_name(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18get_default(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20set_default(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_default); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22get_strict(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24set_strict(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_strict); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26get_children(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_28set_children(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_children); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30get(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_selector, PyObject *__pyx_v_required); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32set(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_selector, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36reset_last_overriding(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38reset_override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_40reset_cache(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_42update(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_44from_ini(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_filepath, PyObject *__pyx_v_required); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_46from_yaml(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_filepath, PyObject *__pyx_v_required, PyObject *__pyx_v_loader); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_48from_pydantic(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_settings, PyObject *__pyx_v_required, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_50from_dict(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_required); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_52from_env(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default, PyObject *__pyx_v_required); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_7related___get__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_40_is_strict_mode_enabled(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_42__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_44__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_54_is_strict_mode_enabled(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_56__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_58__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4__str__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_3cls___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6set_provides(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4args___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8add_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10set_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12clear_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20add_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22set_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24clear_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_7related___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24_provide(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_26__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_28__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_26_provide(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_28__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_30__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16DelegatedFactory___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16DelegatedFactory_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ @@ -4852,34 +4884,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_2_ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_4__getattr__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factory_name); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_6__str__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_9factories___get__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8override(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8set_factories(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factories); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10override(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_7related___get__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10_provide(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_12__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_14__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_12_provide(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__str__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_provides(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10clear_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8add_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10set_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12clear_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14add_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16set_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10attributes___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22clear_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24reset(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26full_reset(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20add_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22set_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24clear_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26reset(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28full_reset(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_7related___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_async_init_instance(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_result); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_30__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_32__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_30_async_init_instance(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_result); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_32__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_34__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_4_provide(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ @@ -4932,34 +4966,35 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_7related___get_ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_12_provide(struct __pyx_obj_19dependency_injector_9providers_Dict *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Dict *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Dict *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ -static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_initializer, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4__str__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_11initializer___get__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6set_provides(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4args___get__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6add_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8set_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_10clear_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8add_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_10set_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_12clear_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_14add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_16set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_18clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_11initialized___get__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_18init(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20init(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_22shutdown(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_7related___get__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_22_provide(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_init_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_shutdowner); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_async_gen_init_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_initializer); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_init_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_initializer, PyObject *__pyx_v_shutdowner); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_create_gen_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_initializer_future); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_32_async_trigger_result(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_future_result); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_shutdown_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_shutdown_future); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_shutdown_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_shutdowner); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resource_subclass(PyObject *__pyx_v_instance); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_async_resource_subclass(PyObject *__pyx_v_instance); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_44__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_provide(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_init_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_shutdowner); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_create_async_gen_init_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_initializer); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_init_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_initializer, PyObject *__pyx_v_shutdowner); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_32_async_create_gen_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_initializer_future); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_async_trigger_result(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_future_result); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_create_shutdown_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_shutdown_future); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_async_shutdown_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_shutdowner); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_resource_subclass(PyObject *__pyx_v_instance); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42_is_async_resource_subclass(PyObject *__pyx_v_instance); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_44__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_46__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct __pyx_obj_19dependency_injector_9providers_Container *__pyx_v_self, PyObject *__pyx_v_container_cls, PyObject *__pyx_v_container, PyObject *__pyx_v_overriding_providers); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Container *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_4__getattr__(struct __pyx_obj_19dependency_injector_9providers_Container *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ @@ -4983,62 +5018,73 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_2__deepcopy static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_4__getattr__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_7__str___genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_6__str__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_8selector___get__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_8set_selector(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v_selector); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_9providers___get__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_10set_providers(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v_providers); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_7related___get__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_8_provide(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_10__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_12__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ -static int __pyx_pf_19dependency_injector_9providers_16ProvidedInstance___init__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_12_provide(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_19dependency_injector_9providers_16ProvidedInstance___init__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_2__repr__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_6__getattr__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_8__getitem__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_10call(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_10set_provides(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_12call(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_7related___get__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_12_provide(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ -static int __pyx_pf_19dependency_injector_9providers_15AttributeGetter___init__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_provider, PyObject *__pyx_v_attribute); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14_provide(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_16__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_18__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_19dependency_injector_9providers_15AttributeGetter___init__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_2__repr__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_6__getattr__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_8__getitem__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_10set_provides(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4name___get__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_10call(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_12set_name(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14call(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_7related___get__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_12_provide(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_async_provide(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_18__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ -static int __pyx_pf_19dependency_injector_9providers_10ItemGetter___init__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_provider, PyObject *__pyx_v_item); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_provide(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_18_async_provide(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_20__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_22__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_19dependency_injector_9providers_10ItemGetter___init__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_2__repr__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_6__getattr__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_8__getitem__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_10set_provides(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4name___get__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_10call(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_12set_name(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_14call(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_7related___get__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_12_provide(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_14_async_provide(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_18__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ -static int __pyx_pf_19dependency_injector_9providers_12MethodCaller___init__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_provider, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16_provide(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_18_async_provide(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_20__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_22__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_19dependency_injector_9providers_12MethodCaller___init__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_2__repr__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_6__getattr__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_8__getitem__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4args___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_10call(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_12set_provides(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4args___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_14set_args(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_args); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16set_kwargs(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_7related___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_12_provide(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_14_async_provide(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, PyObject *__pyx_v_future); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_18__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_18_provide(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_20_async_provide(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, PyObject *__pyx_v_future); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_22__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_24__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_9Injection___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Injection *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_9Injection_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Injection *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___init__(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ @@ -5086,54 +5132,57 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_37_copy_parent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_from_, PyObject *__pyx_v_to, PyObject *__pyx_v_memo); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_40__pyx_unpickle_Provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_42__pyx_unpickle_Object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_44__pyx_unpickle_Self(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_46__pyx_unpickle_Delegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_48__pyx_unpickle_Dependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_50__pyx_unpickle_ExternalDependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_52__pyx_unpickle_DependenciesContainer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_54__pyx_unpickle_Callable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_56__pyx_unpickle_DelegatedCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_58__pyx_unpickle_AbstractCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_60__pyx_unpickle_CallableDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_62__pyx_unpickle_Coroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_64__pyx_unpickle_DelegatedCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_66__pyx_unpickle_AbstractCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_68__pyx_unpickle_CoroutineDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_70__pyx_unpickle_ConfigurationOption(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_72__pyx_unpickle_TypedConfigurationOption(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_74__pyx_unpickle_Configuration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_76__pyx_unpickle_Factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_78__pyx_unpickle_DelegatedFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_80__pyx_unpickle_AbstractFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_82__pyx_unpickle_FactoryDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_84__pyx_unpickle_FactoryAggregate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_86__pyx_unpickle_BaseSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_88__pyx_unpickle_Singleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_90__pyx_unpickle_DelegatedSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_92__pyx_unpickle_ThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_94__pyx_unpickle_DelegatedThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_96__pyx_unpickle_ThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_98__pyx_unpickle_DelegatedThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_100__pyx_unpickle_AbstractSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_102__pyx_unpickle_SingletonDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_104__pyx_unpickle_List(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_106__pyx_unpickle_Dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_Resource(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_110__pyx_unpickle_Container(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_112__pyx_unpickle_Selector(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_ProvidedInstance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_AttributeGetter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_ItemGetter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_MethodCaller(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_122__pyx_unpickle_Injection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_124__pyx_unpickle_PositionalInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_126__pyx_unpickle_NamedInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_128__pyx_unpickle_OverridingContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_130__pyx_unpickle_BaseSingletonResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_132__pyx_unpickle_SingletonResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_9providers_134__pyx_unpickle_SingletonFullResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_39_memorized_duplicate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_memo); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_41_copy_if_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_memo); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_43_class_qualname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_46__pyx_unpickle_Provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_48__pyx_unpickle_Object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_50__pyx_unpickle_Self(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_52__pyx_unpickle_Delegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_54__pyx_unpickle_Dependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_56__pyx_unpickle_ExternalDependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_58__pyx_unpickle_DependenciesContainer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_60__pyx_unpickle_Callable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_62__pyx_unpickle_DelegatedCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_64__pyx_unpickle_AbstractCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_66__pyx_unpickle_CallableDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_68__pyx_unpickle_Coroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_70__pyx_unpickle_DelegatedCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_72__pyx_unpickle_AbstractCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_74__pyx_unpickle_CoroutineDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_76__pyx_unpickle_ConfigurationOption(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_78__pyx_unpickle_TypedConfigurationOption(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_80__pyx_unpickle_Configuration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_82__pyx_unpickle_Factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_84__pyx_unpickle_DelegatedFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_86__pyx_unpickle_AbstractFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_88__pyx_unpickle_FactoryDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_90__pyx_unpickle_FactoryAggregate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_92__pyx_unpickle_BaseSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_94__pyx_unpickle_Singleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_96__pyx_unpickle_DelegatedSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_98__pyx_unpickle_ThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_100__pyx_unpickle_DelegatedThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_102__pyx_unpickle_ThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_104__pyx_unpickle_DelegatedThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_106__pyx_unpickle_AbstractSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_SingletonDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_110__pyx_unpickle_List(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_112__pyx_unpickle_Dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_Resource(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_Container(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_Selector(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_ProvidedInstance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_122__pyx_unpickle_AttributeGetter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_124__pyx_unpickle_ItemGetter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_126__pyx_unpickle_MethodCaller(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_128__pyx_unpickle_Injection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_130__pyx_unpickle_PositionalInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_132__pyx_unpickle_NamedInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_134__pyx_unpickle_OverridingContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_136__pyx_unpickle_BaseSingletonResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_138__pyx_unpickle_SingletonResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_9providers_140__pyx_unpickle_SingletonFullResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* 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 */ @@ -5232,27 +5281,24 @@ static PyObject *__pyx_int_52983931; static PyObject *__pyx_int_65022886; static PyObject *__pyx_int_69951814; static PyObject *__pyx_int_70248545; +static PyObject *__pyx_int_99685125; +static PyObject *__pyx_int_103715212; static PyObject *__pyx_int_105855327; static PyObject *__pyx_int_111758699; -static PyObject *__pyx_int_120901579; static PyObject *__pyx_int_122966839; -static PyObject *__pyx_int_132941027; static PyObject *__pyx_int_152985532; static PyObject *__pyx_int_160436077; -static PyObject *__pyx_int_168129982; static PyObject *__pyx_int_170282226; static PyObject *__pyx_int_180627541; static PyObject *__pyx_int_216322617; -static PyObject *__pyx_int_240604463; static PyObject *__pyx_int_254598103; -static PyObject *__pyx_int_265687189; static PyObject *__pyx_int_267092376; static PyObject *__pyx_int_267861151; -static PyObject *__pyx_k__4; +static PyObject *__pyx_k__12; static PyObject *__pyx_k__13; static PyObject *__pyx_k__14; static PyObject *__pyx_k__15; -static PyObject *__pyx_k__16; +static PyObject *__pyx_k__17; static PyObject *__pyx_k__18; static PyObject *__pyx_k__19; static PyObject *__pyx_k__20; @@ -5261,143 +5307,142 @@ static PyObject *__pyx_k__22; static PyObject *__pyx_k__23; static PyObject *__pyx_k__24; static PyObject *__pyx_k__25; -static PyObject *__pyx_k__26; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__3; -static PyObject *__pyx_tuple__12; -static PyObject *__pyx_tuple__17; +static PyObject *__pyx_tuple__11; +static PyObject *__pyx_tuple__16; +static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__27; -static PyObject *__pyx_tuple__28; -static PyObject *__pyx_tuple__34; -static PyObject *__pyx_tuple__36; -static PyObject *__pyx_tuple__38; -static PyObject *__pyx_tuple__40; +static PyObject *__pyx_tuple__33; +static PyObject *__pyx_tuple__35; +static PyObject *__pyx_tuple__37; +static PyObject *__pyx_tuple__39; +static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__42; -static PyObject *__pyx_tuple__43; -static PyObject *__pyx_tuple__45; -static PyObject *__pyx_tuple__47; +static PyObject *__pyx_tuple__44; +static PyObject *__pyx_tuple__46; +static PyObject *__pyx_tuple__49; static PyObject *__pyx_tuple__50; -static PyObject *__pyx_tuple__51; -static PyObject *__pyx_tuple__53; -static PyObject *__pyx_tuple__55; -static PyObject *__pyx_tuple__57; -static PyObject *__pyx_tuple__59; +static PyObject *__pyx_tuple__52; +static PyObject *__pyx_tuple__54; +static PyObject *__pyx_tuple__56; +static PyObject *__pyx_tuple__58; +static PyObject *__pyx_tuple__60; static PyObject *__pyx_tuple__61; -static PyObject *__pyx_tuple__62; -static PyObject *__pyx_tuple__64; -static PyObject *__pyx_tuple__66; -static PyObject *__pyx_tuple__68; -static PyObject *__pyx_tuple__70; -static PyObject *__pyx_tuple__72; -static PyObject *__pyx_tuple__74; -static PyObject *__pyx_tuple__76; -static PyObject *__pyx_tuple__78; -static PyObject *__pyx_tuple__80; -static PyObject *__pyx_tuple__82; -static PyObject *__pyx_tuple__84; -static PyObject *__pyx_tuple__86; -static PyObject *__pyx_tuple__88; -static PyObject *__pyx_tuple__90; -static PyObject *__pyx_tuple__92; -static PyObject *__pyx_tuple__94; -static PyObject *__pyx_tuple__96; -static PyObject *__pyx_tuple__98; -static PyObject *__pyx_tuple__100; -static PyObject *__pyx_tuple__102; -static PyObject *__pyx_tuple__104; -static PyObject *__pyx_tuple__106; -static PyObject *__pyx_tuple__108; -static PyObject *__pyx_tuple__110; -static PyObject *__pyx_tuple__112; -static PyObject *__pyx_tuple__114; -static PyObject *__pyx_tuple__116; -static PyObject *__pyx_tuple__118; -static PyObject *__pyx_tuple__120; -static PyObject *__pyx_tuple__122; -static PyObject *__pyx_tuple__124; -static PyObject *__pyx_tuple__126; -static PyObject *__pyx_tuple__128; -static PyObject *__pyx_tuple__130; -static PyObject *__pyx_tuple__132; -static PyObject *__pyx_tuple__134; -static PyObject *__pyx_tuple__136; -static PyObject *__pyx_tuple__138; -static PyObject *__pyx_tuple__140; -static PyObject *__pyx_tuple__142; -static PyObject *__pyx_tuple__144; -static PyObject *__pyx_tuple__146; -static PyObject *__pyx_tuple__148; -static PyObject *__pyx_tuple__150; -static PyObject *__pyx_tuple__152; -static PyObject *__pyx_tuple__154; -static PyObject *__pyx_tuple__156; -static PyObject *__pyx_tuple__158; -static PyObject *__pyx_tuple__160; -static PyObject *__pyx_tuple__162; -static PyObject *__pyx_codeobj__33; -static PyObject *__pyx_codeobj__35; -static PyObject *__pyx_codeobj__37; -static PyObject *__pyx_codeobj__39; -static PyObject *__pyx_codeobj__41; -static PyObject *__pyx_codeobj__44; -static PyObject *__pyx_codeobj__46; -static PyObject *__pyx_codeobj__48; -static PyObject *__pyx_codeobj__52; -static PyObject *__pyx_codeobj__54; -static PyObject *__pyx_codeobj__56; -static PyObject *__pyx_codeobj__58; -static PyObject *__pyx_codeobj__60; -static PyObject *__pyx_codeobj__63; -static PyObject *__pyx_codeobj__65; -static PyObject *__pyx_codeobj__67; -static PyObject *__pyx_codeobj__69; -static PyObject *__pyx_codeobj__71; -static PyObject *__pyx_codeobj__73; -static PyObject *__pyx_codeobj__75; -static PyObject *__pyx_codeobj__77; -static PyObject *__pyx_codeobj__79; -static PyObject *__pyx_codeobj__81; -static PyObject *__pyx_codeobj__83; -static PyObject *__pyx_codeobj__85; -static PyObject *__pyx_codeobj__87; -static PyObject *__pyx_codeobj__89; -static PyObject *__pyx_codeobj__91; -static PyObject *__pyx_codeobj__93; -static PyObject *__pyx_codeobj__95; -static PyObject *__pyx_codeobj__97; -static PyObject *__pyx_codeobj__99; -static PyObject *__pyx_codeobj__101; -static PyObject *__pyx_codeobj__103; -static PyObject *__pyx_codeobj__105; -static PyObject *__pyx_codeobj__107; -static PyObject *__pyx_codeobj__109; -static PyObject *__pyx_codeobj__111; -static PyObject *__pyx_codeobj__113; -static PyObject *__pyx_codeobj__115; -static PyObject *__pyx_codeobj__117; -static PyObject *__pyx_codeobj__119; -static PyObject *__pyx_codeobj__121; -static PyObject *__pyx_codeobj__123; -static PyObject *__pyx_codeobj__125; -static PyObject *__pyx_codeobj__127; -static PyObject *__pyx_codeobj__129; -static PyObject *__pyx_codeobj__131; -static PyObject *__pyx_codeobj__133; -static PyObject *__pyx_codeobj__135; -static PyObject *__pyx_codeobj__137; -static PyObject *__pyx_codeobj__139; -static PyObject *__pyx_codeobj__141; -static PyObject *__pyx_codeobj__143; -static PyObject *__pyx_codeobj__145; -static PyObject *__pyx_codeobj__147; -static PyObject *__pyx_codeobj__149; -static PyObject *__pyx_codeobj__151; -static PyObject *__pyx_codeobj__153; -static PyObject *__pyx_codeobj__155; -static PyObject *__pyx_codeobj__157; -static PyObject *__pyx_codeobj__159; -static PyObject *__pyx_codeobj__161; -static PyObject *__pyx_codeobj__163; +static PyObject *__pyx_tuple__63; +static PyObject *__pyx_tuple__65; +static PyObject *__pyx_tuple__67; +static PyObject *__pyx_tuple__69; +static PyObject *__pyx_tuple__71; +static PyObject *__pyx_tuple__73; +static PyObject *__pyx_tuple__75; +static PyObject *__pyx_tuple__77; +static PyObject *__pyx_tuple__79; +static PyObject *__pyx_tuple__81; +static PyObject *__pyx_tuple__83; +static PyObject *__pyx_tuple__85; +static PyObject *__pyx_tuple__87; +static PyObject *__pyx_tuple__89; +static PyObject *__pyx_tuple__91; +static PyObject *__pyx_tuple__93; +static PyObject *__pyx_tuple__95; +static PyObject *__pyx_tuple__97; +static PyObject *__pyx_tuple__99; +static PyObject *__pyx_tuple__101; +static PyObject *__pyx_tuple__103; +static PyObject *__pyx_tuple__105; +static PyObject *__pyx_tuple__107; +static PyObject *__pyx_tuple__109; +static PyObject *__pyx_tuple__111; +static PyObject *__pyx_tuple__113; +static PyObject *__pyx_tuple__115; +static PyObject *__pyx_tuple__117; +static PyObject *__pyx_tuple__119; +static PyObject *__pyx_tuple__121; +static PyObject *__pyx_tuple__123; +static PyObject *__pyx_tuple__125; +static PyObject *__pyx_tuple__127; +static PyObject *__pyx_tuple__129; +static PyObject *__pyx_tuple__131; +static PyObject *__pyx_tuple__133; +static PyObject *__pyx_tuple__135; +static PyObject *__pyx_tuple__137; +static PyObject *__pyx_tuple__139; +static PyObject *__pyx_tuple__141; +static PyObject *__pyx_tuple__143; +static PyObject *__pyx_tuple__145; +static PyObject *__pyx_tuple__147; +static PyObject *__pyx_tuple__149; +static PyObject *__pyx_tuple__151; +static PyObject *__pyx_tuple__153; +static PyObject *__pyx_tuple__155; +static PyObject *__pyx_tuple__157; +static PyObject *__pyx_tuple__159; +static PyObject *__pyx_tuple__161; +static PyObject *__pyx_codeobj__32; +static PyObject *__pyx_codeobj__34; +static PyObject *__pyx_codeobj__36; +static PyObject *__pyx_codeobj__38; +static PyObject *__pyx_codeobj__40; +static PyObject *__pyx_codeobj__43; +static PyObject *__pyx_codeobj__45; +static PyObject *__pyx_codeobj__47; +static PyObject *__pyx_codeobj__51; +static PyObject *__pyx_codeobj__53; +static PyObject *__pyx_codeobj__55; +static PyObject *__pyx_codeobj__57; +static PyObject *__pyx_codeobj__59; +static PyObject *__pyx_codeobj__62; +static PyObject *__pyx_codeobj__64; +static PyObject *__pyx_codeobj__66; +static PyObject *__pyx_codeobj__68; +static PyObject *__pyx_codeobj__70; +static PyObject *__pyx_codeobj__72; +static PyObject *__pyx_codeobj__74; +static PyObject *__pyx_codeobj__76; +static PyObject *__pyx_codeobj__78; +static PyObject *__pyx_codeobj__80; +static PyObject *__pyx_codeobj__82; +static PyObject *__pyx_codeobj__84; +static PyObject *__pyx_codeobj__86; +static PyObject *__pyx_codeobj__88; +static PyObject *__pyx_codeobj__90; +static PyObject *__pyx_codeobj__92; +static PyObject *__pyx_codeobj__94; +static PyObject *__pyx_codeobj__96; +static PyObject *__pyx_codeobj__98; +static PyObject *__pyx_codeobj__100; +static PyObject *__pyx_codeobj__102; +static PyObject *__pyx_codeobj__104; +static PyObject *__pyx_codeobj__106; +static PyObject *__pyx_codeobj__108; +static PyObject *__pyx_codeobj__110; +static PyObject *__pyx_codeobj__112; +static PyObject *__pyx_codeobj__114; +static PyObject *__pyx_codeobj__116; +static PyObject *__pyx_codeobj__118; +static PyObject *__pyx_codeobj__120; +static PyObject *__pyx_codeobj__122; +static PyObject *__pyx_codeobj__124; +static PyObject *__pyx_codeobj__126; +static PyObject *__pyx_codeobj__128; +static PyObject *__pyx_codeobj__130; +static PyObject *__pyx_codeobj__132; +static PyObject *__pyx_codeobj__134; +static PyObject *__pyx_codeobj__136; +static PyObject *__pyx_codeobj__138; +static PyObject *__pyx_codeobj__140; +static PyObject *__pyx_codeobj__142; +static PyObject *__pyx_codeobj__144; +static PyObject *__pyx_codeobj__146; +static PyObject *__pyx_codeobj__148; +static PyObject *__pyx_codeobj__150; +static PyObject *__pyx_codeobj__152; +static PyObject *__pyx_codeobj__154; +static PyObject *__pyx_codeobj__156; +static PyObject *__pyx_codeobj__158; +static PyObject *__pyx_codeobj__160; +static PyObject *__pyx_codeobj__162; /* Late includes */ /* "dependency_injector/providers.pyx":57 @@ -5409,9 +5454,9 @@ static PyObject *__pyx_codeobj__163; */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_39lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_39lambda = {"lambda", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_39lambda, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_39lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_45lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_45lambda = {"lambda", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_45lambda, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_45lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; PyObject *__pyx_v_memo = 0; int __pyx_lineno = 0; @@ -10468,14 +10513,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_42__setstat /* "dependency_injector/providers.pyx":403 * """ * - * def __init__(self, provides): # <<<<<<<<<<<<<< - * """Initializer. - * + * def __init__(self, provides=None): # <<<<<<<<<<<<<< + * """Initialize provider.""" + * self.__provides = None */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_6Object_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_6Object___init__[] = "Initializer.\n\n :param provides: Value that have to be provided.\n :type provides: object\n "; +static char __pyx_doc_19dependency_injector_9providers_6Object___init__[] = "Initialize provider."; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_6Object___init__; #endif @@ -10490,6 +10535,7 @@ static int __pyx_pw_19dependency_injector_9providers_6Object_1__init__(PyObject { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -10502,22 +10548,27 @@ static int __pyx_pw_19dependency_injector_9providers_6Object_1__init__(PyObject kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 403, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } } __pyx_v_provides = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 403, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 403, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Object.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -10541,27 +10592,53 @@ static int __pyx_pf_19dependency_injector_9providers_6Object___init__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":409 - * :type provides: object - * """ - * self.__provides = provides # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":405 + * def __init__(self, provides=None): + * """Initialize provider.""" + * self.__provides = None # <<<<<<<<<<<<<< + * self.set_provides(provides) + * super(Object, self).__init__() + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = Py_None; + + /* "dependency_injector/providers.pyx":406 + * """Initialize provider.""" + * self.__provides = None + * self.set_provides(provides) # <<<<<<<<<<<<<< * super(Object, self).__init__() * */ - __Pyx_INCREF(__pyx_v_provides); - __Pyx_GIVEREF(__pyx_v_provides); - __Pyx_GOTREF(__pyx_v_self->__pyx___provides); - __Pyx_DECREF(__pyx_v_self->__pyx___provides); - __pyx_v_self->__pyx___provides = __pyx_v_provides; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 406, __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_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_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":410 - * """ - * self.__provides = provides + /* "dependency_injector/providers.pyx":407 + * self.__provides = None + * self.set_provides(provides) * super(Object, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 410, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object)); @@ -10569,10 +10646,10 @@ static int __pyx_pf_19dependency_injector_9providers_6Object___init__(struct __p __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 410, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 410, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -10587,7 +10664,7 @@ static int __pyx_pf_19dependency_injector_9providers_6Object___init__(struct __p } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 410, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 407, __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; @@ -10595,9 +10672,9 @@ static int __pyx_pf_19dependency_injector_9providers_6Object___init__(struct __p /* "dependency_injector/providers.pyx":403 * """ * - * def __init__(self, provides): # <<<<<<<<<<<<<< - * """Initializer. - * + * def __init__(self, provides=None): # <<<<<<<<<<<<<< + * """Initialize provider.""" + * self.__provides = None */ /* function exit code */ @@ -10614,7 +10691,7 @@ static int __pyx_pf_19dependency_injector_9providers_6Object___init__(struct __p return __pyx_r; } -/* "dependency_injector/providers.pyx":412 +/* "dependency_injector/providers.pyx":409 * super(Object, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -10651,16 +10728,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_2__deepcopy__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":414 + /* "dependency_injector/providers.pyx":411 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 414, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 414, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10675,13 +10752,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_2__deepcopy__ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 414, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":415 + /* "dependency_injector/providers.pyx":412 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -10692,19 +10769,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_2__deepcopy__ __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":416 + /* "dependency_injector/providers.pyx":413 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * copied = self.__class__(self.__provides) + * copied = _memorized_duplicate(self, memo) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_copied); __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":415 + /* "dependency_injector/providers.pyx":412 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -10713,45 +10790,60 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_2__deepcopy__ */ } - /* "dependency_injector/providers.pyx":418 + /* "dependency_injector/providers.pyx":415 * return copied * - * copied = self.__class__(self.__provides) # <<<<<<<<<<<<<< + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_provides(self.provides) + * + */ + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 415, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":416 + * + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(self.provides) # <<<<<<<<<<<<<< * * self._copy_overridings(copied, memo) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 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)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __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_v_self->__pyx___provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx___provides); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 418, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); - __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":420 - * copied = self.__class__(self.__provides) + /* "dependency_injector/providers.pyx":418 + * copied.set_provides(self.provides) * * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 420, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 420, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 418, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 418, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_Object *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":422 + /* "dependency_injector/providers.pyx":420 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -10763,7 +10855,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_2__deepcopy__ __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":412 + /* "dependency_injector/providers.pyx":409 * super(Object, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -10786,7 +10878,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_2__deepcopy__ return __pyx_r; } -/* "dependency_injector/providers.pyx":424 +/* "dependency_injector/providers.pyx":422 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -10821,7 +10913,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_4__str__(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":429 + /* "dependency_injector/providers.pyx":427 * :rtype: str * """ * return represent_provider(provider=self, provides=self.__provides) # <<<<<<<<<<<<<< @@ -10831,14 +10923,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_4__str__(stru __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 429, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":424 + /* "dependency_injector/providers.pyx":422 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -10858,7 +10950,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_4__str__(stru return __pyx_r; } -/* "dependency_injector/providers.pyx":431 +/* "dependency_injector/providers.pyx":429 * return represent_provider(provider=self, provides=self.__provides) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -10894,7 +10986,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_6__repr__(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "dependency_injector/providers.pyx":436 + /* "dependency_injector/providers.pyx":434 * :rtype: str * """ * return self.__str__() # <<<<<<<<<<<<<< @@ -10902,7 +10994,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_6__repr__(str * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 436, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10916,14 +11008,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_6__repr__(str } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 436, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":431 + /* "dependency_injector/providers.pyx":429 * return represent_provider(provider=self, provides=self.__provides) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -10943,9 +11035,129 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_6__repr__(str __Pyx_RefNannyFinishContext(); return __pyx_r; } + +/* "dependency_injector/providers.pyx":437 + * + * @property + * def provides(self): # <<<<<<<<<<<<<< + * """Return provider's provides.""" + * return self.__provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_8provides_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_8provides_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_8provides___get__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "dependency_injector/providers.pyx":439 + * def provides(self): + * """Return provider's provides.""" + * return self.__provides # <<<<<<<<<<<<<< + * + * def set_provides(self, provides): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __pyx_r = __pyx_v_self->__pyx___provides; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":437 + * + * @property + * def provides(self): # <<<<<<<<<<<<<< + * """Return provider's provides.""" + * return self.__provides + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":441 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_6Object_8set_provides[] = "Set provider's provides."; +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_8set_provides(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self), ((PyObject *)__pyx_v_provides)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_8set_provides(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides", 0); + + /* "dependency_injector/providers.pyx":443 + * def set_provides(self, provides): + * """Set provider's provides.""" + * self.__provides = provides # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_provides); + __Pyx_GIVEREF(__pyx_v_provides); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = __pyx_v_provides; + + /* "dependency_injector/providers.pyx":444 + * """Set provider's provides.""" + * self.__provides = provides + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":441 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} static PyObject *__pyx_gb_19dependency_injector_9providers_6Object_7related_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":439 +/* "dependency_injector/providers.pyx":447 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -10978,7 +11190,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_7related___ge if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_1___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 439, __pyx_L1_error) + __PYX_ERR(1, 447, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -10986,7 +11198,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_7related___ge __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_6Object_7related_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Object___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 439, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_6Object_7related_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Object___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -11024,9 +11236,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_6Object_7related_2gen return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 439, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 447, __pyx_L1_error) - /* "dependency_injector/providers.pyx":441 + /* "dependency_injector/providers.pyx":449 * def related(self): * """Return related providers generator.""" * if isinstance(self.__provides, Provider): # <<<<<<<<<<<<<< @@ -11040,7 +11252,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_6Object_7related_2gen __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "dependency_injector/providers.pyx":442 + /* "dependency_injector/providers.pyx":450 * """Return related providers generator.""" * if isinstance(self.__provides, Provider): * yield self.__provides # <<<<<<<<<<<<<< @@ -11056,9 +11268,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_6Object_7related_2gen __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L5_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 442, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 450, __pyx_L1_error) - /* "dependency_injector/providers.pyx":441 + /* "dependency_injector/providers.pyx":449 * def related(self): * """Return related providers generator.""" * if isinstance(self.__provides, Provider): # <<<<<<<<<<<<<< @@ -11067,14 +11279,14 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_6Object_7related_2gen */ } - /* "dependency_injector/providers.pyx":443 + /* "dependency_injector/providers.pyx":451 * if isinstance(self.__provides, Provider): * yield self.__provides * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object)); @@ -11082,10 +11294,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_6Object_7related_2gen __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 443, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -11099,17 +11311,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_6Object_7related_2gen __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L6_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 443, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 451, __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(1, 443, __pyx_L1_error) + else __PYX_ERR(1, 451, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":439 + /* "dependency_injector/providers.pyx":447 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -11135,7 +11347,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_6Object_7related_2gen return __pyx_r; } -/* "dependency_injector/providers.pyx":445 +/* "dependency_injector/providers.pyx":453 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -11143,7 +11355,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_6Object_7related_2gen * */ -static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_11_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -11166,9 +11378,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struc if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_6Object_9_provide)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_6Object_11_provide)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -11186,7 +11398,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -11194,13 +11406,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -11211,7 +11423,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struc __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -11234,7 +11446,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struc #endif } - /* "dependency_injector/providers.pyx":456 + /* "dependency_injector/providers.pyx":464 * :rtype: object * """ * return self.__provides # <<<<<<<<<<<<<< @@ -11246,7 +11458,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struc __pyx_r = __pyx_v_self->__pyx___provides; goto __pyx_L0; - /* "dependency_injector/providers.pyx":445 + /* "dependency_injector/providers.pyx":453 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -11270,9 +11482,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struc } /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_6Object_8_provide[] = "Return provided instance.\n\n :param args: Tuple of context positional arguments.\n :type args: tuple[object]\n\n :param kwargs: Dictionary of context keyword arguments.\n :type kwargs: dict[str, object]\n\n :rtype: object\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_11_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_6Object_10_provide[] = "Return provided instance.\n\n :param args: Tuple of context positional arguments.\n :type args: tuple[object]\n\n :param kwargs: Dictionary of context keyword arguments.\n :type kwargs: dict[str, object]\n\n :rtype: object\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_11_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -11304,11 +11516,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9_provide(PyO case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 445, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 453, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 445, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 453, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11321,15 +11533,15 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9_provide(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 445, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 453, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Object._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 445, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 445, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_8_provide(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 453, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 453, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_10_provide(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; @@ -11340,7 +11552,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9_provide(PyO return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_8_provide(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_10_provide(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -11349,7 +11561,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_8_provide(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_6Object__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_6Object__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -11373,19 +11585,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_8_provide(str */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_10__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_12__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_10__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_12__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -11637,19 +11849,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_10__reduce_cy */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_12__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_14__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_12__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_14__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -11688,7 +11900,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_12__setstate_ return __pyx_r; } -/* "dependency_injector/providers.pyx":462 +/* "dependency_injector/providers.pyx":470 * """Self provider returns own container.""" * * def __init__(self, container=None): # <<<<<<<<<<<<<< @@ -11732,7 +11944,7 @@ static int __pyx_pw_19dependency_injector_9providers_4Self_1__init__(PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 462, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 470, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -11746,7 +11958,7 @@ static int __pyx_pw_19dependency_injector_9providers_4Self_1__init__(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 462, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 470, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Self.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11770,7 +11982,7 @@ static int __pyx_pf_19dependency_injector_9providers_4Self___init__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":464 + /* "dependency_injector/providers.pyx":472 * def __init__(self, container=None): * """Initialize provider.""" * self.__container = container # <<<<<<<<<<<<<< @@ -11783,14 +11995,14 @@ static int __pyx_pf_19dependency_injector_9providers_4Self___init__(struct __pyx __Pyx_DECREF(__pyx_v_self->__pyx___container); __pyx_v_self->__pyx___container = __pyx_v_container; - /* "dependency_injector/providers.pyx":465 + /* "dependency_injector/providers.pyx":473 * """Initialize provider.""" * self.__container = container * self.__alt_names = tuple() # <<<<<<<<<<<<<< * super().__init__() * */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 465, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___alt_names); @@ -11798,14 +12010,14 @@ static int __pyx_pf_19dependency_injector_9providers_4Self___init__(struct __pyx __pyx_v_self->__pyx___alt_names = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":466 + /* "dependency_injector/providers.pyx":474 * self.__container = container * self.__alt_names = tuple() * super().__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 466, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Self)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Self)); @@ -11813,10 +12025,10 @@ static int __pyx_pf_19dependency_injector_9providers_4Self___init__(struct __pyx __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 466, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 466, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -11831,12 +12043,12 @@ static int __pyx_pf_19dependency_injector_9providers_4Self___init__(struct __pyx } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 466, __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; - /* "dependency_injector/providers.pyx":462 + /* "dependency_injector/providers.pyx":470 * """Self provider returns own container.""" * * def __init__(self, container=None): # <<<<<<<<<<<<<< @@ -11858,7 +12070,7 @@ static int __pyx_pf_19dependency_injector_9providers_4Self___init__(struct __pyx return __pyx_r; } -/* "dependency_injector/providers.pyx":468 +/* "dependency_injector/providers.pyx":476 * super().__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -11896,16 +12108,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":470 + /* "dependency_injector/providers.pyx":478 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 470, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 470, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -11920,13 +12132,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(s __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 470, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":471 + /* "dependency_injector/providers.pyx":479 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -11937,7 +12149,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(s __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":472 + /* "dependency_injector/providers.pyx":480 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -11949,7 +12161,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(s __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":471 + /* "dependency_injector/providers.pyx":479 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -11958,14 +12170,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(s */ } - /* "dependency_injector/providers.pyx":474 + /* "dependency_injector/providers.pyx":482 * return copied * * copied = self.__class__() # <<<<<<<<<<<<<< * memo[id(self)] = copied * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 474, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -11979,39 +12191,39 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(s } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 474, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":475 + /* "dependency_injector/providers.pyx":483 * * copied = self.__class__() * memo[id(self)] = copied # <<<<<<<<<<<<<< * * copied.set_container(deepcopy(self.__container, memo)) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 475, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_copied) < 0)) __PYX_ERR(1, 475, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_copied) < 0)) __PYX_ERR(1, 483, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":477 + /* "dependency_injector/providers.pyx":485 * memo[id(self)] = copied * * copied.set_container(deepcopy(self.__container, memo)) # <<<<<<<<<<<<<< * copied.set_alt_names(self.__alt_names) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_container); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 477, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_container); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_v_self->__pyx___container; __Pyx_INCREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 477, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 485, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 477, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -12027,19 +12239,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(s __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(1, 477, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":478 + /* "dependency_injector/providers.pyx":486 * * copied.set_container(deepcopy(self.__container, memo)) * copied.set_alt_names(self.__alt_names) # <<<<<<<<<<<<<< * * self._copy_overridings(copied, memo) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_alt_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 478, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_alt_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -12053,23 +12265,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(s } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_self->__pyx___alt_names) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx___alt_names); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 478, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":480 + /* "dependency_injector/providers.pyx":488 * copied.set_alt_names(self.__alt_names) * * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 480, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 480, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 488, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 488, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_Self *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":482 + /* "dependency_injector/providers.pyx":490 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -12081,7 +12293,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(s __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":468 + /* "dependency_injector/providers.pyx":476 * super().__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -12104,7 +12316,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_2__deepcopy__(s return __pyx_r; } -/* "dependency_injector/providers.pyx":484 +/* "dependency_injector/providers.pyx":492 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -12139,7 +12351,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_4__str__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":489 + /* "dependency_injector/providers.pyx":497 * :rtype: str * """ * return represent_provider(provider=self, provides=self.__container) # <<<<<<<<<<<<<< @@ -12149,14 +12361,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_4__str__(struct __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->__pyx___container; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 489, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":484 + /* "dependency_injector/providers.pyx":492 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -12176,7 +12388,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_4__str__(struct return __pyx_r; } -/* "dependency_injector/providers.pyx":491 +/* "dependency_injector/providers.pyx":499 * return represent_provider(provider=self, provides=self.__container) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -12212,7 +12424,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_6__repr__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "dependency_injector/providers.pyx":496 + /* "dependency_injector/providers.pyx":504 * :rtype: str * """ * return self.__str__() # <<<<<<<<<<<<<< @@ -12220,7 +12432,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_6__repr__(struc * def set_container(self, container): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 496, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -12234,14 +12446,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_6__repr__(struc } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 496, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":491 + /* "dependency_injector/providers.pyx":499 * return represent_provider(provider=self, provides=self.__container) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -12262,7 +12474,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_6__repr__(struc return __pyx_r; } -/* "dependency_injector/providers.pyx":498 +/* "dependency_injector/providers.pyx":506 * return self.__str__() * * def set_container(self, container): # <<<<<<<<<<<<<< @@ -12288,7 +12500,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_8set_container( __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_container", 0); - /* "dependency_injector/providers.pyx":499 + /* "dependency_injector/providers.pyx":507 * * def set_container(self, container): * self.__container = container # <<<<<<<<<<<<<< @@ -12301,7 +12513,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_8set_container( __Pyx_DECREF(__pyx_v_self->__pyx___container); __pyx_v_self->__pyx___container = __pyx_v_container; - /* "dependency_injector/providers.pyx":498 + /* "dependency_injector/providers.pyx":506 * return self.__str__() * * def set_container(self, container): # <<<<<<<<<<<<<< @@ -12316,7 +12528,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_8set_container( return __pyx_r; } -/* "dependency_injector/providers.pyx":501 +/* "dependency_injector/providers.pyx":509 * self.__container = container * * def set_alt_names(self, alt_names): # <<<<<<<<<<<<<< @@ -12347,16 +12559,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_10set_alt_names int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_alt_names", 0); - /* "dependency_injector/providers.pyx":502 + /* "dependency_injector/providers.pyx":510 * * def set_alt_names(self, alt_names): * self.__alt_names = tuple(set(alt_names)) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = PySet_New(__pyx_v_alt_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L1_error) + __pyx_t_1 = PySet_New(__pyx_v_alt_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 502, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -12365,7 +12577,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_10set_alt_names __pyx_v_self->__pyx___alt_names = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":501 + /* "dependency_injector/providers.pyx":509 * self.__container = container * * def set_alt_names(self, alt_names): # <<<<<<<<<<<<<< @@ -12387,7 +12599,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_10set_alt_names return __pyx_r; } -/* "dependency_injector/providers.pyx":505 +/* "dependency_injector/providers.pyx":513 * * @property * def alt_names(self): # <<<<<<<<<<<<<< @@ -12413,7 +12625,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_9alt_names___ge __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":506 + /* "dependency_injector/providers.pyx":514 * @property * def alt_names(self): * return self.__alt_names # <<<<<<<<<<<<<< @@ -12425,7 +12637,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_9alt_names___ge __pyx_r = __pyx_v_self->__pyx___alt_names; goto __pyx_L0; - /* "dependency_injector/providers.pyx":505 + /* "dependency_injector/providers.pyx":513 * * @property * def alt_names(self): # <<<<<<<<<<<<<< @@ -12440,7 +12652,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_9alt_names___ge return __pyx_r; } -/* "dependency_injector/providers.pyx":508 +/* "dependency_injector/providers.pyx":516 * return self.__alt_names * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -12471,7 +12683,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Self__provide(struct if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_4Self_13_provide)) { __Pyx_XDECREF(__pyx_r); @@ -12491,7 +12703,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Self__provide(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 508, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -12499,13 +12711,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Self__provide(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 508, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 508, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -12516,7 +12728,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Self__provide(struct __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 508, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -12539,7 +12751,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Self__provide(struct #endif } - /* "dependency_injector/providers.pyx":509 + /* "dependency_injector/providers.pyx":517 * * cpdef object _provide(self, tuple args, dict kwargs): * return self.__container # <<<<<<<<<<<<<< @@ -12551,7 +12763,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Self__provide(struct __pyx_r = __pyx_v_self->__pyx___container; goto __pyx_L0; - /* "dependency_injector/providers.pyx":508 + /* "dependency_injector/providers.pyx":516 * return self.__alt_names * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -12608,11 +12820,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_4Self_13_provide(PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 508, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 516, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 508, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 516, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -12625,14 +12837,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_4Self_13_provide(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 508, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 516, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Self._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 508, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 508, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 516, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 516, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_4Self_12_provide(((struct __pyx_obj_19dependency_injector_9providers_Self *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -12653,7 +12865,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_12_provide(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_4Self__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_4Self__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -13002,17 +13214,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Self_16__setstate_cy return __pyx_r; } -/* "dependency_injector/providers.pyx":522 +/* "dependency_injector/providers.pyx":530 * """ * * def __init__(self, provides=None): # <<<<<<<<<<<<<< - * """Initializer. - * + * """Initialize provider.""" + * self.__provides = None */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_8Delegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Delegate___init__[] = "Initializer.\n\n :param provides: Value that have to be provided.\n :type provides: :py:class:`Provider`\n "; +static char __pyx_doc_19dependency_injector_9providers_8Delegate___init__[] = "Initialize provider."; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Delegate___init__; #endif @@ -13046,7 +13258,7 @@ static int __pyx_pw_19dependency_injector_9providers_8Delegate_1__init__(PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 522, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 530, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -13060,7 +13272,7 @@ static int __pyx_pw_19dependency_injector_9providers_8Delegate_1__init__(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 522, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 530, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Delegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -13084,9 +13296,9 @@ static int __pyx_pf_19dependency_injector_9providers_8Delegate___init__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":528 - * :type provides: :py:class:`Provider` - * """ + /* "dependency_injector/providers.pyx":532 + * def __init__(self, provides=None): + * """Initialize provider.""" * self.__provides = None # <<<<<<<<<<<<<< * self.set_provides(provides) * super(Delegate, self).__init__() @@ -13097,14 +13309,14 @@ static int __pyx_pf_19dependency_injector_9providers_8Delegate___init__(struct _ __Pyx_DECREF(__pyx_v_self->__pyx___provides); __pyx_v_self->__pyx___provides = Py_None; - /* "dependency_injector/providers.pyx":529 - * """ + /* "dependency_injector/providers.pyx":533 + * """Initialize provider.""" * self.__provides = None * self.set_provides(provides) # <<<<<<<<<<<<<< * super(Delegate, self).__init__() * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -13118,19 +13330,19 @@ static int __pyx_pf_19dependency_injector_9providers_8Delegate___init__(struct _ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 529, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":530 + /* "dependency_injector/providers.pyx":534 * self.__provides = None * self.set_provides(provides) * super(Delegate, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 530, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate)); @@ -13138,10 +13350,10 @@ static int __pyx_pf_19dependency_injector_9providers_8Delegate___init__(struct _ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 530, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 530, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -13156,17 +13368,17 @@ static int __pyx_pf_19dependency_injector_9providers_8Delegate___init__(struct _ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 530, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":522 + /* "dependency_injector/providers.pyx":530 * """ * * def __init__(self, provides=None): # <<<<<<<<<<<<<< - * """Initializer. - * + * """Initialize provider.""" + * self.__provides = None */ /* function exit code */ @@ -13183,7 +13395,7 @@ static int __pyx_pf_19dependency_injector_9providers_8Delegate___init__(struct _ return __pyx_r; } -/* "dependency_injector/providers.pyx":532 +/* "dependency_injector/providers.pyx":536 * super(Delegate, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -13207,6 +13419,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_3__deepcopy static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, PyObject *__pyx_v_memo) { PyObject *__pyx_v_copied = NULL; + PyObject *__pyx_v_provides = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -13221,16 +13434,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_2__deepcopy int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":534 + /* "dependency_injector/providers.pyx":538 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 534, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 534, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -13245,13 +13458,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_2__deepcopy __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 534, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":535 + /* "dependency_injector/providers.pyx":539 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -13262,19 +13475,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_2__deepcopy __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":536 + /* "dependency_injector/providers.pyx":540 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * copied = self.__class__() + * provides = self.provides */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_copied); __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":535 + /* "dependency_injector/providers.pyx":539 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -13283,114 +13496,106 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_2__deepcopy */ } - /* "dependency_injector/providers.pyx":538 + /* "dependency_injector/providers.pyx":542 * return copied * - * copied = self.__class__() # <<<<<<<<<<<<<< - * memo[id(self)] = copied - * + * provides = self.provides # <<<<<<<<<<<<<< + * if provides: + * provides = deepcopy(self.provides, memo) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 538, __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_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 538, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_v_provides = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":539 + /* "dependency_injector/providers.pyx":543 * - * copied = self.__class__() - * memo[id(self)] = copied # <<<<<<<<<<<<<< + * provides = self.provides + * if provides: # <<<<<<<<<<<<<< + * provides = deepcopy(self.provides, memo) * - * if self.provides: */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 539, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_copied) < 0)) __PYX_ERR(1, 539, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":541 - * memo[id(self)] = copied - * - * if self.provides: # <<<<<<<<<<<<<< - * copied.set_provides(deepcopy(self.provides, memo)) - * self._copy_overridings(copied, memo) - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 541, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 541, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_provides); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 543, __pyx_L1_error) if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":542 - * - * if self.provides: - * copied.set_provides(deepcopy(self.provides, memo)) # <<<<<<<<<<<<<< - * self._copy_overridings(copied, memo) + /* "dependency_injector/providers.pyx":544 + * provides = self.provides + * if provides: + * provides = deepcopy(self.provides, memo) # <<<<<<<<<<<<<< * + * copied = _memorized_duplicate(self, memo) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 542, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 542, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 542, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 544, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 542, __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 && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_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(1, 542, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_provides, __pyx_t_2); + __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":541 - * memo[id(self)] = copied + /* "dependency_injector/providers.pyx":543 + * + * provides = self.provides + * if provides: # <<<<<<<<<<<<<< + * provides = deepcopy(self.provides, memo) * - * if self.provides: # <<<<<<<<<<<<<< - * copied.set_provides(deepcopy(self.provides, memo)) - * self._copy_overridings(copied, memo) */ } - /* "dependency_injector/providers.pyx":543 - * if self.provides: - * copied.set_provides(deepcopy(self.provides, memo)) + /* "dependency_injector/providers.pyx":546 + * provides = deepcopy(self.provides, memo) + * + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_provides(provides) + * + */ + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 546, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_2); + __pyx_t_2 = 0; + + /* "dependency_injector/providers.pyx":547 + * + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(provides) # <<<<<<<<<<<<<< + * + * self._copy_overridings(copied, memo) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 547, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __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); + } + } + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 547, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "dependency_injector/providers.pyx":549 + * copied.set_provides(provides) + * * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 543, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 543, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 549, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 549, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":545 + /* "dependency_injector/providers.pyx":551 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -13402,7 +13607,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_2__deepcopy __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":532 + /* "dependency_injector/providers.pyx":536 * super(Delegate, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -13420,12 +13625,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_2__deepcopy __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_copied); + __Pyx_XDECREF(__pyx_v_provides); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":547 +/* "dependency_injector/providers.pyx":553 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -13460,7 +13666,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_4__str__(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":552 + /* "dependency_injector/providers.pyx":558 * :rtype: str * """ * return represent_provider(provider=self, provides=self.__provides) # <<<<<<<<<<<<<< @@ -13470,14 +13676,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_4__str__(st __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 552, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":547 + /* "dependency_injector/providers.pyx":553 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -13497,7 +13703,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_4__str__(st return __pyx_r; } -/* "dependency_injector/providers.pyx":554 +/* "dependency_injector/providers.pyx":560 * return represent_provider(provider=self, provides=self.__provides) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -13533,7 +13739,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_6__repr__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "dependency_injector/providers.pyx":559 + /* "dependency_injector/providers.pyx":565 * :rtype: str * """ * return self.__str__() # <<<<<<<<<<<<<< @@ -13541,7 +13747,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_6__repr__(s * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 559, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -13555,14 +13761,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_6__repr__(s } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 559, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":554 + /* "dependency_injector/providers.pyx":560 * return represent_provider(provider=self, provides=self.__provides) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -13583,12 +13789,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_6__repr__(s return __pyx_r; } -/* "dependency_injector/providers.pyx":562 +/* "dependency_injector/providers.pyx":568 * * @property * def provides(self): # <<<<<<<<<<<<<< + * """Return provider's provides.""" * return self.__provides - * */ /* Python wrapper */ @@ -13609,9 +13815,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_8provides__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":563 - * @property + /* "dependency_injector/providers.pyx":570 * def provides(self): + * """Return provider's provides.""" * return self.__provides # <<<<<<<<<<<<<< * * def set_provides(self, provides): @@ -13621,12 +13827,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_8provides__ __pyx_r = __pyx_v_self->__pyx___provides; goto __pyx_L0; - /* "dependency_injector/providers.pyx":562 + /* "dependency_injector/providers.pyx":568 * * @property * def provides(self): # <<<<<<<<<<<<<< + * """Return provider's provides.""" * return self.__provides - * */ /* function exit code */ @@ -13636,16 +13842,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_8provides__ return __pyx_r; } -/* "dependency_injector/providers.pyx":565 +/* "dependency_injector/providers.pyx":572 * return self.__provides * * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" * if provides: - * provides = ensure_is_provider(provides) */ /* Python wrapper */ static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_9set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Delegate_8set_provides[] = "Set provider's provides."; static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_9set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -13668,43 +13875,43 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_8set_provid __Pyx_RefNannySetupContext("set_provides", 0); __Pyx_INCREF(__pyx_v_provides); - /* "dependency_injector/providers.pyx":566 - * + /* "dependency_injector/providers.pyx":574 * def set_provides(self, provides): + * """Set provider's provides.""" * if provides: # <<<<<<<<<<<<<< * provides = ensure_is_provider(provides) * self.__provides = provides */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_provides); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 566, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_provides); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 574, __pyx_L1_error) if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":567 - * def set_provides(self, provides): + /* "dependency_injector/providers.pyx":575 + * """Set provider's provides.""" * if provides: * provides = ensure_is_provider(provides) # <<<<<<<<<<<<<< * self.__provides = provides - * + * return self */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_ensure_is_provider(__pyx_v_provides, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 567, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_ensure_is_provider(__pyx_v_provides, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_provides, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":566 - * + /* "dependency_injector/providers.pyx":574 * def set_provides(self, provides): + * """Set provider's provides.""" * if provides: # <<<<<<<<<<<<<< * provides = ensure_is_provider(provides) * self.__provides = provides */ } - /* "dependency_injector/providers.pyx":568 + /* "dependency_injector/providers.pyx":576 * if provides: * provides = ensure_is_provider(provides) * self.__provides = provides # <<<<<<<<<<<<<< + * return self * - * @property */ __Pyx_INCREF(__pyx_v_provides); __Pyx_GIVEREF(__pyx_v_provides); @@ -13712,17 +13919,27 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_8set_provid __Pyx_DECREF(__pyx_v_self->__pyx___provides); __pyx_v_self->__pyx___provides = __pyx_v_provides; - /* "dependency_injector/providers.pyx":565 + /* "dependency_injector/providers.pyx":577 + * provides = ensure_is_provider(provides) + * self.__provides = provides + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":572 * return self.__provides * * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" * if provides: - * provides = ensure_is_provider(provides) */ /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("dependency_injector.providers.Delegate.set_provides", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -13735,7 +13952,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_8set_provid } static PyObject *__pyx_gb_19dependency_injector_9providers_8Delegate_7related_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":571 +/* "dependency_injector/providers.pyx":580 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -13768,7 +13985,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_7related___ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_2___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 571, __pyx_L1_error) + __PYX_ERR(1, 580, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -13776,7 +13993,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_7related___ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_8Delegate_7related_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Delegate___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 571, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_8Delegate_7related_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Delegate___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 580, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -13812,9 +14029,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Delegate_7related_2g return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 571, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 580, __pyx_L1_error) - /* "dependency_injector/providers.pyx":573 + /* "dependency_injector/providers.pyx":582 * def related(self): * """Return related providers generator.""" * yield self.__provides # <<<<<<<<<<<<<< @@ -13830,16 +14047,16 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Delegate_7related_2g __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 573, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 582, __pyx_L1_error) - /* "dependency_injector/providers.pyx":574 + /* "dependency_injector/providers.pyx":583 * """Return related providers generator.""" * yield self.__provides * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 574, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate)); @@ -13847,10 +14064,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Delegate_7related_2g __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 574, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 574, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -13864,17 +14081,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Delegate_7related_2g __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 574, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 583, __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(1, 574, __pyx_L1_error) + else __PYX_ERR(1, 583, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":571 + /* "dependency_injector/providers.pyx":580 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -13900,7 +14117,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Delegate_7related_2g return __pyx_r; } -/* "dependency_injector/providers.pyx":576 +/* "dependency_injector/providers.pyx":585 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -13931,7 +14148,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Delegate__provide(str if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 576, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Delegate_11_provide)) { __Pyx_XDECREF(__pyx_r); @@ -13951,7 +14168,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Delegate__provide(str #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 576, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 585, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -13959,13 +14176,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Delegate__provide(str #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 576, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 585, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 576, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -13976,7 +14193,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Delegate__provide(str __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 576, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -13999,7 +14216,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Delegate__provide(str #endif } - /* "dependency_injector/providers.pyx":587 + /* "dependency_injector/providers.pyx":596 * :rtype: object * """ * return self.__provides # <<<<<<<<<<<<<< @@ -14011,7 +14228,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Delegate__provide(str __pyx_r = __pyx_v_self->__pyx___provides; goto __pyx_L0; - /* "dependency_injector/providers.pyx":576 + /* "dependency_injector/providers.pyx":585 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -14069,11 +14286,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_11_provide( case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 576, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 585, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 576, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 585, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -14086,14 +14303,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_11_provide( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 576, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 585, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Delegate._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 576, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 576, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 585, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 585, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_8Delegate_10_provide(((struct __pyx_obj_19dependency_injector_9providers_Delegate *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -14114,7 +14331,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_10_provide( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Delegate__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 576, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Delegate__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -14453,17 +14670,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_14__setstat return __pyx_r; } -/* "dependency_injector/providers.pyx":613 +/* "dependency_injector/providers.pyx":622 * """ * - * def __init__(self, object instance_of=object, default=UNDEFINED): # <<<<<<<<<<<<<< - * """Initializer.""" - * if not isinstance(instance_of, CLASS_TYPES): + * def __init__(self, object instance_of=object, default=None): # <<<<<<<<<<<<<< + * """Initialize provider.""" + * self.__instance_of = None */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_10Dependency_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_10Dependency___init__[] = "Initializer."; +static char __pyx_doc_19dependency_injector_9providers_10Dependency___init__[] = "Initialize provider."; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_10Dependency___init__; #endif @@ -14480,7 +14697,7 @@ static int __pyx_pw_19dependency_injector_9providers_10Dependency_1__init__(PyOb static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_instance_of,&__pyx_n_s_default,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)__pyx_builtin_object); - values[1] = __pyx_k__4; + values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -14507,7 +14724,7 @@ static int __pyx_pw_19dependency_injector_9providers_10Dependency_1__init__(PyOb } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 613, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 622, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -14524,7 +14741,7 @@ static int __pyx_pw_19dependency_injector_9providers_10Dependency_1__init__(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 613, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 622, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Dependency.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -14541,191 +14758,93 @@ static int __pyx_pf_19dependency_injector_9providers_10Dependency___init__(struc int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_INCREF(__pyx_v_default); - - /* "dependency_injector/providers.pyx":615 - * def __init__(self, object instance_of=object, default=UNDEFINED): - * """Initializer.""" - * if not isinstance(instance_of, CLASS_TYPES): # <<<<<<<<<<<<<< - * raise TypeError( - * 'Argument \'instance_of\' has incorrect type (expected {0}, got {1}))'.format( - */ - __pyx_t_1 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_instance_of, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 615, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); - if (unlikely(__pyx_t_3)) { - - /* "dependency_injector/providers.pyx":617 - * if not isinstance(instance_of, CLASS_TYPES): - * raise TypeError( - * 'Argument \'instance_of\' has incorrect type (expected {0}, got {1}))'.format( # <<<<<<<<<<<<<< - * CLASS_TYPES, - * instance_of, - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Argument_instance_of_has_incorre, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 617, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - - /* "dependency_injector/providers.pyx":619 - * 'Argument \'instance_of\' has incorrect type (expected {0}, got {1}))'.format( - * CLASS_TYPES, - * instance_of, # <<<<<<<<<<<<<< - * ) - * ) - */ - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_6 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_19dependency_injector_9providers_CLASS_TYPES, __pyx_v_instance_of}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_19dependency_injector_9providers_CLASS_TYPES, __pyx_v_instance_of}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 617, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (__pyx_t_5) { - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; - } - __Pyx_INCREF(__pyx_v_19dependency_injector_9providers_CLASS_TYPES); - __Pyx_GIVEREF(__pyx_v_19dependency_injector_9providers_CLASS_TYPES); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_19dependency_injector_9providers_CLASS_TYPES); - __Pyx_INCREF(__pyx_v_instance_of); - __Pyx_GIVEREF(__pyx_v_instance_of); - PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_instance_of); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "dependency_injector/providers.pyx":616 - * """Initializer.""" - * if not isinstance(instance_of, CLASS_TYPES): - * raise TypeError( # <<<<<<<<<<<<<< - * 'Argument \'instance_of\' has incorrect type (expected {0}, got {1}))'.format( - * CLASS_TYPES, - */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 616, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(1, 616, __pyx_L1_error) - - /* "dependency_injector/providers.pyx":615 - * def __init__(self, object instance_of=object, default=UNDEFINED): - * """Initializer.""" - * if not isinstance(instance_of, CLASS_TYPES): # <<<<<<<<<<<<<< - * raise TypeError( - * 'Argument \'instance_of\' has incorrect type (expected {0}, got {1}))'.format( - */ - } - - /* "dependency_injector/providers.pyx":622 - * ) - * ) - * self.__instance_of = instance_of # <<<<<<<<<<<<<< - * - * if default is not UNDEFINED and not isinstance(default, Provider): - */ - __Pyx_INCREF(__pyx_v_instance_of); - __Pyx_GIVEREF(__pyx_v_instance_of); - __Pyx_GOTREF(__pyx_v_self->__pyx___instance_of); - __Pyx_DECREF(__pyx_v_self->__pyx___instance_of); - __pyx_v_self->__pyx___instance_of = __pyx_v_instance_of; /* "dependency_injector/providers.pyx":624 - * self.__instance_of = instance_of + * def __init__(self, object instance_of=object, default=None): + * """Initialize provider.""" + * self.__instance_of = None # <<<<<<<<<<<<<< + * self.set_instance_of(instance_of) * - * if default is not UNDEFINED and not isinstance(default, Provider): # <<<<<<<<<<<<<< - * default = Object(default) - * self.__default = default */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 624, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = (__pyx_v_default != __pyx_t_4); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = (__pyx_t_2 != 0); - if (__pyx_t_8) { - } else { - __pyx_t_3 = __pyx_t_8; - goto __pyx_L5_bool_binop_done; + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___instance_of); + __Pyx_DECREF(__pyx_v_self->__pyx___instance_of); + __pyx_v_self->__pyx___instance_of = Py_None; + + /* "dependency_injector/providers.pyx":625 + * """Initialize provider.""" + * self.__instance_of = None + * self.set_instance_of(instance_of) # <<<<<<<<<<<<<< + * + * self.__default = None + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_instance_of); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 625, __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_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } } - __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_default, __pyx_ptype_19dependency_injector_9providers_Provider); - __pyx_t_2 = ((!(__pyx_t_8 != 0)) != 0); - __pyx_t_3 = __pyx_t_2; - __pyx_L5_bool_binop_done:; - if (__pyx_t_3) { + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_instance_of) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_instance_of); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":625 + /* "dependency_injector/providers.pyx":627 + * self.set_instance_of(instance_of) * - * if default is not UNDEFINED and not isinstance(default, Provider): - * default = Object(default) # <<<<<<<<<<<<<< - * self.__default = default + * self.__default = None # <<<<<<<<<<<<<< + * self.set_default(default) * */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object), __pyx_v_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 625, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF_SET(__pyx_v_default, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___default); + __Pyx_DECREF(__pyx_v_self->__pyx___default); + __pyx_v_self->__pyx___default = Py_None; - /* "dependency_injector/providers.pyx":624 - * self.__instance_of = instance_of + /* "dependency_injector/providers.pyx":628 * - * if default is not UNDEFINED and not isinstance(default, Provider): # <<<<<<<<<<<<<< - * default = Object(default) - * self.__default = default - */ - } - - /* "dependency_injector/providers.pyx":626 - * if default is not UNDEFINED and not isinstance(default, Provider): - * default = Object(default) - * self.__default = default # <<<<<<<<<<<<<< + * self.__default = None + * self.set_default(default) # <<<<<<<<<<<<<< * * self.__parent = None */ - __Pyx_INCREF(__pyx_v_default); - __Pyx_GIVEREF(__pyx_v_default); - __Pyx_GOTREF(__pyx_v_self->__pyx___default); - __Pyx_DECREF(__pyx_v_self->__pyx___default); - __pyx_v_self->__pyx___default = __pyx_v_default; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 628, __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_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_v_default) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_default); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":628 - * self.__default = default + /* "dependency_injector/providers.pyx":630 + * self.set_default(default) * * self.__parent = None # <<<<<<<<<<<<<< * @@ -14737,50 +14856,50 @@ static int __pyx_pf_19dependency_injector_9providers_10Dependency___init__(struc __Pyx_DECREF(__pyx_v_self->__pyx___parent); __pyx_v_self->__pyx___parent = Py_None; - /* "dependency_injector/providers.pyx":630 + /* "dependency_injector/providers.pyx":632 * self.__parent = None * * super(Dependency, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); + __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 632, __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; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":613 + /* "dependency_injector/providers.pyx":622 * """ * - * def __init__(self, object instance_of=object, default=UNDEFINED): # <<<<<<<<<<<<<< - * """Initializer.""" - * if not isinstance(instance_of, CLASS_TYPES): + * def __init__(self, object instance_of=object, default=None): # <<<<<<<<<<<<<< + * """Initialize provider.""" + * self.__instance_of = None */ /* function exit code */ @@ -14788,18 +14907,16 @@ static int __pyx_pf_19dependency_injector_9providers_10Dependency___init__(struc goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("dependency_injector.providers.Dependency.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_default); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":632 +/* "dependency_injector/providers.pyx":634 * super(Dependency, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -14823,7 +14940,6 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_3__deepc static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_memo) { PyObject *__pyx_v_copied = NULL; - PyObject *__pyx_v_copied_default = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -14839,16 +14955,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_2__deepc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":634 + /* "dependency_injector/providers.pyx":636 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 634, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 634, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -14863,13 +14979,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_2__deepc __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 634, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":635 + /* "dependency_injector/providers.pyx":637 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -14880,19 +14996,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_2__deepc __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":636 + /* "dependency_injector/providers.pyx":638 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * copied_default = ( + * copied = _memorized_duplicate(self, memo) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_copied); __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":635 + /* "dependency_injector/providers.pyx":637 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -14902,189 +15018,150 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_2__deepc } /* "dependency_injector/providers.pyx":640 - * copied_default = ( - * deepcopy(self.__default, memo) - * if self.__default is not UNDEFINED # <<<<<<<<<<<<<< - * else UNDEFINED - * ) - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 640, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = (__pyx_v_self->__pyx___default != __pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if ((__pyx_t_6 != 0)) { - - /* "dependency_injector/providers.pyx":639 + * return copied * - * copied_default = ( - * deepcopy(self.__default, memo) # <<<<<<<<<<<<<< - * if self.__default is not UNDEFINED - * else UNDEFINED + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_instance_of(self.instance_of) + * copied.set_default(deepcopy(self.default, memo)) */ - __pyx_t_2 = __pyx_v_self->__pyx___default; - __Pyx_INCREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 639, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 639, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __pyx_t_3; - __pyx_t_3 = 0; - } else { - - /* "dependency_injector/providers.pyx":641 - * deepcopy(self.__default, memo) - * if self.__default is not UNDEFINED - * else UNDEFINED # <<<<<<<<<<<<<< - * ) - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 641, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __pyx_t_3; - __pyx_t_3 = 0; - } - __pyx_v_copied_default = __pyx_t_1; - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":644 - * ) - * - * copied = self.__class__(self.__instance_of, copied_default) # <<<<<<<<<<<<<< - * memo[id(self)] = copied - * - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 644, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = NULL; - __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_8 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self->__pyx___instance_of, __pyx_v_copied_default}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 644, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self->__pyx___instance_of, __pyx_v_copied_default}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 644, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 644, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_2) { - __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; - } - __Pyx_INCREF(__pyx_v_self->__pyx___instance_of); - __Pyx_GIVEREF(__pyx_v_self->__pyx___instance_of); - PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_v_self->__pyx___instance_of); - __Pyx_INCREF(__pyx_v_copied_default); - __Pyx_GIVEREF(__pyx_v_copied_default); - PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_v_copied_default); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 644, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 640, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":645 + /* "dependency_injector/providers.pyx":641 * - * copied = self.__class__(self.__instance_of, copied_default) - * memo[id(self)] = copied # <<<<<<<<<<<<<< + * copied = _memorized_duplicate(self, memo) + * copied.set_instance_of(self.instance_of) # <<<<<<<<<<<<<< + * copied.set_default(deepcopy(self.default, memo)) + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_instance_of); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_instance_of); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":642 + * copied = _memorized_duplicate(self, memo) + * copied.set_instance_of(self.instance_of) + * copied.set_default(deepcopy(self.default, memo)) # <<<<<<<<<<<<<< * * self._copy_parent(copied, memo) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 645, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 642, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 642, __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 && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_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(1, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_copied) < 0)) __PYX_ERR(1, 645, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":647 - * memo[id(self)] = copied + /* "dependency_injector/providers.pyx":644 + * copied.set_default(deepcopy(self.default, memo)) * * self._copy_parent(copied, memo) # <<<<<<<<<<<<<< * self._copy_overridings(copied, memo) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 647, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { + if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_copied, __pyx_v_memo}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 647, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 644, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_copied, __pyx_v_memo}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 647, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 644, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 647, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_copied); __Pyx_GIVEREF(__pyx_v_copied); - PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_8, __pyx_v_copied); + PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_v_copied); __Pyx_INCREF(__pyx_v_memo); __Pyx_GIVEREF(__pyx_v_memo); - PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_8, __pyx_v_memo); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 647, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_v_memo); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":648 + /* "dependency_injector/providers.pyx":645 * * self._copy_parent(copied, memo) * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 648, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 648, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 645, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 645, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":650 + /* "dependency_injector/providers.pyx":647 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -15096,7 +15173,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_2__deepc __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":632 + /* "dependency_injector/providers.pyx":634 * super(Dependency, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -15114,13 +15191,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_2__deepc __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_copied); - __Pyx_XDECREF(__pyx_v_copied_default); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":652 +/* "dependency_injector/providers.pyx":649 * return copied * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -15165,98 +15241,83 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - int __pyx_t_4; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; + int __pyx_t_8; PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; - PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "dependency_injector/providers.pyx":659 + /* "dependency_injector/providers.pyx":656 * :rtype: object * """ * if self.__last_overriding: # <<<<<<<<<<<<<< * result = self.__last_overriding(*args, **kwargs) - * elif not self.__last_overriding and self.__default is not UNDEFINED: + * elif self.__default: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 659, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 656, __pyx_L1_error) if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":660 + /* "dependency_injector/providers.pyx":657 * """ * if self.__last_overriding: * result = self.__last_overriding(*args, **kwargs) # <<<<<<<<<<<<<< - * elif not self.__last_overriding and self.__default is not UNDEFINED: + * elif self.__default: * result = self.__default(*args, **kwargs) */ - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 660, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":659 + /* "dependency_injector/providers.pyx":656 * :rtype: object * """ * if self.__last_overriding: # <<<<<<<<<<<<<< * result = self.__last_overriding(*args, **kwargs) - * elif not self.__last_overriding and self.__default is not UNDEFINED: + * elif self.__default: + */ + goto __pyx_L3; + } + + /* "dependency_injector/providers.pyx":658 + * if self.__last_overriding: + * result = self.__last_overriding(*args, **kwargs) + * elif self.__default: # <<<<<<<<<<<<<< + * result = self.__default(*args, **kwargs) + * else: + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___default); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 658, __pyx_L1_error) + if (__pyx_t_1) { + + /* "dependency_injector/providers.pyx":659 + * result = self.__last_overriding(*args, **kwargs) + * elif self.__default: + * result = self.__default(*args, **kwargs) # <<<<<<<<<<<<<< + * else: + * self._raise_undefined_error() + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___default, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_result = __pyx_t_2; + __pyx_t_2 = 0; + + /* "dependency_injector/providers.pyx":658 + * if self.__last_overriding: + * result = self.__last_overriding(*args, **kwargs) + * elif self.__default: # <<<<<<<<<<<<<< + * result = self.__default(*args, **kwargs) + * else: */ goto __pyx_L3; } /* "dependency_injector/providers.pyx":661 - * if self.__last_overriding: - * result = self.__last_overriding(*args, **kwargs) - * elif not self.__last_overriding and self.__default is not UNDEFINED: # <<<<<<<<<<<<<< - * result = self.__default(*args, **kwargs) - * else: - */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 661, __pyx_L1_error) - __pyx_t_4 = ((!__pyx_t_3) != 0); - if (__pyx_t_4) { - } else { - __pyx_t_1 = __pyx_t_4; - goto __pyx_L4_bool_binop_done; - } - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 661, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = (__pyx_v_self->__pyx___default != __pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = (__pyx_t_4 != 0); - __pyx_t_1 = __pyx_t_3; - __pyx_L4_bool_binop_done:; - if (__pyx_t_1) { - - /* "dependency_injector/providers.pyx":662 - * result = self.__last_overriding(*args, **kwargs) - * elif not self.__last_overriding and self.__default is not UNDEFINED: - * result = self.__default(*args, **kwargs) # <<<<<<<<<<<<<< - * else: - * self._raise_undefined_error() - */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___default, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 662, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_result = __pyx_t_2; - __pyx_t_2 = 0; - - /* "dependency_injector/providers.pyx":661 - * if self.__last_overriding: - * result = self.__last_overriding(*args, **kwargs) - * elif not self.__last_overriding and self.__default is not UNDEFINED: # <<<<<<<<<<<<<< - * result = self.__default(*args, **kwargs) - * else: - */ - goto __pyx_L3; - } - - /* "dependency_injector/providers.pyx":664 * result = self.__default(*args, **kwargs) * else: * self._raise_undefined_error() # <<<<<<<<<<<<<< @@ -15264,83 +15325,83 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ * if self.is_async_mode_disabled(): */ /*else*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raise_undefined_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 664, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raise_undefined_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 664, __pyx_L1_error) + __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, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; - /* "dependency_injector/providers.pyx":666 + /* "dependency_injector/providers.pyx":663 * self._raise_undefined_error() * * if self.is_async_mode_disabled(): # <<<<<<<<<<<<<< * self._check_instance_type(result) * return result */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_disabled); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 666, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_disabled); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 666, __pyx_L1_error) + __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, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 666, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":667 + /* "dependency_injector/providers.pyx":664 * * if self.is_async_mode_disabled(): * self._check_instance_type(result) # <<<<<<<<<<<<<< * return result * elif self.is_async_mode_enabled(): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_instance_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 667, __pyx_L1_error) } - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_instance_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 664, __pyx_L1_error) } + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 667, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":668 + /* "dependency_injector/providers.pyx":665 * if self.is_async_mode_disabled(): * self._check_instance_type(result) * return result # <<<<<<<<<<<<<< @@ -15348,12 +15409,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ * if __is_future_or_coroutine(result): */ __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 668, __pyx_L1_error) } + if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 665, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "dependency_injector/providers.pyx":666 + /* "dependency_injector/providers.pyx":663 * self._raise_undefined_error() * * if self.is_async_mode_disabled(): # <<<<<<<<<<<<<< @@ -15362,188 +15423,188 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ */ } - /* "dependency_injector/providers.pyx":669 + /* "dependency_injector/providers.pyx":666 * self._check_instance_type(result) * return result * elif self.is_async_mode_enabled(): # <<<<<<<<<<<<<< * if __is_future_or_coroutine(result): * future_result = asyncio.Future() */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_enabled); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 669, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_enabled); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 669, __pyx_L1_error) + __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, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 669, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 666, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":670 + /* "dependency_injector/providers.pyx":667 * return result * elif self.is_async_mode_enabled(): * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< * future_result = asyncio.Future() * result = asyncio.ensure_future(result) */ - if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 670, __pyx_L1_error) } + if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 667, __pyx_L1_error) } __pyx_t_1 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_result) != 0); if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":671 + /* "dependency_injector/providers.pyx":668 * elif self.is_async_mode_enabled(): * if __is_future_or_coroutine(result): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(self._async_provide, future_result)) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 671, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Future); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 671, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 668, __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_6, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 671, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_future_result = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":672 + /* "dependency_injector/providers.pyx":669 * if __is_future_or_coroutine(result): * future_result = asyncio.Future() * result = asyncio.ensure_future(result) # <<<<<<<<<<<<<< * result.add_done_callback(functools.partial(self._async_provide, future_result)) * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 672, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 672, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 672, __pyx_L1_error) } - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 669, __pyx_L1_error) } + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 672, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":673 + /* "dependency_injector/providers.pyx":670 * future_result = asyncio.Future() * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(self._async_provide, future_result)) # <<<<<<<<<<<<<< * return future_result * else: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 673, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_functools); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_functools); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_partial); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_provide); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = NULL; - __pyx_t_10 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_9)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_9); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_partial); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_provide); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); - __pyx_t_10 = 1; + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_v_future_result}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 673, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_v_future_result}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 670, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_v_future_result}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 673, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_v_future_result}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 670, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - if (__pyx_t_9) { - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_v_future_result); __Pyx_GIVEREF(__pyx_v_future_result); - PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_future_result); - __pyx_t_7 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_future_result); + __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 673, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":674 + /* "dependency_injector/providers.pyx":671 * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(self._async_provide, future_result)) * return future_result # <<<<<<<<<<<<<< @@ -15555,7 +15616,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "dependency_injector/providers.pyx":670 + /* "dependency_injector/providers.pyx":667 * return result * elif self.is_async_mode_enabled(): * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< @@ -15564,7 +15625,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ */ } - /* "dependency_injector/providers.pyx":676 + /* "dependency_injector/providers.pyx":673 * return future_result * else: * self._check_instance_type(result) # <<<<<<<<<<<<<< @@ -15572,27 +15633,27 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ * elif self.is_async_mode_undefined(): */ /*else*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_instance_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 676, __pyx_L1_error) } - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_instance_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 673, __pyx_L1_error) } + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 676, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":677 + /* "dependency_injector/providers.pyx":674 * else: * self._check_instance_type(result) * return __future_result(result) # <<<<<<<<<<<<<< @@ -15600,15 +15661,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ * if __is_future_or_coroutine(result): */ __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 677, __pyx_L1_error) } - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 677, __pyx_L1_error) + if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 674, __pyx_L1_error) } + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "dependency_injector/providers.pyx":669 + /* "dependency_injector/providers.pyx":666 * self._check_instance_type(result) * return result * elif self.is_async_mode_enabled(): # <<<<<<<<<<<<<< @@ -15617,214 +15678,214 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ */ } - /* "dependency_injector/providers.pyx":678 + /* "dependency_injector/providers.pyx":675 * self._check_instance_type(result) * return __future_result(result) * elif self.is_async_mode_undefined(): # <<<<<<<<<<<<<< * if __is_future_or_coroutine(result): * self.enable_async_mode() */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_undefined); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 678, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 678, __pyx_L1_error) + __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, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 678, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 675, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":679 + /* "dependency_injector/providers.pyx":676 * return __future_result(result) * elif self.is_async_mode_undefined(): * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< * self.enable_async_mode() * */ - if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 679, __pyx_L1_error) } + if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 676, __pyx_L1_error) } __pyx_t_1 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_result) != 0); if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":680 + /* "dependency_injector/providers.pyx":677 * elif self.is_async_mode_undefined(): * if __is_future_or_coroutine(result): * self.enable_async_mode() # <<<<<<<<<<<<<< * * future_result = asyncio.Future() */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enable_async_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 680, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enable_async_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 680, __pyx_L1_error) + __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, 677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":682 + /* "dependency_injector/providers.pyx":679 * self.enable_async_mode() * * future_result = asyncio.Future() # <<<<<<<<<<<<<< * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(self._async_provide, future_result)) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 682, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Future); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 682, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 679, __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_6, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 682, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_future_result = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":683 + /* "dependency_injector/providers.pyx":680 * * future_result = asyncio.Future() * result = asyncio.ensure_future(result) # <<<<<<<<<<<<<< * result.add_done_callback(functools.partial(self._async_provide, future_result)) * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 683, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 683, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 683, __pyx_L1_error) } - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 680, __pyx_L1_error) } + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 683, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":684 + /* "dependency_injector/providers.pyx":681 * future_result = asyncio.Future() * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(self._async_provide, future_result)) # <<<<<<<<<<<<<< * return future_result * else: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_functools); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_partial); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_provide); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = NULL; - __pyx_t_10 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_11); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); - __Pyx_INCREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_provide); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_11, function); - __pyx_t_10 = 1; + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_11)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_v_future_result}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 684, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_future_result}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_v_future_result}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 684, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_future_result}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - if (__pyx_t_7) { - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_v_future_result); __Pyx_GIVEREF(__pyx_v_future_result); - PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_v_future_result); - __pyx_t_8 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_future_result); + __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_11)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_11, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 684, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":685 + /* "dependency_injector/providers.pyx":682 * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(self._async_provide, future_result)) * return future_result # <<<<<<<<<<<<<< @@ -15836,7 +15897,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "dependency_injector/providers.pyx":679 + /* "dependency_injector/providers.pyx":676 * return __future_result(result) * elif self.is_async_mode_undefined(): * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< @@ -15845,7 +15906,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ */ } - /* "dependency_injector/providers.pyx":687 + /* "dependency_injector/providers.pyx":684 * return future_result * else: * self.disable_async_mode() # <<<<<<<<<<<<<< @@ -15853,53 +15914,53 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ * return result */ /*else*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_disable_async_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 687, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_disable_async_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 687, __pyx_L1_error) + __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, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":688 + /* "dependency_injector/providers.pyx":685 * else: * self.disable_async_mode() * self._check_instance_type(result) # <<<<<<<<<<<<<< * return result * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_instance_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 688, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 688, __pyx_L1_error) } - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_instance_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 685, __pyx_L1_error) } + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__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_2)) __PYX_ERR(1, 688, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":689 + /* "dependency_injector/providers.pyx":686 * self.disable_async_mode() * self._check_instance_type(result) * return result # <<<<<<<<<<<<<< @@ -15907,13 +15968,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ * def __getattr__(self, name): */ __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 689, __pyx_L1_error) } + if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(1, 686, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; } - /* "dependency_injector/providers.pyx":678 + /* "dependency_injector/providers.pyx":675 * self._check_instance_type(result) * return __future_result(result) * elif self.is_async_mode_undefined(): # <<<<<<<<<<<<<< @@ -15922,7 +15983,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ */ } - /* "dependency_injector/providers.pyx":652 + /* "dependency_injector/providers.pyx":649 * return copied * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -15935,12 +15996,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("dependency_injector.providers.Dependency.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -15951,7 +16012,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call_ return __pyx_r; } -/* "dependency_injector/providers.pyx":691 +/* "dependency_injector/providers.pyx":688 * return result * * def __getattr__(self, name): # <<<<<<<<<<<<<< @@ -15978,68 +16039,63 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6__getat int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - Py_ssize_t __pyx_t_5; - Py_UCS4 __pyx_t_6; - PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_4; + Py_UCS4 __pyx_t_5; + PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":692 + /* "dependency_injector/providers.pyx":689 * * def __getattr__(self, name): * if self.__last_overriding: # <<<<<<<<<<<<<< * return getattr(self.__last_overriding, name) - * elif self.__default is not UNDEFINED: + * elif self.__default: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 692, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 689, __pyx_L1_error) if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":693 + /* "dependency_injector/providers.pyx":690 * def __getattr__(self, name): * if self.__last_overriding: * return getattr(self.__last_overriding, name) # <<<<<<<<<<<<<< - * elif self.__default is not UNDEFINED: + * elif self.__default: * return getattr(self.__default, name) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding); __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":692 + /* "dependency_injector/providers.pyx":689 * * def __getattr__(self, name): * if self.__last_overriding: # <<<<<<<<<<<<<< * return getattr(self.__last_overriding, name) - * elif self.__default is not UNDEFINED: + * elif self.__default: */ } - /* "dependency_injector/providers.pyx":694 + /* "dependency_injector/providers.pyx":691 * if self.__last_overriding: * return getattr(self.__last_overriding, name) - * elif self.__default is not UNDEFINED: # <<<<<<<<<<<<<< + * elif self.__default: # <<<<<<<<<<<<<< * return getattr(self.__default, name) * raise AttributeError(f'Provider "{self.__class__.__name__}" has no attribute "{name}"') */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 694, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = (__pyx_v_self->__pyx___default != __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = (__pyx_t_1 != 0); - if (__pyx_t_4) { + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___default); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 691, __pyx_L1_error) + if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":695 + /* "dependency_injector/providers.pyx":692 * return getattr(self.__last_overriding, name) - * elif self.__default is not UNDEFINED: + * elif self.__default: * return getattr(self.__default, name) # <<<<<<<<<<<<<< * raise AttributeError(f'Provider "{self.__class__.__name__}" has no attribute "{name}"') * @@ -16047,76 +16103,76 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6__getat __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_v_self->__pyx___default; __Pyx_INCREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 695, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":694 + /* "dependency_injector/providers.pyx":691 * if self.__last_overriding: * return getattr(self.__last_overriding, name) - * elif self.__default is not UNDEFINED: # <<<<<<<<<<<<<< + * elif self.__default: # <<<<<<<<<<<<<< * return getattr(self.__default, name) * raise AttributeError(f'Provider "{self.__class__.__name__}" has no attribute "{name}"') */ } - /* "dependency_injector/providers.pyx":696 - * elif self.__default is not UNDEFINED: + /* "dependency_injector/providers.pyx":693 + * elif self.__default: * return getattr(self.__default, name) * raise AttributeError(f'Provider "{self.__class__.__name__}" has no attribute "{name}"') # <<<<<<<<<<<<<< * * def __str__(self): */ - __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 696, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = 0; - __pyx_t_6 = 127; + __pyx_t_4 = 0; + __pyx_t_5 = 127; __Pyx_INCREF(__pyx_kp_u_Provider); - __pyx_t_5 += 10; + __pyx_t_4 += 10; __Pyx_GIVEREF(__pyx_kp_u_Provider); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Provider); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 696, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_6; - __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_5; + __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_kp_u_has_no_attribute); - __pyx_t_5 += 20; + __pyx_t_4 += 20; __Pyx_GIVEREF(__pyx_kp_u_has_no_attribute); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_has_no_attribute); - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_6; - __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); + __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_5; + __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3); __pyx_t_3 = 0; - __Pyx_INCREF(__pyx_kp_u__5); - __pyx_t_5 += 1; - __Pyx_GIVEREF(__pyx_kp_u__5); - PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__5); - __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __pyx_L1_error) + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_4 += 1; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__4); + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 696, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(1, 696, __pyx_L1_error) + __PYX_ERR(1, 693, __pyx_L1_error) - /* "dependency_injector/providers.pyx":691 + /* "dependency_injector/providers.pyx":688 * return result * * def __getattr__(self, name): # <<<<<<<<<<<<<< @@ -16128,7 +16184,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6__getat __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("dependency_injector.providers.Dependency.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -16137,7 +16193,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6__getat return __pyx_r; } -/* "dependency_injector/providers.pyx":698 +/* "dependency_injector/providers.pyx":695 * raise AttributeError(f'Provider "{self.__class__.__name__}" has no attribute "{name}"') * * def __str__(self): # <<<<<<<<<<<<<< @@ -16177,27 +16233,27 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":703 + /* "dependency_injector/providers.pyx":700 * :rtype: str * """ * name = f'<{self.__class__.__module__}.{self.__class__.__name__}' # <<<<<<<<<<<<<< * name += f'({repr(self.__instance_of)}) at {hex(id(self))}' * if self.parent_name: */ - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 703, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; - __Pyx_INCREF(__pyx_kp_u__6); + __Pyx_INCREF(__pyx_kp_u__5); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 703, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_module); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 703, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_module); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 703, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -16205,16 +16261,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__7); + __Pyx_INCREF(__pyx_kp_u__6); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__7); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__7); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 703, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__6); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 703, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 703, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -16222,33 +16278,33 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 703, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_name = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":704 + /* "dependency_injector/providers.pyx":701 * """ * name = f'<{self.__class__.__module__}.{self.__class__.__name__}' * name += f'({repr(self.__instance_of)}) at {hex(id(self))}' # <<<<<<<<<<<<<< * if self.parent_name: * name += f', container name: "{self.parent_name}"' */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 704, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 127; - __Pyx_INCREF(__pyx_kp_u__8); + __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__8); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__8); + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__7); __pyx_t_1 = __pyx_v_self->__pyx___instance_of; __Pyx_INCREF(__pyx_t_1); - __pyx_t_5 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 704, __pyx_L1_error) + __pyx_t_5 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 704, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_3; @@ -16260,12 +16316,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__ __pyx_t_2 += 5; __Pyx_GIVEREF(__pyx_kp_u_at); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_at); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 704, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 704, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 704, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_3; @@ -16273,36 +16329,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 704, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_v_name, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 704, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_v_name, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":705 + /* "dependency_injector/providers.pyx":702 * name = f'<{self.__class__.__module__}.{self.__class__.__name__}' * name += f'({repr(self.__instance_of)}) at {hex(id(self))}' * if self.parent_name: # <<<<<<<<<<<<<< * name += f', container name: "{self.parent_name}"' * name += f'>' */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 705, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 705, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 702, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":706 + /* "dependency_injector/providers.pyx":703 * name += f'({repr(self.__instance_of)}) at {hex(id(self))}' * if self.parent_name: * name += f', container name: "{self.parent_name}"' # <<<<<<<<<<<<<< * name += f'>' * return name */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 706, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -16310,9 +16366,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__ __pyx_t_2 += 19; __Pyx_GIVEREF(__pyx_kp_u_container_name); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_container_name); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 706, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 706, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -16320,20 +16376,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u__5); + __Pyx_INCREF(__pyx_kp_u__4); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__5); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__5); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 706, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__4); + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_v_name, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 706, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_v_name, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":705 + /* "dependency_injector/providers.pyx":702 * name = f'<{self.__class__.__module__}.{self.__class__.__name__}' * name += f'({repr(self.__instance_of)}) at {hex(id(self))}' * if self.parent_name: # <<<<<<<<<<<<<< @@ -16342,19 +16398,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__ */ } - /* "dependency_injector/providers.pyx":707 + /* "dependency_injector/providers.pyx":704 * if self.parent_name: * name += f', container name: "{self.parent_name}"' * name += f'>' # <<<<<<<<<<<<<< * return name * */ - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_v_name, __pyx_kp_u__9); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 707, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_v_name, __pyx_kp_u__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":708 + /* "dependency_injector/providers.pyx":705 * name += f', container name: "{self.parent_name}"' * name += f'>' * return name # <<<<<<<<<<<<<< @@ -16366,7 +16422,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__ __pyx_r = __pyx_v_name; goto __pyx_L0; - /* "dependency_injector/providers.pyx":698 + /* "dependency_injector/providers.pyx":695 * raise AttributeError(f'Provider "{self.__class__.__name__}" has no attribute "{name}"') * * def __str__(self): # <<<<<<<<<<<<<< @@ -16388,7 +16444,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__str__ return __pyx_r; } -/* "dependency_injector/providers.pyx":710 +/* "dependency_injector/providers.pyx":707 * return name * * def __repr__(self): # <<<<<<<<<<<<<< @@ -16424,7 +16480,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10__repr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "dependency_injector/providers.pyx":715 + /* "dependency_injector/providers.pyx":712 * :rtype: str * """ * return self.__str__() # <<<<<<<<<<<<<< @@ -16432,7 +16488,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10__repr * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 715, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16446,14 +16502,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10__repr } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 715, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":710 + /* "dependency_injector/providers.pyx":707 * return name * * def __repr__(self): # <<<<<<<<<<<<<< @@ -16474,11 +16530,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10__repr return __pyx_r; } -/* "dependency_injector/providers.pyx":718 +/* "dependency_injector/providers.pyx":715 * * @property * def instance_of(self): # <<<<<<<<<<<<<< - * """Return class of required dependency.""" + * """Return type.""" * return self.__instance_of */ @@ -16500,23 +16556,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11instan __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":720 + /* "dependency_injector/providers.pyx":717 * def instance_of(self): - * """Return class of required dependency.""" + * """Return type.""" * return self.__instance_of # <<<<<<<<<<<<<< * - * @property + * def set_instance_of(self, instance_of): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->__pyx___instance_of); __pyx_r = __pyx_v_self->__pyx___instance_of; goto __pyx_L0; - /* "dependency_injector/providers.pyx":718 + /* "dependency_injector/providers.pyx":715 * * @property * def instance_of(self): # <<<<<<<<<<<<<< - * """Return class of required dependency.""" + * """Return type.""" * return self.__instance_of */ @@ -16527,7 +16583,191 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11instan return __pyx_r; } -/* "dependency_injector/providers.pyx":723 +/* "dependency_injector/providers.pyx":719 + * return self.__instance_of + * + * def set_instance_of(self, instance_of): # <<<<<<<<<<<<<< + * """Set type.""" + * if not isinstance(instance_of, CLASS_TYPES): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_13set_instance_of(PyObject *__pyx_v_self, PyObject *__pyx_v_instance_of); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_10Dependency_12set_instance_of[] = "Set type."; +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_13set_instance_of(PyObject *__pyx_v_self, PyObject *__pyx_v_instance_of) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_instance_of (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_12set_instance_of(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v_instance_of)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_12set_instance_of(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_instance_of) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_instance_of", 0); + + /* "dependency_injector/providers.pyx":721 + * def set_instance_of(self, instance_of): + * """Set type.""" + * if not isinstance(instance_of, CLASS_TYPES): # <<<<<<<<<<<<<< + * raise TypeError( + * '"instance_of" has incorrect type (expected {0}, got {1}))'.format( + */ + __pyx_t_1 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_instance_of, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 721, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); + if (unlikely(__pyx_t_3)) { + + /* "dependency_injector/providers.pyx":723 + * if not isinstance(instance_of, CLASS_TYPES): + * raise TypeError( + * '"instance_of" has incorrect type (expected {0}, got {1}))'.format( # <<<<<<<<<<<<<< + * CLASS_TYPES, + * instance_of, + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_instance_of_has_incorrect_type, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "dependency_injector/providers.pyx":725 + * '"instance_of" has incorrect type (expected {0}, got {1}))'.format( + * CLASS_TYPES, + * instance_of, # <<<<<<<<<<<<<< + * ), + * ) + */ + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_19dependency_injector_9providers_CLASS_TYPES, __pyx_v_instance_of}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 723, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_19dependency_injector_9providers_CLASS_TYPES, __pyx_v_instance_of}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 723, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_19dependency_injector_9providers_CLASS_TYPES); + __Pyx_GIVEREF(__pyx_v_19dependency_injector_9providers_CLASS_TYPES); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_19dependency_injector_9providers_CLASS_TYPES); + __Pyx_INCREF(__pyx_v_instance_of); + __Pyx_GIVEREF(__pyx_v_instance_of); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_instance_of); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "dependency_injector/providers.pyx":722 + * """Set type.""" + * if not isinstance(instance_of, CLASS_TYPES): + * raise TypeError( # <<<<<<<<<<<<<< + * '"instance_of" has incorrect type (expected {0}, got {1}))'.format( + * CLASS_TYPES, + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 722, __pyx_L1_error) + + /* "dependency_injector/providers.pyx":721 + * def set_instance_of(self, instance_of): + * """Set type.""" + * if not isinstance(instance_of, CLASS_TYPES): # <<<<<<<<<<<<<< + * raise TypeError( + * '"instance_of" has incorrect type (expected {0}, got {1}))'.format( + */ + } + + /* "dependency_injector/providers.pyx":728 + * ), + * ) + * self.__instance_of = instance_of # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_instance_of); + __Pyx_GIVEREF(__pyx_v_instance_of); + __Pyx_GOTREF(__pyx_v_self->__pyx___instance_of); + __Pyx_DECREF(__pyx_v_self->__pyx___instance_of); + __pyx_v_self->__pyx___instance_of = __pyx_v_instance_of; + + /* "dependency_injector/providers.pyx":729 + * ) + * self.__instance_of = instance_of + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":719 + * return self.__instance_of + * + * def set_instance_of(self, instance_of): # <<<<<<<<<<<<<< + * """Set type.""" + * if not isinstance(instance_of, CLASS_TYPES): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("dependency_injector.providers.Dependency.set_instance_of", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":732 * * @property * def default(self): # <<<<<<<<<<<<<< @@ -16553,19 +16793,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_7default __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":725 + /* "dependency_injector/providers.pyx":734 * def default(self): * """Return default provider.""" * return self.__default # <<<<<<<<<<<<<< * - * @property + * def set_default(self, default): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->__pyx___default); __pyx_r = __pyx_v_self->__pyx___default; goto __pyx_L0; - /* "dependency_injector/providers.pyx":723 + /* "dependency_injector/providers.pyx":732 * * @property * def default(self): # <<<<<<<<<<<<<< @@ -16580,12 +16820,132 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_7default return __pyx_r; } -/* "dependency_injector/providers.pyx":728 +/* "dependency_injector/providers.pyx":736 + * return self.__default + * + * def set_default(self, default): # <<<<<<<<<<<<<< + * """Set type.""" + * if default and not isinstance(default, Provider): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_15set_default(PyObject *__pyx_v_self, PyObject *__pyx_v_default); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_10Dependency_14set_default[] = "Set type."; +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_15set_default(PyObject *__pyx_v_self, PyObject *__pyx_v_default) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_default (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_14set_default(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v_default)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_14set_default(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_default) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_default", 0); + __Pyx_INCREF(__pyx_v_default); + + /* "dependency_injector/providers.pyx":738 + * def set_default(self, default): + * """Set type.""" + * if default and not isinstance(default, Provider): # <<<<<<<<<<<<<< + * default = Object(default) + * self.__default = default + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_default); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 738, __pyx_L1_error) + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_default, __pyx_ptype_19dependency_injector_9providers_Provider); + __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "dependency_injector/providers.pyx":739 + * """Set type.""" + * if default and not isinstance(default, Provider): + * default = Object(default) # <<<<<<<<<<<<<< + * self.__default = default + * return self + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object), __pyx_v_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_default, __pyx_t_4); + __pyx_t_4 = 0; + + /* "dependency_injector/providers.pyx":738 + * def set_default(self, default): + * """Set type.""" + * if default and not isinstance(default, Provider): # <<<<<<<<<<<<<< + * default = Object(default) + * self.__default = default + */ + } + + /* "dependency_injector/providers.pyx":740 + * if default and not isinstance(default, Provider): + * default = Object(default) + * self.__default = default # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_default); + __Pyx_GIVEREF(__pyx_v_default); + __Pyx_GOTREF(__pyx_v_self->__pyx___default); + __Pyx_DECREF(__pyx_v_self->__pyx___default); + __pyx_v_self->__pyx___default = __pyx_v_default; + + /* "dependency_injector/providers.pyx":741 + * default = Object(default) + * self.__default = default + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":736 + * return self.__default + * + * def set_default(self, default): # <<<<<<<<<<<<<< + * """Set type.""" + * if default and not isinstance(default, Provider): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("dependency_injector.providers.Dependency.set_default", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_default); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":744 * * @property * def is_defined(self): # <<<<<<<<<<<<<< * """Return True if dependency is defined.""" - * return self.__last_overriding or self.__default is not UNDEFINED + * return self.__last_overriding or self.__default */ /* Python wrapper */ @@ -16606,52 +16966,44 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10is_def __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":730 + /* "dependency_injector/providers.pyx":746 * def is_defined(self): * """Return True if dependency is defined.""" - * return self.__last_overriding or self.__default is not UNDEFINED # <<<<<<<<<<<<<< + * return self.__last_overriding or self.__default # <<<<<<<<<<<<<< * * def provided_by(self, provider): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 730, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 746, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding); goto __pyx_L3_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 730, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__pyx_v_self->__pyx___default != __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 730, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __pyx_t_3; - __pyx_t_3 = 0; + __Pyx_INCREF(__pyx_v_self->__pyx___default); + __pyx_t_1 = __pyx_v_self->__pyx___default; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":728 + /* "dependency_injector/providers.pyx":744 * * @property * def is_defined(self): # <<<<<<<<<<<<<< * """Return True if dependency is defined.""" - * return self.__last_overriding or self.__default is not UNDEFINED + * return self.__last_overriding or self.__default */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("dependency_injector.providers.Dependency.is_defined.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -16660,8 +17012,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10is_def return __pyx_r; } -/* "dependency_injector/providers.pyx":732 - * return self.__last_overriding or self.__default is not UNDEFINED +/* "dependency_injector/providers.pyx":748 + * return self.__last_overriding or self.__default * * def provided_by(self, provider): # <<<<<<<<<<<<<< * """Set external dependency provider. @@ -16669,20 +17021,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10is_def */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_13provided_by(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_10Dependency_12provided_by[] = "Set external dependency provider.\n\n :param provider: Provider that provides required dependency.\n :type provider: :py:class:`Provider`\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_13provided_by(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_17provided_by(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_10Dependency_16provided_by[] = "Set external dependency provider.\n\n :param provider: Provider that provides required dependency.\n :type provider: :py:class:`Provider`\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_17provided_by(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("provided_by (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_12provided_by(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v_provider)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_16provided_by(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v_provider)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_12provided_by(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_provider) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_16provided_by(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_provider) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -16693,7 +17045,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_12provid int __pyx_clineno = 0; __Pyx_RefNannySetupContext("provided_by", 0); - /* "dependency_injector/providers.pyx":740 + /* "dependency_injector/providers.pyx":756 * :rtype: None * """ * return self.override(provider) # <<<<<<<<<<<<<< @@ -16701,7 +17053,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_12provid * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 740, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16715,15 +17067,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_12provid } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provider); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 740, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":732 - * return self.__last_overriding or self.__default is not UNDEFINED + /* "dependency_injector/providers.pyx":748 + * return self.__last_overriding or self.__default * * def provided_by(self, provider): # <<<<<<<<<<<<<< * """Set external dependency provider. @@ -16744,12 +17096,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_12provid } static PyObject *__pyx_gb_19dependency_injector_9providers_10Dependency_7related_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":743 +/* "dependency_injector/providers.pyx":759 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * if self.__default is not UNDEFINED: + * if self.__default: */ /* Python wrapper */ @@ -16777,7 +17129,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_7related if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_3___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 743, __pyx_L1_error) + __PYX_ERR(1, 759, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -16785,7 +17137,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_7related __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_10Dependency_7related_2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Dependency___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 743, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_10Dependency_7related_2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Dependency___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 759, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -16805,10 +17157,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10Dependency_7related { struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_3___get__ *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_3___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -16823,25 +17174,21 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10Dependency_7related return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 743, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 759, __pyx_L1_error) - /* "dependency_injector/providers.pyx":745 + /* "dependency_injector/providers.pyx":761 * def related(self): * """Return related providers generator.""" - * if self.__default is not UNDEFINED: # <<<<<<<<<<<<<< + * if self.__default: # <<<<<<<<<<<<<< * yield self.__default * yield from super().related */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->__pyx___default != __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = (__pyx_t_2 != 0); - if (__pyx_t_3) { + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_self->__pyx___default); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 761, __pyx_L1_error) + if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":746 + /* "dependency_injector/providers.pyx":762 * """Return related providers generator.""" - * if self.__default is not UNDEFINED: + * if self.__default: * yield self.__default # <<<<<<<<<<<<<< * yield from super().related * @@ -16855,40 +17202,40 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10Dependency_7related __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L5_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 746, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 762, __pyx_L1_error) - /* "dependency_injector/providers.pyx":745 + /* "dependency_injector/providers.pyx":761 * def related(self): * """Return related providers generator.""" - * if self.__default is not UNDEFINED: # <<<<<<<<<<<<<< + * if self.__default: # <<<<<<<<<<<<<< * yield self.__default * yield from super().related */ } - /* "dependency_injector/providers.pyx":747 - * if self.__default is not UNDEFINED: + /* "dependency_injector/providers.pyx":763 + * if self.__default: * yield self.__default * yield from super().related # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); @@ -16898,30 +17245,30 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10Dependency_7related __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L6_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 747, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 763, __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(1, 747, __pyx_L1_error) + else __PYX_ERR(1, 763, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":743 + /* "dependency_injector/providers.pyx":759 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * if self.__default is not UNDEFINED: + * if self.__default: */ /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("related", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; @@ -16934,7 +17281,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10Dependency_7related return __pyx_r; } -/* "dependency_injector/providers.pyx":750 +/* "dependency_injector/providers.pyx":766 * * @property * def parent(self): # <<<<<<<<<<<<<< @@ -16960,7 +17307,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6parent_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":752 + /* "dependency_injector/providers.pyx":768 * def parent(self): * """Return parent.""" * return self.__parent # <<<<<<<<<<<<<< @@ -16972,7 +17319,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6parent_ __pyx_r = __pyx_v_self->__pyx___parent; goto __pyx_L0; - /* "dependency_injector/providers.pyx":750 + /* "dependency_injector/providers.pyx":766 * * @property * def parent(self): # <<<<<<<<<<<<<< @@ -16987,7 +17334,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6parent_ return __pyx_r; } -/* "dependency_injector/providers.pyx":755 +/* "dependency_injector/providers.pyx":771 * * @property * def parent_name(self): # <<<<<<<<<<<<<< @@ -17022,18 +17369,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11parent int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":757 + /* "dependency_injector/providers.pyx":773 * def parent_name(self): * """Return parent name.""" * if not self.__parent: # <<<<<<<<<<<<<< * return None * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___parent); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 757, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___parent); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 773, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":758 + /* "dependency_injector/providers.pyx":774 * """Return parent name.""" * if not self.__parent: * return None # <<<<<<<<<<<<<< @@ -17044,7 +17391,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11parent __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/providers.pyx":757 + /* "dependency_injector/providers.pyx":773 * def parent_name(self): * """Return parent name.""" * if not self.__parent: # <<<<<<<<<<<<<< @@ -17053,51 +17400,51 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11parent */ } - /* "dependency_injector/providers.pyx":760 + /* "dependency_injector/providers.pyx":776 * return None * * name = '' # <<<<<<<<<<<<<< * if self.__parent.parent_name: * name += f'{self.__parent.parent_name}.' */ - __Pyx_INCREF(__pyx_kp_s__10); - __pyx_v_name = __pyx_kp_s__10; + __Pyx_INCREF(__pyx_kp_s__9); + __pyx_v_name = __pyx_kp_s__9; - /* "dependency_injector/providers.pyx":761 + /* "dependency_injector/providers.pyx":777 * * name = '' * if self.__parent.parent_name: # <<<<<<<<<<<<<< * name += f'{self.__parent.parent_name}.' * name += f'{self.__parent.resolve_provider_name(self)}' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 761, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 761, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 777, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":762 + /* "dependency_injector/providers.pyx":778 * name = '' * if self.__parent.parent_name: * name += f'{self.__parent.parent_name}.' # <<<<<<<<<<<<<< * name += f'{self.__parent.resolve_provider_name(self)}' * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 762, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 762, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_kp_u__7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 762, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_kp_u__6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 762, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":761 + /* "dependency_injector/providers.pyx":777 * * name = '' * if self.__parent.parent_name: # <<<<<<<<<<<<<< @@ -17106,14 +17453,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11parent */ } - /* "dependency_injector/providers.pyx":763 + /* "dependency_injector/providers.pyx":779 * if self.__parent.parent_name: * name += f'{self.__parent.parent_name}.' * name += f'{self.__parent.resolve_provider_name(self)}' # <<<<<<<<<<<<<< * * return name */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_resolve_provider_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 763, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_resolve_provider_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -17127,19 +17474,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11parent } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 763, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 763, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 763, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":765 + /* "dependency_injector/providers.pyx":781 * name += f'{self.__parent.resolve_provider_name(self)}' * * return name # <<<<<<<<<<<<<< @@ -17151,7 +17498,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11parent __pyx_r = __pyx_v_name; goto __pyx_L0; - /* "dependency_injector/providers.pyx":755 + /* "dependency_injector/providers.pyx":771 * * @property * def parent_name(self): # <<<<<<<<<<<<<< @@ -17173,7 +17520,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11parent return __pyx_r; } -/* "dependency_injector/providers.pyx":767 +/* "dependency_injector/providers.pyx":783 * return name * * def assign_parent(self, parent): # <<<<<<<<<<<<<< @@ -17182,25 +17529,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11parent */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_15assign_parent(PyObject *__pyx_v_self, PyObject *__pyx_v_parent); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_10Dependency_14assign_parent[] = "Assign parent."; -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_15assign_parent(PyObject *__pyx_v_self, PyObject *__pyx_v_parent) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_19assign_parent(PyObject *__pyx_v_self, PyObject *__pyx_v_parent); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_10Dependency_18assign_parent[] = "Assign parent."; +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_19assign_parent(PyObject *__pyx_v_self, PyObject *__pyx_v_parent) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("assign_parent (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_14assign_parent(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v_parent)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_18assign_parent(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v_parent)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_14assign_parent(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_parent) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18assign_parent(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_parent) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("assign_parent", 0); - /* "dependency_injector/providers.pyx":769 + /* "dependency_injector/providers.pyx":785 * def assign_parent(self, parent): * """Assign parent.""" * self.__parent = parent # <<<<<<<<<<<<<< @@ -17213,7 +17560,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_14assign __Pyx_DECREF(__pyx_v_self->__pyx___parent); __pyx_v_self->__pyx___parent = __pyx_v_parent; - /* "dependency_injector/providers.pyx":767 + /* "dependency_injector/providers.pyx":783 * return name * * def assign_parent(self, parent): # <<<<<<<<<<<<<< @@ -17228,7 +17575,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_14assign return __pyx_r; } -/* "dependency_injector/providers.pyx":771 +/* "dependency_injector/providers.pyx":787 * self.__parent = parent * * def _copy_parent(self, copied, memo): # <<<<<<<<<<<<<< @@ -17237,8 +17584,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_14assign */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_17_copy_parent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_17_copy_parent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_21_copy_parent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_21_copy_parent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_copied = 0; PyObject *__pyx_v_memo = 0; int __pyx_lineno = 0; @@ -17270,11 +17617,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_17_copy_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, 1); __PYX_ERR(1, 771, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, 1); __PYX_ERR(1, 787, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_parent") < 0)) __PYX_ERR(1, 771, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_parent") < 0)) __PYX_ERR(1, 787, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17287,20 +17634,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_17_copy_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 771, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 787, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Dependency._copy_parent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_16_copy_parent(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), __pyx_v_copied, __pyx_v_memo); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_20_copy_parent(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), __pyx_v_copied, __pyx_v_memo); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_16_copy_parent(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_copied, PyObject *__pyx_v_memo) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_copy_parent(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_copied, PyObject *__pyx_v_memo) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -17309,19 +17656,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_16_copy_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_copy_parent", 0); - /* "dependency_injector/providers.pyx":772 + /* "dependency_injector/providers.pyx":788 * * def _copy_parent(self, copied, memo): * _copy_parent(self, copied, memo) # <<<<<<<<<<<<<< * * def _async_provide(self, future_result, future): */ - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 772, __pyx_L1_error) - __pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_parent(((PyObject *)__pyx_v_self), __pyx_v_copied, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 772, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 788, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_parent(((PyObject *)__pyx_v_self), __pyx_v_copied, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":771 + /* "dependency_injector/providers.pyx":787 * self.__parent = parent * * def _copy_parent(self, copied, memo): # <<<<<<<<<<<<<< @@ -17342,7 +17689,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_16_copy_ return __pyx_r; } -/* "dependency_injector/providers.pyx":774 +/* "dependency_injector/providers.pyx":790 * _copy_parent(self, copied, memo) * * def _async_provide(self, future_result, future): # <<<<<<<<<<<<<< @@ -17351,8 +17698,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_16_copy_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_19_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_19_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_23_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_23_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future_result = 0; PyObject *__pyx_v_future = 0; int __pyx_lineno = 0; @@ -17384,11 +17731,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_19_async case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, 1); __PYX_ERR(1, 774, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, 1); __PYX_ERR(1, 790, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_provide") < 0)) __PYX_ERR(1, 774, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_provide") < 0)) __PYX_ERR(1, 790, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17401,20 +17748,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_19_async } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 774, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 790, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Dependency._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_18_async_provide(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), __pyx_v_future_result, __pyx_v_future); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_22_async_provide(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), __pyx_v_future_result, __pyx_v_future); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async_provide(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_async_provide(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future) { PyObject *__pyx_v_instance = NULL; PyObject *__pyx_v_exception = NULL; PyObject *__pyx_r = NULL; @@ -17434,7 +17781,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_async_provide", 0); - /* "dependency_injector/providers.pyx":775 + /* "dependency_injector/providers.pyx":791 * * def _async_provide(self, future_result, future): * try: # <<<<<<<<<<<<<< @@ -17450,14 +17797,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":776 + /* "dependency_injector/providers.pyx":792 * def _async_provide(self, future_result, future): * try: * instance = future.result() # <<<<<<<<<<<<<< * self._check_instance_type(instance) * 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, 776, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 792, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -17471,20 +17818,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_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, 776, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 792, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_instance = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":777 + /* "dependency_injector/providers.pyx":793 * try: * instance = future.result() * self._check_instance_type(instance) # <<<<<<<<<<<<<< * except Exception as exception: * future_result.set_exception(exception) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_instance_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 777, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_instance_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 793, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -17498,12 +17845,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 777, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 793, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":775 + /* "dependency_injector/providers.pyx":791 * * def _async_provide(self, future_result, future): * try: # <<<<<<<<<<<<<< @@ -17512,7 +17859,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async */ } - /* "dependency_injector/providers.pyx":781 + /* "dependency_injector/providers.pyx":797 * future_result.set_exception(exception) * else: * future_result.set_result(instance) # <<<<<<<<<<<<<< @@ -17520,7 +17867,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async * def _check_instance_type(self, instance): */ /*else:*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 781, __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, 797, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -17534,7 +17881,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 781, __pyx_L5_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 797, __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; @@ -17548,7 +17895,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":778 + /* "dependency_injector/providers.pyx":794 * instance = future.result() * self._check_instance_type(instance) * except Exception as exception: # <<<<<<<<<<<<<< @@ -17558,21 +17905,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.Dependency._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 778, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 794, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_exception = __pyx_t_5; - /* "dependency_injector/providers.pyx":779 + /* "dependency_injector/providers.pyx":795 * self._check_instance_type(instance) * except Exception as exception: * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * future_result.set_result(instance) */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 779, __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, 795, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -17586,7 +17933,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_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, 779, __pyx_L5_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 795, __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; @@ -17598,7 +17945,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":775 + /* "dependency_injector/providers.pyx":791 * * def _async_provide(self, future_result, future): * try: # <<<<<<<<<<<<<< @@ -17618,7 +17965,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async __pyx_L8_try_end:; } - /* "dependency_injector/providers.pyx":774 + /* "dependency_injector/providers.pyx":790 * _copy_parent(self, copied, memo) * * def _async_provide(self, future_result, future): # <<<<<<<<<<<<<< @@ -17646,7 +17993,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async return __pyx_r; } -/* "dependency_injector/providers.pyx":783 +/* "dependency_injector/providers.pyx":799 * future_result.set_result(instance) * * def _check_instance_type(self, instance): # <<<<<<<<<<<<<< @@ -17655,19 +18002,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_18_async */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_21_check_instance_type(PyObject *__pyx_v_self, PyObject *__pyx_v_instance); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_21_check_instance_type(PyObject *__pyx_v_self, PyObject *__pyx_v_instance) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_25_check_instance_type(PyObject *__pyx_v_self, PyObject *__pyx_v_instance); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_25_check_instance_type(PyObject *__pyx_v_self, PyObject *__pyx_v_instance) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_instance_type (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_20_check_instance_type(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v_instance)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_24_check_instance_type(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v_instance)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_check_instance_type(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_instance) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_24_check_instance_type(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_instance) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -17685,32 +18032,32 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_check int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_instance_type", 0); - /* "dependency_injector/providers.pyx":784 + /* "dependency_injector/providers.pyx":800 * * def _check_instance_type(self, instance): * if not isinstance(instance, self.instance_of): # <<<<<<<<<<<<<< * raise Error('{0} is not an instance of {1}'.format(instance, self.instance_of)) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_instance_of); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 784, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_instance_of); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 784, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 800, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":785 + /* "dependency_injector/providers.pyx":801 * def _check_instance_type(self, instance): * if not isinstance(instance, self.instance_of): * raise Error('{0} is not an instance of {1}'.format(instance, self.instance_of)) # <<<<<<<<<<<<<< * * def _raise_undefined_error(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 785, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_is_not_an_instance_of_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_is_not_an_instance_of_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_instance_of); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_instance_of); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -17727,7 +18074,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_check #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_instance, __pyx_t_7}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 801, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -17736,14 +18083,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_check #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_instance, __pyx_t_7}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 801, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -17754,7 +18101,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_check __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -17772,14 +18119,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_check __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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, 785, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 785, __pyx_L1_error) + __PYX_ERR(1, 801, __pyx_L1_error) - /* "dependency_injector/providers.pyx":784 + /* "dependency_injector/providers.pyx":800 * * def _check_instance_type(self, instance): * if not isinstance(instance, self.instance_of): # <<<<<<<<<<<<<< @@ -17788,7 +18135,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_check */ } - /* "dependency_injector/providers.pyx":783 + /* "dependency_injector/providers.pyx":799 * future_result.set_result(instance) * * def _check_instance_type(self, instance): # <<<<<<<<<<<<<< @@ -17815,7 +18162,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_check return __pyx_r; } -/* "dependency_injector/providers.pyx":787 +/* "dependency_injector/providers.pyx":803 * raise Error('{0} is not an instance of {1}'.format(instance, self.instance_of)) * * def _raise_undefined_error(self): # <<<<<<<<<<<<<< @@ -17824,19 +18171,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_20_check */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_23_raise_undefined_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_23_raise_undefined_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_27_raise_undefined_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_27_raise_undefined_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_raise_undefined_error (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_22_raise_undefined_error(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_26_raise_undefined_error(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_raise_undefined_error(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_26_raise_undefined_error(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -17852,29 +18199,29 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_raise int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_raise_undefined_error", 0); - /* "dependency_injector/providers.pyx":788 + /* "dependency_injector/providers.pyx":804 * * def _raise_undefined_error(self): * if self.parent_name: # <<<<<<<<<<<<<< * raise Error(f'Dependency "{self.parent_name}" is not defined') * raise Error('Dependency is not defined') */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 788, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 788, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 804, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":789 + /* "dependency_injector/providers.pyx":805 * def _raise_undefined_error(self): * if self.parent_name: * raise Error(f'Dependency "{self.parent_name}" is not defined') # <<<<<<<<<<<<<< * raise Error('Dependency is not defined') * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 789, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 789, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = 127; @@ -17882,9 +18229,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_raise __pyx_t_5 += 12; __Pyx_GIVEREF(__pyx_kp_u_Dependency); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Dependency); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 789, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parent_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 789, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_6; @@ -17896,7 +18243,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_raise __pyx_t_5 += 16; __Pyx_GIVEREF(__pyx_kp_u_is_not_defined); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_is_not_defined); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 789, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -17912,14 +18259,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_raise __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 789, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 789, __pyx_L1_error) + __PYX_ERR(1, 805, __pyx_L1_error) - /* "dependency_injector/providers.pyx":788 + /* "dependency_injector/providers.pyx":804 * * def _raise_undefined_error(self): * if self.parent_name: # <<<<<<<<<<<<<< @@ -17928,14 +18275,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_raise */ } - /* "dependency_injector/providers.pyx":790 + /* "dependency_injector/providers.pyx":806 * if self.parent_name: * raise Error(f'Dependency "{self.parent_name}" is not defined') * raise Error('Dependency is not defined') # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 790, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -17949,14 +18296,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_raise } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_kp_s_Dependency_is_not_defined) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Dependency_is_not_defined); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 790, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 790, __pyx_L1_error) + __PYX_ERR(1, 806, __pyx_L1_error) - /* "dependency_injector/providers.pyx":787 + /* "dependency_injector/providers.pyx":803 * raise Error('{0} is not an instance of {1}'.format(instance, self.instance_of)) * * def _raise_undefined_error(self): # <<<<<<<<<<<<<< @@ -17985,19 +18332,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_22_raise */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_24__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_28__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_24__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_28__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -18269,19 +18616,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_24__redu */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_26__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_30__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_26__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_30__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -18662,7 +19009,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_18ExternalDependency_ return __pyx_r; } -/* "dependency_injector/providers.pyx":855 +/* "dependency_injector/providers.pyx":871 * """ * * def __init__(self, **dependencies): # <<<<<<<<<<<<<< @@ -18711,22 +19058,22 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":857 + /* "dependency_injector/providers.pyx":873 * def __init__(self, **dependencies): * """Initializer.""" * for provider in dependencies.values(): # <<<<<<<<<<<<<< * if isinstance(provider, CHILD_PROVIDERS): * provider.assign_parent(self) */ - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 857, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 873, __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, 857, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 873, __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, 857, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 873, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -18734,17 +19081,17 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i 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, 857, __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, 873, __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, 857, __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, 873, __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, 857, __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, 873, __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, 857, __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, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -18754,7 +19101,7 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 857, __pyx_L1_error) + else __PYX_ERR(1, 873, __pyx_L1_error) } break; } @@ -18763,28 +19110,28 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":858 + /* "dependency_injector/providers.pyx":874 * """Initializer.""" * for provider in dependencies.values(): * if isinstance(provider, CHILD_PROVIDERS): # <<<<<<<<<<<<<< * provider.assign_parent(self) * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CHILD_PROVIDERS); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 858, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CHILD_PROVIDERS); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_IsInstance(__pyx_v_provider, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 858, __pyx_L1_error) + __pyx_t_5 = PyObject_IsInstance(__pyx_v_provider, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":859 + /* "dependency_injector/providers.pyx":875 * for provider in dependencies.values(): * if isinstance(provider, CHILD_PROVIDERS): * provider.assign_parent(self) # <<<<<<<<<<<<<< * * self.__providers = dependencies */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 859, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -18798,12 +19145,12 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 859, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":858 + /* "dependency_injector/providers.pyx":874 * """Initializer.""" * for provider in dependencies.values(): * if isinstance(provider, CHILD_PROVIDERS): # <<<<<<<<<<<<<< @@ -18812,7 +19159,7 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i */ } - /* "dependency_injector/providers.pyx":857 + /* "dependency_injector/providers.pyx":873 * def __init__(self, **dependencies): * """Initializer.""" * for provider in dependencies.values(): # <<<<<<<<<<<<<< @@ -18822,7 +19169,7 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":861 + /* "dependency_injector/providers.pyx":877 * provider.assign_parent(self) * * self.__providers = dependencies # <<<<<<<<<<<<<< @@ -18835,7 +19182,7 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i __Pyx_DECREF(__pyx_v_self->__pyx___providers); __pyx_v_self->__pyx___providers = __pyx_v_dependencies; - /* "dependency_injector/providers.pyx":862 + /* "dependency_injector/providers.pyx":878 * * self.__providers = dependencies * self.__parent = None # <<<<<<<<<<<<<< @@ -18848,14 +19195,14 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i __Pyx_DECREF(__pyx_v_self->__pyx___parent); __pyx_v_self->__pyx___parent = Py_None; - /* "dependency_injector/providers.pyx":864 + /* "dependency_injector/providers.pyx":880 * self.__parent = None * * super(DependenciesContainer, self).__init__(None) # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 864, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer)); @@ -18863,10 +19210,10 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 864, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 864, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -18881,12 +19228,12 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_1, Py_None); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 864, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":855 + /* "dependency_injector/providers.pyx":871 * """ * * def __init__(self, **dependencies): # <<<<<<<<<<<<<< @@ -18910,7 +19257,7 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i return __pyx_r; } -/* "dependency_injector/providers.pyx":866 +/* "dependency_injector/providers.pyx":882 * super(DependenciesContainer, self).__init__(None) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -18949,16 +19296,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":870 + /* "dependency_injector/providers.pyx":886 * cdef DependenciesContainer copied * * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 870, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 870, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -18973,14 +19320,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 870, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_DependenciesContainer))))) __PYX_ERR(1, 870, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_DependenciesContainer))))) __PYX_ERR(1, 886, __pyx_L1_error) __pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":871 + /* "dependency_injector/providers.pyx":887 * * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -18991,7 +19338,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":872 + /* "dependency_injector/providers.pyx":888 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -19003,7 +19350,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_r = ((PyObject *)__pyx_v_copied); goto __pyx_L0; - /* "dependency_injector/providers.pyx":871 + /* "dependency_injector/providers.pyx":887 * * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -19012,14 +19359,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ } - /* "dependency_injector/providers.pyx":874 + /* "dependency_injector/providers.pyx":890 * return copied * * copied = self.__class__() # <<<<<<<<<<<<<< * memo[id(self)] = copied * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 874, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -19033,26 +19380,26 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 874, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_DependenciesContainer))))) __PYX_ERR(1, 874, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_DependenciesContainer))))) __PYX_ERR(1, 890, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_copied, ((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":875 + /* "dependency_injector/providers.pyx":891 * * copied = self.__class__() * memo[id(self)] = copied # <<<<<<<<<<<<<< * * copied.__provides = deepcopy(self.__provides, memo) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 875, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, ((PyObject *)__pyx_v_copied)) < 0)) __PYX_ERR(1, 875, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, ((PyObject *)__pyx_v_copied)) < 0)) __PYX_ERR(1, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":877 + /* "dependency_injector/providers.pyx":893 * memo[id(self)] = copied * * copied.__provides = deepcopy(self.__provides, memo) # <<<<<<<<<<<<<< @@ -19061,10 +19408,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx___provides; __Pyx_INCREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 877, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 893, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 877, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -19073,7 +19420,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_v_copied->__pyx_base.__pyx___provides = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":878 + /* "dependency_injector/providers.pyx":894 * * copied.__provides = deepcopy(self.__provides, memo) * copied.__providers = deepcopy(self.__providers, memo) # <<<<<<<<<<<<<< @@ -19082,27 +19429,27 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ __pyx_t_2 = __pyx_v_self->__pyx___providers; __Pyx_INCREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 878, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 894, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 878, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - 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, 878, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 894, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_copied->__pyx___providers); __Pyx_DECREF(__pyx_v_copied->__pyx___providers); __pyx_v_copied->__pyx___providers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":880 + /* "dependency_injector/providers.pyx":896 * copied.__providers = deepcopy(self.__providers, memo) * * self._copy_parent(copied, memo) # <<<<<<<<<<<<<< * self._copy_overridings(copied, memo) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 880, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_8 = 0; @@ -19119,7 +19466,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_copied), __pyx_v_memo}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 880, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 896, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -19127,13 +19474,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_copied), __pyx_v_memo}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 880, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 896, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 880, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -19144,24 +19491,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_INCREF(__pyx_v_memo); __Pyx_GIVEREF(__pyx_v_memo); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_v_memo); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 880, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":881 + /* "dependency_injector/providers.pyx":897 * * self._copy_parent(copied, memo) * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 881, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 897, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":883 + /* "dependency_injector/providers.pyx":899 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -19173,7 +19520,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_r = ((PyObject *)__pyx_v_copied); goto __pyx_L0; - /* "dependency_injector/providers.pyx":866 + /* "dependency_injector/providers.pyx":882 * super(DependenciesContainer, self).__init__(None) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -19196,7 +19543,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":885 +/* "dependency_injector/providers.pyx":901 * return copied * * def __getattr__(self, name): # <<<<<<<<<<<<<< @@ -19238,14 +19585,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":887 + /* "dependency_injector/providers.pyx":903 * def __getattr__(self, name): * """Return dependency provider.""" * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< * raise AttributeError( * '\'{cls}\' object has no attribute ' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 887, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -19257,19 +19604,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__11); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 887, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 887, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 887, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -19281,72 +19628,72 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__11); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 887, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 887, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "dependency_injector/providers.pyx":890 + /* "dependency_injector/providers.pyx":906 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=name)) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 890, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 890, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 890, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 890, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 890, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 906, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":891 + /* "dependency_injector/providers.pyx":907 * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, * attribute_name=name)) # <<<<<<<<<<<<<< * * provider = self.__providers.get(name) */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_name) < 0) __PYX_ERR(1, 890, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_name) < 0) __PYX_ERR(1, 906, __pyx_L1_error) - /* "dependency_injector/providers.pyx":890 + /* "dependency_injector/providers.pyx":906 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=name)) * */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 890, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":888 + /* "dependency_injector/providers.pyx":904 * """Return dependency provider.""" * if name.startswith('__') and name.endswith('__'): * raise AttributeError( # <<<<<<<<<<<<<< * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 888, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 888, __pyx_L1_error) + __PYX_ERR(1, 904, __pyx_L1_error) - /* "dependency_injector/providers.pyx":887 + /* "dependency_injector/providers.pyx":903 * def __getattr__(self, name): * """Return dependency provider.""" * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< @@ -19355,7 +19702,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ } - /* "dependency_injector/providers.pyx":893 + /* "dependency_injector/providers.pyx":909 * attribute_name=name)) * * provider = self.__providers.get(name) # <<<<<<<<<<<<<< @@ -19364,44 +19711,44 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(1, 893, __pyx_L1_error) + __PYX_ERR(1, 909, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___providers, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 893, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___providers, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_provider = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":894 + /* "dependency_injector/providers.pyx":910 * * provider = self.__providers.get(name) * if not provider: # <<<<<<<<<<<<<< * provider = Dependency() * provider.assign_parent(self) */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_provider); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 894, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_provider); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 910, __pyx_L1_error) __pyx_t_5 = ((!__pyx_t_1) != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pyx":895 + /* "dependency_injector/providers.pyx":911 * provider = self.__providers.get(name) * if not provider: * provider = Dependency() # <<<<<<<<<<<<<< * provider.assign_parent(self) * */ - __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 895, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_provider, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":896 + /* "dependency_injector/providers.pyx":912 * if not provider: * provider = Dependency() * provider.assign_parent(self) # <<<<<<<<<<<<<< * * self.__providers[name] = provider */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 896, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -19415,12 +19762,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 896, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":898 + /* "dependency_injector/providers.pyx":914 * provider.assign_parent(self) * * self.__providers[name] = provider # <<<<<<<<<<<<<< @@ -19429,18 +19776,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 898, __pyx_L1_error) + __PYX_ERR(1, 914, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___providers, __pyx_v_name, __pyx_v_provider) < 0)) __PYX_ERR(1, 898, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___providers, __pyx_v_name, __pyx_v_provider) < 0)) __PYX_ERR(1, 914, __pyx_L1_error) - /* "dependency_injector/providers.pyx":900 + /* "dependency_injector/providers.pyx":916 * self.__providers[name] = provider * * container = self.__call__() # <<<<<<<<<<<<<< * if container: * dependency_provider = container.providers.get(name) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 900, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -19454,32 +19801,32 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 900, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_container = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":901 + /* "dependency_injector/providers.pyx":917 * * container = self.__call__() * if container: # <<<<<<<<<<<<<< * dependency_provider = container.providers.get(name) * if dependency_provider: */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_container); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 901, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_container); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 917, __pyx_L1_error) if (__pyx_t_5) { - /* "dependency_injector/providers.pyx":902 + /* "dependency_injector/providers.pyx":918 * container = self.__call__() * if container: * dependency_provider = container.providers.get(name) # <<<<<<<<<<<<<< * if dependency_provider: * provider.override(dependency_provider) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 902, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 902, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -19494,30 +19841,30 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 902, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dependency_provider = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":903 + /* "dependency_injector/providers.pyx":919 * if container: * dependency_provider = container.providers.get(name) * if dependency_provider: # <<<<<<<<<<<<<< * provider.override(dependency_provider) * */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dependency_provider); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 903, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dependency_provider); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 919, __pyx_L1_error) if (__pyx_t_5) { - /* "dependency_injector/providers.pyx":904 + /* "dependency_injector/providers.pyx":920 * dependency_provider = container.providers.get(name) * if dependency_provider: * provider.override(dependency_provider) # <<<<<<<<<<<<<< * * return provider */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 904, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -19531,12 +19878,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_dependency_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dependency_provider); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 904, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":903 + /* "dependency_injector/providers.pyx":919 * if container: * dependency_provider = container.providers.get(name) * if dependency_provider: # <<<<<<<<<<<<<< @@ -19545,7 +19892,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ } - /* "dependency_injector/providers.pyx":901 + /* "dependency_injector/providers.pyx":917 * * container = self.__call__() * if container: # <<<<<<<<<<<<<< @@ -19554,7 +19901,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ } - /* "dependency_injector/providers.pyx":894 + /* "dependency_injector/providers.pyx":910 * * provider = self.__providers.get(name) * if not provider: # <<<<<<<<<<<<<< @@ -19563,7 +19910,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ } - /* "dependency_injector/providers.pyx":906 + /* "dependency_injector/providers.pyx":922 * provider.override(dependency_provider) * * return provider # <<<<<<<<<<<<<< @@ -19575,7 +19922,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_r = __pyx_v_provider; goto __pyx_L0; - /* "dependency_injector/providers.pyx":885 + /* "dependency_injector/providers.pyx":901 * return copied * * def __getattr__(self, name): # <<<<<<<<<<<<<< @@ -19600,7 +19947,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":909 +/* "dependency_injector/providers.pyx":925 * * @property * def providers(self): # <<<<<<<<<<<<<< @@ -19626,7 +19973,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":911 + /* "dependency_injector/providers.pyx":927 * def providers(self): * """Read-only dictionary of dependency providers.""" * return self.__providers # <<<<<<<<<<<<<< @@ -19638,7 +19985,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_r = __pyx_v_self->__pyx___providers; goto __pyx_L0; - /* "dependency_injector/providers.pyx":909 + /* "dependency_injector/providers.pyx":925 * * @property * def providers(self): # <<<<<<<<<<<<<< @@ -19653,7 +20000,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":913 +/* "dependency_injector/providers.pyx":929 * return self.__providers * * def override(self, provider): # <<<<<<<<<<<<<< @@ -19686,18 +20033,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":924 + /* "dependency_injector/providers.pyx":940 * :rtype: :py:class:`OverridingContext` * """ * self._override_providers(container=provider) # <<<<<<<<<<<<<< * return super(DependenciesContainer, self).override(provider) * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_override_providers(__pyx_v_self, __pyx_v_provider, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 924, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_override_providers(__pyx_v_self, __pyx_v_provider, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":925 + /* "dependency_injector/providers.pyx":941 * """ * self._override_providers(container=provider) * return super(DependenciesContainer, self).override(provider) # <<<<<<<<<<<<<< @@ -19705,7 +20052,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain * def reset_last_overriding(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 925, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer)); @@ -19713,10 +20060,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 925, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 925, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -19731,14 +20078,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provider); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 925, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":913 + /* "dependency_injector/providers.pyx":929 * return self.__providers * * def override(self, provider): # <<<<<<<<<<<<<< @@ -19759,7 +20106,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":927 +/* "dependency_injector/providers.pyx":943 * return super(DependenciesContainer, self).override(provider) * * def reset_last_overriding(self): # <<<<<<<<<<<<<< @@ -19801,7 +20148,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_last_overriding", 0); - /* "dependency_injector/providers.pyx":935 + /* "dependency_injector/providers.pyx":951 * :rtype: None * """ * for child in self.__providers.values(): # <<<<<<<<<<<<<< @@ -19810,17 +20157,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(1, 935, __pyx_L1_error) + __PYX_ERR(1, 951, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 935, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 951, __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, 935, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 951, __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, 935, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 951, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -19828,17 +20175,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain 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, 935, __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, 951, __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, 935, __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, 951, __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, 935, __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, 951, __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, 935, __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, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -19848,7 +20195,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 935, __pyx_L1_error) + else __PYX_ERR(1, 951, __pyx_L1_error) } break; } @@ -19857,7 +20204,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":936 + /* "dependency_injector/providers.pyx":952 * """ * for child in self.__providers.values(): * try: # <<<<<<<<<<<<<< @@ -19873,14 +20220,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "dependency_injector/providers.pyx":937 + /* "dependency_injector/providers.pyx":953 * for child in self.__providers.values(): * try: * child.reset_last_overriding() # <<<<<<<<<<<<<< * except Error: * pass */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 937, __pyx_L5_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 953, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -19894,12 +20241,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 937, __pyx_L5_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 953, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":936 + /* "dependency_injector/providers.pyx":952 * """ * for child in self.__providers.values(): * try: # <<<<<<<<<<<<<< @@ -19916,7 +20263,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/providers.pyx":938 + /* "dependency_injector/providers.pyx":954 * try: * child.reset_last_overriding() * except Error: # <<<<<<<<<<<<<< @@ -19924,7 +20271,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain * super(DependenciesContainer, self).reset_last_overriding() */ __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9); - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 938, __pyx_L7_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 954, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -19937,7 +20284,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "dependency_injector/providers.pyx":936 + /* "dependency_injector/providers.pyx":952 * """ * for child in self.__providers.values(): * try: # <<<<<<<<<<<<<< @@ -19957,7 +20304,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_L12_try_end:; } - /* "dependency_injector/providers.pyx":935 + /* "dependency_injector/providers.pyx":951 * :rtype: None * """ * for child in self.__providers.values(): # <<<<<<<<<<<<<< @@ -19967,14 +20314,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":940 + /* "dependency_injector/providers.pyx":956 * except Error: * pass * super(DependenciesContainer, self).reset_last_overriding() # <<<<<<<<<<<<<< * * def reset_override(self): */ - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 940, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer)); @@ -19982,10 +20329,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 940, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 940, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -20000,12 +20347,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 940, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":927 + /* "dependency_injector/providers.pyx":943 * return super(DependenciesContainer, self).override(provider) * * def reset_last_overriding(self): # <<<<<<<<<<<<<< @@ -20031,7 +20378,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":942 +/* "dependency_injector/providers.pyx":958 * super(DependenciesContainer, self).reset_last_overriding() * * def reset_override(self): # <<<<<<<<<<<<<< @@ -20068,7 +20415,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_override", 0); - /* "dependency_injector/providers.pyx":947 + /* "dependency_injector/providers.pyx":963 * :rtype: None * """ * for child in self.__providers.values(): # <<<<<<<<<<<<<< @@ -20077,17 +20424,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(1, 947, __pyx_L1_error) + __PYX_ERR(1, 963, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 947, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 963, __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, 947, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 963, __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, 947, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 963, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -20095,17 +20442,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain 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, 947, __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, 963, __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, 947, __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, 963, __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, 947, __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, 963, __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, 947, __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, 963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -20115,7 +20462,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 947, __pyx_L1_error) + else __PYX_ERR(1, 963, __pyx_L1_error) } break; } @@ -20124,14 +20471,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":948 + /* "dependency_injector/providers.pyx":964 * """ * for child in self.__providers.values(): * child.reset_override() # <<<<<<<<<<<<<< * super(DependenciesContainer, self).reset_override() * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 948, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -20145,12 +20492,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_1 = (__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_1)) __PYX_ERR(1, 948, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":947 + /* "dependency_injector/providers.pyx":963 * :rtype: None * """ * for child in self.__providers.values(): # <<<<<<<<<<<<<< @@ -20160,14 +20507,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":949 + /* "dependency_injector/providers.pyx":965 * for child in self.__providers.values(): * child.reset_override() * super(DependenciesContainer, self).reset_override() # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 949, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer)); @@ -20175,10 +20522,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 949, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 949, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -20193,12 +20540,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_2 = (__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_2)) __PYX_ERR(1, 949, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":942 + /* "dependency_injector/providers.pyx":958 * super(DependenciesContainer, self).reset_last_overriding() * * def reset_override(self): # <<<<<<<<<<<<<< @@ -20224,7 +20571,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } static PyObject *__pyx_gb_19dependency_injector_9providers_21DependenciesContainer_7related_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":952 +/* "dependency_injector/providers.pyx":968 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -20257,7 +20604,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_4___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 952, __pyx_L1_error) + __PYX_ERR(1, 968, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -20265,7 +20612,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_21DependenciesContainer_7related_2generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_DependenciesContainer___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 952, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_21DependenciesContainer_7related_2generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_DependenciesContainer___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 968, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -20302,18 +20649,18 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_21DependenciesContain return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 952, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 968, __pyx_L1_error) - /* "dependency_injector/providers.pyx":954 + /* "dependency_injector/providers.pyx":970 * def related(self): * """Return related providers generator.""" * yield from self.providers.values() # <<<<<<<<<<<<<< * yield from super().related * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 954, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 954, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -20328,7 +20675,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_21DependenciesContain } __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, 954, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -20342,23 +20689,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_21DependenciesContain __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 954, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 970, __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(1, 954, __pyx_L1_error) + else __PYX_ERR(1, 970, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":955 + /* "dependency_injector/providers.pyx":971 * """Return related providers generator.""" * yield from self.providers.values() * yield from super().related # <<<<<<<<<<<<<< * * def resolve_provider_name(self, provider): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 955, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer)); @@ -20366,10 +20713,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_21DependenciesContain __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 955, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 955, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -20383,17 +20730,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_21DependenciesContain __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 955, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 971, __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(1, 955, __pyx_L1_error) + else __PYX_ERR(1, 971, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":952 + /* "dependency_injector/providers.pyx":968 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -20420,7 +20767,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":957 +/* "dependency_injector/providers.pyx":973 * yield from super().related * * def resolve_provider_name(self, provider): # <<<<<<<<<<<<<< @@ -20464,16 +20811,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resolve_provider_name", 0); - /* "dependency_injector/providers.pyx":959 + /* "dependency_injector/providers.pyx":975 * def resolve_provider_name(self, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): # <<<<<<<<<<<<<< * if container_provider is provider: * return provider_name */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 959, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 975, __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(1, 959, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -20488,16 +20835,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __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, 959, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 959, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 975, __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(1, 959, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 975, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -20505,17 +20852,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 959, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 975, __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(1, 959, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 959, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 975, __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(1, 959, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -20525,7 +20872,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 959, __pyx_L1_error) + else __PYX_ERR(1, 975, __pyx_L1_error) } break; } @@ -20537,7 +20884,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 959, __pyx_L1_error) + __PYX_ERR(1, 975, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -20550,15 +20897,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 959, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 959, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 975, __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, 959, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 975, __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; @@ -20566,7 +20913,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 959, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 975, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -20574,7 +20921,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 959, __pyx_L1_error) + __PYX_ERR(1, 975, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_provider_name, __pyx_t_2); @@ -20582,7 +20929,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_XDECREF_SET(__pyx_v_container_provider, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":960 + /* "dependency_injector/providers.pyx":976 * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): * if container_provider is provider: # <<<<<<<<<<<<<< @@ -20593,7 +20940,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "dependency_injector/providers.pyx":961 + /* "dependency_injector/providers.pyx":977 * for provider_name, container_provider in self.providers.items(): * if container_provider is provider: * return provider_name # <<<<<<<<<<<<<< @@ -20606,7 +20953,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":960 + /* "dependency_injector/providers.pyx":976 * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): * if container_provider is provider: # <<<<<<<<<<<<<< @@ -20615,7 +20962,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ } - /* "dependency_injector/providers.pyx":959 + /* "dependency_injector/providers.pyx":975 * def resolve_provider_name(self, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): # <<<<<<<<<<<<<< @@ -20625,16 +20972,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } /*else*/ { - /* "dependency_injector/providers.pyx":963 + /* "dependency_injector/providers.pyx":979 * return provider_name * else: * raise Error(f'Can not resolve name for provider "{provider}"') # <<<<<<<<<<<<<< * * @property */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 963, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 963, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = 0; __pyx_t_12 = 127; @@ -20642,18 +20989,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_t_11 += 35; __Pyx_GIVEREF(__pyx_kp_u_Can_not_resolve_name_for_provide); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Can_not_resolve_name_for_provide); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_provider, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 963, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_provider, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_12; __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__5); + __Pyx_INCREF(__pyx_kp_u__4); __pyx_t_11 += 1; - __Pyx_GIVEREF(__pyx_kp_u__5); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 963, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__4); + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -20669,15 +21016,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 963, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 963, __pyx_L1_error) + __PYX_ERR(1, 979, __pyx_L1_error) } - /* "dependency_injector/providers.pyx":959 + /* "dependency_injector/providers.pyx":975 * def resolve_provider_name(self, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): # <<<<<<<<<<<<<< @@ -20686,7 +21033,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":957 + /* "dependency_injector/providers.pyx":973 * yield from super().related * * def resolve_provider_name(self, provider): # <<<<<<<<<<<<<< @@ -20711,7 +21058,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":966 +/* "dependency_injector/providers.pyx":982 * * @property * def parent(self): # <<<<<<<<<<<<<< @@ -20737,7 +21084,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":968 + /* "dependency_injector/providers.pyx":984 * def parent(self): * """Return parent.""" * return self.__parent # <<<<<<<<<<<<<< @@ -20749,7 +21096,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_r = __pyx_v_self->__pyx___parent; goto __pyx_L0; - /* "dependency_injector/providers.pyx":966 + /* "dependency_injector/providers.pyx":982 * * @property * def parent(self): # <<<<<<<<<<<<<< @@ -20764,7 +21111,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":971 +/* "dependency_injector/providers.pyx":987 * * @property * def parent_name(self): # <<<<<<<<<<<<<< @@ -20799,18 +21146,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":973 + /* "dependency_injector/providers.pyx":989 * def parent_name(self): * """Return parent name.""" * if not self.__parent: # <<<<<<<<<<<<<< * return None * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___parent); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 973, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___parent); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 989, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":974 + /* "dependency_injector/providers.pyx":990 * """Return parent name.""" * if not self.__parent: * return None # <<<<<<<<<<<<<< @@ -20821,7 +21168,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/providers.pyx":973 + /* "dependency_injector/providers.pyx":989 * def parent_name(self): * """Return parent name.""" * if not self.__parent: # <<<<<<<<<<<<<< @@ -20830,51 +21177,51 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ } - /* "dependency_injector/providers.pyx":976 + /* "dependency_injector/providers.pyx":992 * return None * * name = '' # <<<<<<<<<<<<<< * if self.__parent.parent_name: * name += f'{self.__parent.parent_name}.' */ - __Pyx_INCREF(__pyx_kp_s__10); - __pyx_v_name = __pyx_kp_s__10; + __Pyx_INCREF(__pyx_kp_s__9); + __pyx_v_name = __pyx_kp_s__9; - /* "dependency_injector/providers.pyx":977 + /* "dependency_injector/providers.pyx":993 * * name = '' * if self.__parent.parent_name: # <<<<<<<<<<<<<< * name += f'{self.__parent.parent_name}.' * name += f'{self.__parent.resolve_provider_name(self)}' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 977, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 977, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 993, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":978 + /* "dependency_injector/providers.pyx":994 * name = '' * if self.__parent.parent_name: * name += f'{self.__parent.parent_name}.' # <<<<<<<<<<<<<< * name += f'{self.__parent.resolve_provider_name(self)}' * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 978, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 978, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_kp_u__7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 978, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_kp_u__6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 978, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":977 + /* "dependency_injector/providers.pyx":993 * * name = '' * if self.__parent.parent_name: # <<<<<<<<<<<<<< @@ -20883,14 +21230,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain */ } - /* "dependency_injector/providers.pyx":979 + /* "dependency_injector/providers.pyx":995 * if self.__parent.parent_name: * name += f'{self.__parent.parent_name}.' * name += f'{self.__parent.resolve_provider_name(self)}' # <<<<<<<<<<<<<< * * return name */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_resolve_provider_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 979, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_resolve_provider_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -20904,19 +21251,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 979, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 979, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 979, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":981 + /* "dependency_injector/providers.pyx":997 * name += f'{self.__parent.resolve_provider_name(self)}' * * return name # <<<<<<<<<<<<<< @@ -20928,7 +21275,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __pyx_r = __pyx_v_name; goto __pyx_L0; - /* "dependency_injector/providers.pyx":971 + /* "dependency_injector/providers.pyx":987 * * @property * def parent_name(self): # <<<<<<<<<<<<<< @@ -20950,7 +21297,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":983 +/* "dependency_injector/providers.pyx":999 * return name * * def assign_parent(self, parent): # <<<<<<<<<<<<<< @@ -20977,7 +21324,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("assign_parent", 0); - /* "dependency_injector/providers.pyx":985 + /* "dependency_injector/providers.pyx":1001 * def assign_parent(self, parent): * """Assign parent.""" * self.__parent = parent # <<<<<<<<<<<<<< @@ -20990,7 +21337,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain __Pyx_DECREF(__pyx_v_self->__pyx___parent); __pyx_v_self->__pyx___parent = __pyx_v_parent; - /* "dependency_injector/providers.pyx":983 + /* "dependency_injector/providers.pyx":999 * return name * * def assign_parent(self, parent): # <<<<<<<<<<<<<< @@ -21005,7 +21352,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":987 +/* "dependency_injector/providers.pyx":1003 * self.__parent = parent * * def _copy_parent(self, copied, memo): # <<<<<<<<<<<<<< @@ -21047,11 +21394,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContain case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, 1); __PYX_ERR(1, 987, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, 1); __PYX_ERR(1, 1003, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_parent") < 0)) __PYX_ERR(1, 987, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_parent") < 0)) __PYX_ERR(1, 1003, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -21064,7 +21411,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContain } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 987, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1003, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer._copy_parent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21086,19 +21433,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_copy_parent", 0); - /* "dependency_injector/providers.pyx":988 + /* "dependency_injector/providers.pyx":1004 * * def _copy_parent(self, copied, memo): * _copy_parent(self, copied, memo) # <<<<<<<<<<<<<< * * cpdef object _override_providers(self, object container): */ - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 988, __pyx_L1_error) - __pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_parent(((PyObject *)__pyx_v_self), __pyx_v_copied, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 988, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1004, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_parent(((PyObject *)__pyx_v_self), __pyx_v_copied, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":987 + /* "dependency_injector/providers.pyx":1003 * self.__parent = parent * * def _copy_parent(self, copied, memo): # <<<<<<<<<<<<<< @@ -21119,7 +21466,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":990 +/* "dependency_injector/providers.pyx":1006 * _copy_parent(self, copied, memo) * * cpdef object _override_providers(self, object container): # <<<<<<<<<<<<<< @@ -21157,7 +21504,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 990, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_19_override_providers)) { __Pyx_XDECREF(__pyx_r); @@ -21174,7 +21521,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_container) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_container); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 990, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -21195,16 +21542,16 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine #endif } - /* "dependency_injector/providers.pyx":992 + /* "dependency_injector/providers.pyx":1008 * cpdef object _override_providers(self, object container): * """Override providers with providers from provided container.""" * for name, dependency_provider in container.providers.items(): # <<<<<<<<<<<<<< * provider = getattr(self, name) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 992, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1008, __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(1, 992, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -21219,16 +21566,16 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine } __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, 992, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1008, __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_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 992, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 992, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1008, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -21236,17 +21583,17 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 992, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1008, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 992, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 992, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 1008, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 992, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -21256,7 +21603,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 992, __pyx_L1_error) + else __PYX_ERR(1, 1008, __pyx_L1_error) } break; } @@ -21268,7 +21615,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 992, __pyx_L1_error) + __PYX_ERR(1, 1008, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -21281,15 +21628,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 992, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 992, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #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, 992, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1008, __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; @@ -21297,7 +21644,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 992, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 1008, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -21305,7 +21652,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 992, __pyx_L1_error) + __PYX_ERR(1, 1008, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); @@ -21313,33 +21660,33 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine __Pyx_XDECREF_SET(__pyx_v_dependency_provider, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":993 + /* "dependency_injector/providers.pyx":1009 * """Override providers with providers from provided container.""" * for name, dependency_provider in container.providers.items(): * provider = getattr(self, name) # <<<<<<<<<<<<<< * * if provider.last_overriding is dependency_provider: */ - __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 993, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":995 + /* "dependency_injector/providers.pyx":1011 * provider = getattr(self, name) * * if provider.last_overriding is dependency_provider: # <<<<<<<<<<<<<< * continue * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_last_overriding); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 995, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_last_overriding); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = (__pyx_t_1 == __pyx_v_dependency_provider); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "dependency_injector/providers.pyx":996 + /* "dependency_injector/providers.pyx":1012 * * if provider.last_overriding is dependency_provider: * continue # <<<<<<<<<<<<<< @@ -21348,7 +21695,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine */ goto __pyx_L3_continue; - /* "dependency_injector/providers.pyx":995 + /* "dependency_injector/providers.pyx":1011 * provider = getattr(self, name) * * if provider.last_overriding is dependency_provider: # <<<<<<<<<<<<<< @@ -21357,14 +21704,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine */ } - /* "dependency_injector/providers.pyx":998 + /* "dependency_injector/providers.pyx":1014 * continue * * provider.override(dependency_provider) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 998, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -21378,12 +21725,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_dependency_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dependency_provider); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 998, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":992 + /* "dependency_injector/providers.pyx":1008 * cpdef object _override_providers(self, object container): * """Override providers with providers from provided container.""" * for name, dependency_provider in container.providers.items(): # <<<<<<<<<<<<<< @@ -21394,7 +21741,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContaine } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":990 + /* "dependency_injector/providers.pyx":1006 * _copy_parent(self, copied, memo) * * cpdef object _override_providers(self, object container): # <<<<<<<<<<<<<< @@ -21445,7 +21792,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_override_providers", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_21DependenciesContainer__override_providers(__pyx_v_self, __pyx_v_container, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 990, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_21DependenciesContainer__override_providers(__pyx_v_self, __pyx_v_container, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21804,17 +22151,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContain return __pyx_r; } -/* "dependency_injector/providers.pyx":1025 +/* "dependency_injector/providers.pyx":1041 * """ * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< - * """Initializer. - * + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< + * """Initialize provider.""" + * self.__provides = None */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_8Callable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Callable___init__[] = "Initializer.\n\n :param provides: Wrapped callable.\n :type provides: callable\n "; +static char __pyx_doc_19dependency_injector_9providers_8Callable___init__[] = "Initialize provider."; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Callable___init__; #endif @@ -21844,6 +22191,7 @@ static int __pyx_pw_19dependency_injector_9providers_8Callable_1__init__(PyObjec { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -21856,23 +22204,26 @@ static int __pyx_pw_19dependency_injector_9providers_8Callable_1__init__(PyObjec kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1025, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1041, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } } __pyx_v_provides = values[0]; } goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1025, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -21892,201 +22243,69 @@ static int __pyx_pw_19dependency_injector_9providers_8Callable_1__init__(PyObjec static int __pyx_pf_19dependency_injector_9providers_8Callable___init__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { int __pyx_r; __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1031 - * :type provides: callable - * """ - * if not callable(provides): # <<<<<<<<<<<<<< - * raise Error('Provider {0} expected to get callable, ' - * 'got {0}'.format('.'.join((self.__class__.__module__, - */ - __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_provides); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 1031, __pyx_L1_error) - __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); - if (unlikely(__pyx_t_2)) { - - /* "dependency_injector/providers.pyx":1032 - * """ - * if not callable(provides): - * raise Error('Provider {0} expected to get callable, ' # <<<<<<<<<<<<<< - * 'got {0}'.format('.'.join((self.__class__.__module__, - * self.__class__.__name__)), - */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1032, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - - /* "dependency_injector/providers.pyx":1033 - * if not callable(provides): - * raise Error('Provider {0} expected to get callable, ' - * 'got {0}'.format('.'.join((self.__class__.__module__, # <<<<<<<<<<<<<< - * self.__class__.__name__)), - * provides)) - */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provider_0_expected_to_get_calla, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1033, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1033, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_module); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1033, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "dependency_injector/providers.pyx":1034 - * raise Error('Provider {0} expected to get callable, ' - * 'got {0}'.format('.'.join((self.__class__.__module__, - * self.__class__.__name__)), # <<<<<<<<<<<<<< - * provides)) - * self.__provides = provides - */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1034, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1034, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "dependency_injector/providers.pyx":1033 - * if not callable(provides): - * raise Error('Provider {0} expected to get callable, ' - * 'got {0}'.format('.'.join((self.__class__.__module__, # <<<<<<<<<<<<<< - * self.__class__.__name__)), - * provides)) - */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1033, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); - __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9); - __pyx_t_8 = 0; - __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1033, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "dependency_injector/providers.pyx":1035 - * 'got {0}'.format('.'.join((self.__class__.__module__, - * self.__class__.__name__)), - * provides)) # <<<<<<<<<<<<<< - * self.__provides = provides + /* "dependency_injector/providers.pyx":1043 + * def __init__(self, provides=None, *args, **kwargs): + * """Initialize provider.""" + * self.__provides = None # <<<<<<<<<<<<<< + * self.set_provides(provides) * */ - __pyx_t_7 = NULL; - __pyx_t_10 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_provides}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1033, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_provides}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1033, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1033, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (__pyx_t_7) { - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; - } - __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_t_9); - __Pyx_INCREF(__pyx_v_provides); - __Pyx_GIVEREF(__pyx_v_provides); - PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_provides); - __pyx_t_9 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1033, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 1032, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 1032, __pyx_L1_error) + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = Py_None; - /* "dependency_injector/providers.pyx":1031 - * :type provides: callable - * """ - * if not callable(provides): # <<<<<<<<<<<<<< - * raise Error('Provider {0} expected to get callable, ' - * 'got {0}'.format('.'.join((self.__class__.__module__, - */ - } - - /* "dependency_injector/providers.pyx":1036 - * self.__class__.__name__)), - * provides)) - * self.__provides = provides # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":1044 + * """Initialize provider.""" + * self.__provides = None + * self.set_provides(provides) # <<<<<<<<<<<<<< * * self.__args = tuple() */ - __Pyx_INCREF(__pyx_v_provides); - __Pyx_GIVEREF(__pyx_v_provides); - __Pyx_GOTREF(__pyx_v_self->__pyx___provides); - __Pyx_DECREF(__pyx_v_self->__pyx___provides); - __pyx_v_self->__pyx___provides = __pyx_v_provides; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __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_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_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1038 - * self.__provides = provides + /* "dependency_injector/providers.pyx":1046 + * self.set_provides(provides) * * self.__args = tuple() # <<<<<<<<<<<<<< * self.__args_len = 0 * self.set_args(*args) */ - __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1038, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); __Pyx_DECREF(__pyx_v_self->__pyx___args); - __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; + __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1039 + /* "dependency_injector/providers.pyx":1047 * * self.__args = tuple() * self.__args_len = 0 # <<<<<<<<<<<<<< @@ -22095,36 +22314,36 @@ static int __pyx_pf_19dependency_injector_9providers_8Callable___init__(struct _ */ __pyx_v_self->__pyx___args_len = 0; - /* "dependency_injector/providers.pyx":1040 + /* "dependency_injector/providers.pyx":1048 * self.__args = tuple() * self.__args_len = 0 * self.set_args(*args) # <<<<<<<<<<<<<< * * self.__kwargs = tuple() */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1040, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1040, __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; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1042 + /* "dependency_injector/providers.pyx":1050 * self.set_args(*args) * * self.__kwargs = tuple() # <<<<<<<<<<<<<< * self.__kwargs_len = 0 * self.set_kwargs(**kwargs) */ - __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1042, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); __Pyx_DECREF(__pyx_v_self->__pyx___kwargs); - __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1043 + /* "dependency_injector/providers.pyx":1051 * * self.__kwargs = tuple() * self.__kwargs_len = 0 # <<<<<<<<<<<<<< @@ -22133,77 +22352,73 @@ static int __pyx_pf_19dependency_injector_9providers_8Callable___init__(struct _ */ __pyx_v_self->__pyx___kwargs_len = 0; - /* "dependency_injector/providers.pyx":1044 + /* "dependency_injector/providers.pyx":1052 * self.__kwargs = tuple() * self.__kwargs_len = 0 * self.set_kwargs(**kwargs) # <<<<<<<<<<<<<< * * super(Callable, self).__init__() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1044, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1044, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1046 + /* "dependency_injector/providers.pyx":1054 * self.set_kwargs(**kwargs) * * super(Callable, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1046, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1054, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1046, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1046, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1054, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1054, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1046, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1054, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1025 + /* "dependency_injector/providers.pyx":1041 * """ * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< - * """Initializer. - * + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< + * """Initialize provider.""" + * self.__provides = None */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("dependency_injector.providers.Callable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -22211,7 +22426,7 @@ static int __pyx_pf_19dependency_injector_9providers_8Callable___init__(struct _ return __pyx_r; } -/* "dependency_injector/providers.pyx":1048 +/* "dependency_injector/providers.pyx":1056 * super(Callable, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -22245,22 +22460,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy int __pyx_t_5; int __pyx_t_6; struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7; - PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":1050 + /* "dependency_injector/providers.pyx":1058 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1050, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1050, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -22275,13 +22489,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1050, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1051 + /* "dependency_injector/providers.pyx":1059 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -22292,7 +22506,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":1052 + /* "dependency_injector/providers.pyx":1060 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -22304,7 +22518,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1051 + /* "dependency_injector/providers.pyx":1059 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -22313,19 +22527,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy */ } - /* "dependency_injector/providers.pyx":1054 + /* "dependency_injector/providers.pyx":1062 * return copied * * provides = self.provides # <<<<<<<<<<<<<< * if isinstance(provides, Provider): * provides = deepcopy(provides, memo) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1054, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_provides = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1055 + /* "dependency_injector/providers.pyx":1063 * * provides = self.provides * if isinstance(provides, Provider): # <<<<<<<<<<<<<< @@ -22336,22 +22550,22 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pyx":1056 + /* "dependency_injector/providers.pyx":1064 * provides = self.provides * if isinstance(provides, Provider): * provides = deepcopy(provides, memo) # <<<<<<<<<<<<<< * - * copied = self.__class__(provides, + * copied = _memorized_duplicate(self, memo) */ - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1056, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1064, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_provides, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1056, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_provides, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_provides, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1055 + /* "dependency_injector/providers.pyx":1063 * * provides = self.provides * if isinstance(provides, Provider): # <<<<<<<<<<<<<< @@ -22360,108 +22574,119 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy */ } - /* "dependency_injector/providers.pyx":1058 + /* "dependency_injector/providers.pyx":1066 * provides = deepcopy(provides, memo) * - * copied = self.__class__(provides, # <<<<<<<<<<<<<< - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_provides(provides) + * copied.set_args(*deepcopy(self.args, memo)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1058, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1066, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1058, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_provides); - __Pyx_GIVEREF(__pyx_v_provides); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_provides); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1059 + /* "dependency_injector/providers.pyx":1067 * - * copied = self.__class__(provides, - * *deepcopy(self.args, memo), # <<<<<<<<<<<<<< - * **deepcopy(self.kwargs, memo)) + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(provides) # <<<<<<<<<<<<<< + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1067, __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_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_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1067, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":1068 + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(provides) + * copied.set_args(*deepcopy(self.args, memo)) # <<<<<<<<<<<<<< + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1059, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1059, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1068, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1059, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "dependency_injector/providers.pyx":1058 - * provides = deepcopy(provides, memo) - * - * copied = self.__class__(provides, # <<<<<<<<<<<<<< - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) - */ - __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1058, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1058, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1060 - * copied = self.__class__(provides, - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":1069 + * copied.set_provides(provides) + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< * * self._copy_overridings(copied, memo) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1060, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1060, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1069, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1060, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__pyx_t_8 == Py_None)) { - PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 1060, __pyx_L1_error) - } - if (likely(PyDict_CheckExact(__pyx_t_8))) { - __pyx_t_3 = PyDict_Copy(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1060, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1058, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - - /* "dependency_injector/providers.pyx":1058 - * provides = deepcopy(provides, memo) - * - * copied = self.__class__(provides, # <<<<<<<<<<<<<< - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) - */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1058, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(__pyx_t_4 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(1, 1069, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_t_4))) { + __pyx_t_2 = PyDict_Copy(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_8); - __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1062 - * **deepcopy(self.kwargs, memo)) + /* "dependency_injector/providers.pyx":1071 + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) * * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 1062, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1062, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 1071, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1071, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_Callable *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":1064 + /* "dependency_injector/providers.pyx":1073 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -22473,7 +22698,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1048 + /* "dependency_injector/providers.pyx":1056 * super(Callable, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -22487,7 +22712,6 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("dependency_injector.providers.Callable.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -22498,7 +22722,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy return __pyx_r; } -/* "dependency_injector/providers.pyx":1066 +/* "dependency_injector/providers.pyx":1075 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -22533,7 +22757,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4__str__(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":1071 + /* "dependency_injector/providers.pyx":1080 * :rtype: str * """ * return represent_provider(provider=self, provides=self.__provides) # <<<<<<<<<<<<<< @@ -22543,14 +22767,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4__str__(st __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1071, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1066 + /* "dependency_injector/providers.pyx":1075 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -22570,11 +22794,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4__str__(st return __pyx_r; } -/* "dependency_injector/providers.pyx":1074 +/* "dependency_injector/providers.pyx":1083 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return wrapped callable.""" + * """Return provider's provides.""" * return self.__provides */ @@ -22596,23 +22820,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8provides__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1076 + /* "dependency_injector/providers.pyx":1085 * def provides(self): - * """Return wrapped callable.""" + * """Return provider's provides.""" * return self.__provides # <<<<<<<<<<<<<< * - * @property + * def set_provides(self, provides): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->__pyx___provides); __pyx_r = __pyx_v_self->__pyx___provides; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1074 + /* "dependency_injector/providers.pyx":1083 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return wrapped callable.""" + * """Return provider's provides.""" * return self.__provides */ @@ -22623,7 +22847,230 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8provides__ return __pyx_r; } -/* "dependency_injector/providers.pyx":1079 +/* "dependency_injector/providers.pyx":1087 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * if provides and not callable(provides): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_7set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Callable_6set_provides[] = "Set provider's provides."; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_7set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_6set_provides(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), ((PyObject *)__pyx_v_provides)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6set_provides(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_provides", 0); + + /* "dependency_injector/providers.pyx":1089 + * def set_provides(self, provides): + * """Set provider's provides.""" + * if provides and not callable(provides): # <<<<<<<<<<<<<< + * raise Error( + * 'Provider {0} expected to get callable, got {1} instead'.format( + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_provides); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1089, __pyx_L1_error) + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyCallable_Check(__pyx_v_provides); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1089, __pyx_L1_error) + __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "dependency_injector/providers.pyx":1090 + * """Set provider's provides.""" + * if provides and not callable(provides): + * raise Error( # <<<<<<<<<<<<<< + * 'Provider {0} expected to get callable, got {1} instead'.format( + * _class_qualname(self), + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1090, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "dependency_injector/providers.pyx":1091 + * if provides and not callable(provides): + * raise Error( + * 'Provider {0} expected to get callable, got {1} instead'.format( # <<<<<<<<<<<<<< + * _class_qualname(self), + * provides, + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provider_0_expected_to_get_calla, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "dependency_injector/providers.pyx":1092 + * raise Error( + * 'Provider {0} expected to get callable, got {1} instead'.format( + * _class_qualname(self), # <<<<<<<<<<<<<< + * provides, + * ), + */ + __pyx_t_8 = __pyx_f_19dependency_injector_9providers__class_qualname(((PyObject *)__pyx_v_self), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "dependency_injector/providers.pyx":1093 + * 'Provider {0} expected to get callable, got {1} instead'.format( + * _class_qualname(self), + * provides, # <<<<<<<<<<<<<< + * ), + * ) + */ + __pyx_t_9 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_v_provides}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1091, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_v_provides}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1091, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_8); + __Pyx_INCREF(__pyx_v_provides); + __Pyx_GIVEREF(__pyx_v_provides); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_provides); + __pyx_t_8 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1090, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 1090, __pyx_L1_error) + + /* "dependency_injector/providers.pyx":1089 + * def set_provides(self, provides): + * """Set provider's provides.""" + * if provides and not callable(provides): # <<<<<<<<<<<<<< + * raise Error( + * 'Provider {0} expected to get callable, got {1} instead'.format( + */ + } + + /* "dependency_injector/providers.pyx":1096 + * ), + * ) + * self.__provides = provides # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_provides); + __Pyx_GIVEREF(__pyx_v_provides); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = __pyx_v_provides; + + /* "dependency_injector/providers.pyx":1097 + * ) + * self.__provides = provides + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":1087 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * if provides and not callable(provides): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("dependency_injector.providers.Callable.set_provides", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":1100 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -22660,19 +23107,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4args___get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1085 + /* "dependency_injector/providers.pyx":1106 * cdef list args * * args = list() # <<<<<<<<<<<<<< * for index in range(self.__args_len): * arg = self.__args[index] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1085, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1086 + /* "dependency_injector/providers.pyx":1107 * * args = list() * for index in range(self.__args_len): # <<<<<<<<<<<<<< @@ -22684,7 +23131,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4args___get for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pyx":1087 + /* "dependency_injector/providers.pyx":1108 * args = list() * for index in range(self.__args_len): * arg = self.__args[index] # <<<<<<<<<<<<<< @@ -22693,15 +23140,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4args___get */ if (unlikely(__pyx_v_self->__pyx___args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 1087, __pyx_L1_error) + __PYX_ERR(1, 1108, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1087, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_PositionalInjection))))) __PYX_ERR(1, 1087, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_PositionalInjection))))) __PYX_ERR(1, 1108, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_arg, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1088 + /* "dependency_injector/providers.pyx":1109 * for index in range(self.__args_len): * arg = self.__args[index] * args.append(arg.__value) # <<<<<<<<<<<<<< @@ -22710,11 +23157,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4args___get */ __pyx_t_1 = __pyx_v_arg->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1088, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":1089 + /* "dependency_injector/providers.pyx":1110 * arg = self.__args[index] * args.append(arg.__value) * return tuple(args) # <<<<<<<<<<<<<< @@ -22722,13 +23169,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4args___get * def add_args(self, *args): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1089, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1079 + /* "dependency_injector/providers.pyx":1100 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -22749,7 +23196,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4args___get return __pyx_r; } -/* "dependency_injector/providers.pyx":1091 +/* "dependency_injector/providers.pyx":1112 * return tuple(args) * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -22758,9 +23205,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4args___get */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Callable_6add_args[] = "Add positional argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_9add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Callable_8add_args[] = "Add positional argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_9add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -22768,7 +23215,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_7add_args(P if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_args", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_6add_args(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_args); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_8add_args(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -22776,7 +23223,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_7add_args(P return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6add_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8add_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -22787,16 +23234,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6add_args(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_args", 0); - /* "dependency_injector/providers.pyx":1096 + /* "dependency_injector/providers.pyx":1117 * :return: Reference ``self`` * """ * self.__args += parse_positional_injections(args) # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1096, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1096, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -22805,7 +23252,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6add_args(s __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1097 + /* "dependency_injector/providers.pyx":1118 * """ * self.__args += parse_positional_injections(args) * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -22816,13 +23263,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6add_args(s __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 1097, __pyx_L1_error) + __PYX_ERR(1, 1118, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1097, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_3; - /* "dependency_injector/providers.pyx":1098 + /* "dependency_injector/providers.pyx":1119 * self.__args += parse_positional_injections(args) * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -22834,7 +23281,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6add_args(s __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1091 + /* "dependency_injector/providers.pyx":1112 * return tuple(args) * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -22854,7 +23301,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6add_args(s return __pyx_r; } -/* "dependency_injector/providers.pyx":1100 +/* "dependency_injector/providers.pyx":1121 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -22863,9 +23310,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6add_args(s */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Callable_8set_args[] = "Set positional argument injections.\n\n Existing positional argument injections are dropped.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_11set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Callable_10set_args[] = "Set positional argument injections.\n\n Existing positional argument injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_11set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -22873,7 +23320,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_9set_args(P if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_args", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_8set_args(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_args); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_10set_args(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -22881,7 +23328,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_9set_args(P return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8set_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10set_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -22891,14 +23338,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8set_args(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_args", 0); - /* "dependency_injector/providers.pyx":1107 + /* "dependency_injector/providers.pyx":1128 * :return: Reference ``self`` * """ * self.__args = parse_positional_injections(args) # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1107, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -22906,7 +23353,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8set_args(s __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1108 + /* "dependency_injector/providers.pyx":1129 * """ * self.__args = parse_positional_injections(args) * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -22917,13 +23364,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8set_args(s __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 1108, __pyx_L1_error) + __PYX_ERR(1, 1129, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1108, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":1109 + /* "dependency_injector/providers.pyx":1130 * self.__args = parse_positional_injections(args) * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -22935,7 +23382,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8set_args(s __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1100 + /* "dependency_injector/providers.pyx":1121 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -22954,7 +23401,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8set_args(s return __pyx_r; } -/* "dependency_injector/providers.pyx":1111 +/* "dependency_injector/providers.pyx":1132 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -22963,20 +23410,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8set_args(s */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Callable_10clear_args[] = "Drop positional argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_13clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Callable_12clear_args[] = "Drop positional argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_13clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_args (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_10clear_args(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_12clear_args(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10clear_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12clear_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -22986,14 +23433,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10clear_arg int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_args", 0); - /* "dependency_injector/providers.pyx":1116 + /* "dependency_injector/providers.pyx":1137 * :return: Reference ``self`` * """ * self.__args = tuple() # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1116, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -23001,7 +23448,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10clear_arg __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1117 + /* "dependency_injector/providers.pyx":1138 * """ * self.__args = tuple() * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -23012,13 +23459,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10clear_arg __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 1117, __pyx_L1_error) + __PYX_ERR(1, 1138, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1117, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":1118 + /* "dependency_injector/providers.pyx":1139 * self.__args = tuple() * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -23030,7 +23477,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10clear_arg __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1111 + /* "dependency_injector/providers.pyx":1132 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -23049,7 +23496,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10clear_arg return __pyx_r; } -/* "dependency_injector/providers.pyx":1121 +/* "dependency_injector/providers.pyx":1142 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -23085,19 +23532,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___g int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1127 + /* "dependency_injector/providers.pyx":1148 * cdef dict kwargs * * kwargs = dict() # <<<<<<<<<<<<<< * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1127, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1128 + /* "dependency_injector/providers.pyx":1149 * * kwargs = dict() * for index in range(self.__kwargs_len): # <<<<<<<<<<<<<< @@ -23109,7 +23556,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___g for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pyx":1129 + /* "dependency_injector/providers.pyx":1150 * kwargs = dict() * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] # <<<<<<<<<<<<<< @@ -23118,15 +23565,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___g */ if (unlikely(__pyx_v_self->__pyx___kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 1129, __pyx_L1_error) + __PYX_ERR(1, 1150, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1129, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 1129, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 1150, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_kwarg, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1130 + /* "dependency_injector/providers.pyx":1151 * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] * kwargs[kwarg.__name] = kwarg.__value # <<<<<<<<<<<<<< @@ -23135,11 +23582,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___g */ __pyx_t_1 = __pyx_v_kwarg->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_1); - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 1130, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 1151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":1131 + /* "dependency_injector/providers.pyx":1152 * kwarg = self.__kwargs[index] * kwargs[kwarg.__name] = kwarg.__value * return kwargs # <<<<<<<<<<<<<< @@ -23151,7 +23598,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___g __pyx_r = __pyx_v_kwargs; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1121 + /* "dependency_injector/providers.pyx":1142 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -23172,7 +23619,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___g return __pyx_r; } -/* "dependency_injector/providers.pyx":1133 +/* "dependency_injector/providers.pyx":1154 * return kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -23181,9 +23628,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___g */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Callable_12add_kwargs[] = "Add keyword argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_15add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Callable_14add_kwargs[] = "Add keyword argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_15add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -23193,7 +23640,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_13add_kwarg if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_kwargs", 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_r = __pyx_pf_19dependency_injector_9providers_8Callable_12add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_14add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -23201,7 +23648,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_13add_kwarg return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -23212,16 +23659,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12add_kwarg int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_kwargs", 0); - /* "dependency_injector/providers.pyx":1138 + /* "dependency_injector/providers.pyx":1159 * :return: Reference ``self`` * """ * self.__kwargs += parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1138, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1138, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -23230,7 +23677,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12add_kwarg __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1139 + /* "dependency_injector/providers.pyx":1160 * """ * self.__kwargs += parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -23241,13 +23688,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12add_kwarg __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 1139, __pyx_L1_error) + __PYX_ERR(1, 1160, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1139, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_3; - /* "dependency_injector/providers.pyx":1140 + /* "dependency_injector/providers.pyx":1161 * self.__kwargs += parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) * return self # <<<<<<<<<<<<<< @@ -23259,7 +23706,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12add_kwarg __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1133 + /* "dependency_injector/providers.pyx":1154 * return kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -23279,7 +23726,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12add_kwarg return __pyx_r; } -/* "dependency_injector/providers.pyx":1142 +/* "dependency_injector/providers.pyx":1163 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -23288,9 +23735,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12add_kwarg */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Callable_14set_kwargs[] = "Set keyword argument injections.\n\n Existing keyword argument injections are dropped.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_17set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Callable_16set_kwargs[] = "Set keyword argument injections.\n\n Existing keyword argument injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_17set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -23300,7 +23747,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_15set_kwarg if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_kwargs", 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_r = __pyx_pf_19dependency_injector_9providers_8Callable_14set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_16set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -23308,7 +23755,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_15set_kwarg return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -23318,14 +23765,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14set_kwarg int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_kwargs", 0); - /* "dependency_injector/providers.pyx":1149 + /* "dependency_injector/providers.pyx":1170 * :return: Reference ``self`` * """ * self.__kwargs = parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1149, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -23333,7 +23780,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14set_kwarg __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1150 + /* "dependency_injector/providers.pyx":1171 * """ * self.__kwargs = parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -23344,13 +23791,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14set_kwarg __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 1150, __pyx_L1_error) + __PYX_ERR(1, 1171, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1150, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":1151 + /* "dependency_injector/providers.pyx":1172 * self.__kwargs = parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) * return self # <<<<<<<<<<<<<< @@ -23362,7 +23809,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14set_kwarg __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1142 + /* "dependency_injector/providers.pyx":1163 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -23381,7 +23828,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14set_kwarg return __pyx_r; } -/* "dependency_injector/providers.pyx":1153 +/* "dependency_injector/providers.pyx":1174 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -23390,20 +23837,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14set_kwarg */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Callable_16clear_kwargs[] = "Drop keyword argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Callable_18clear_kwargs[] = "Drop keyword argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_kwargs (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_18clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_18clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -23413,14 +23860,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_kwargs", 0); - /* "dependency_injector/providers.pyx":1158 + /* "dependency_injector/providers.pyx":1179 * :return: Reference ``self`` * """ * self.__kwargs = tuple() # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * return self */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1158, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -23428,7 +23875,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwa __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1159 + /* "dependency_injector/providers.pyx":1180 * """ * self.__kwargs = tuple() * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -23439,13 +23886,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwa __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 1159, __pyx_L1_error) + __PYX_ERR(1, 1180, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1159, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":1160 + /* "dependency_injector/providers.pyx":1181 * self.__kwargs = tuple() * self.__kwargs_len = len(self.__kwargs) * return self # <<<<<<<<<<<<<< @@ -23457,7 +23904,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwa __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1153 + /* "dependency_injector/providers.pyx":1174 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -23477,7 +23924,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwa } static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":1163 +/* "dependency_injector/providers.pyx":1184 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -23510,7 +23957,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_7related___ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_5___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 1163, __pyx_L1_error) + __PYX_ERR(1, 1184, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -23518,7 +23965,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_7related___ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_8Callable_7related_2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Callable___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 1163, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_8Callable_7related_2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Callable___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 1184, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -23558,25 +24005,25 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1163, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1184, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1165 + /* "dependency_injector/providers.pyx":1186 * def related(self): * """Return related providers generator.""" * yield from filter(is_provider, [self.provides]) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1165, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1165, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1165, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1165, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -23584,7 +24031,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1165, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_3); @@ -23598,27 +24045,27 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1165, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1186, __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(1, 1165, __pyx_L1_error) + else __PYX_ERR(1, 1186, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":1166 + /* "dependency_injector/providers.pyx":1187 * """Return related providers generator.""" * yield from filter(is_provider, [self.provides]) * yield from filter(is_provider, self.args) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.kwargs.values()) * yield from super().related */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1166, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1166, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1166, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -23626,7 +24073,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1166, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); @@ -23640,27 +24087,27 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1166, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1187, __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(1, 1166, __pyx_L1_error) + else __PYX_ERR(1, 1187, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":1167 + /* "dependency_injector/providers.pyx":1188 * yield from filter(is_provider, [self.provides]) * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) # <<<<<<<<<<<<<< * yield from super().related * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1167, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1167, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1167, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -23675,10 +24122,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1167, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1167, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -23686,7 +24133,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1167, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -23700,23 +24147,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L6_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1167, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1188, __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(1, 1167, __pyx_L1_error) + else __PYX_ERR(1, 1188, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":1168 + /* "dependency_injector/providers.pyx":1189 * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1168, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); @@ -23724,10 +24171,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1168, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1168, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -23741,17 +24188,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g __pyx_generator->resume_label = 4; return __pyx_r; __pyx_L7_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1168, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1189, __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(1, 1168, __pyx_L1_error) + else __PYX_ERR(1, 1189, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":1163 + /* "dependency_injector/providers.pyx":1184 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -23779,7 +24226,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g return __pyx_r; } -/* "dependency_injector/providers.pyx":1170 +/* "dependency_injector/providers.pyx":1191 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -23787,7 +24234,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Callable_7related_2g * return __callable_call(self, args, kwargs) */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_21_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_8Callable__provide(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -23810,9 +24257,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Callable__provide(str if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1170, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Callable_19_provide)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Callable_21_provide)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -23830,7 +24277,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Callable__provide(str #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1170, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1191, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -23838,13 +24285,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Callable__provide(str #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1170, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1191, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1170, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -23855,7 +24302,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Callable__provide(str __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1170, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -23878,7 +24325,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Callable__provide(str #endif } - /* "dependency_injector/providers.pyx":1172 + /* "dependency_injector/providers.pyx":1193 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" * return __callable_call(self, args, kwargs) # <<<<<<<<<<<<<< @@ -23886,13 +24333,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Callable__provide(str * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___callable_call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1172, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___callable_call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1170 + /* "dependency_injector/providers.pyx":1191 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -23916,9 +24363,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Callable__provide(str } /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Callable_18_provide[] = "Return result of provided callable's call."; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_21_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Callable_20_provide[] = "Return result of provided callable's call."; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_21_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -23950,11 +24397,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19_provide( case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1170, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1191, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1170, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1191, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -23967,15 +24414,15 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19_provide( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1170, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1191, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Callable._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1170, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1170, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_18_provide(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1191, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1191, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_20_provide(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; @@ -23986,7 +24433,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19_provide( return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_18_provide(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_20_provide(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -23995,7 +24442,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_18_provide( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Callable__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1170, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Callable__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -24019,19 +24466,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_18_provide( */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_20__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_22__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_20__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_22__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -24315,19 +24762,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_20__reduce_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_22__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_24__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_22__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_24__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -24720,7 +25167,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17DelegatedCallable_2 return __pyx_r; } -/* "dependency_injector/providers.pyx":1194 +/* "dependency_injector/providers.pyx":1215 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -24773,7 +25220,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "dependency_injector/providers.pyx":1199 + /* "dependency_injector/providers.pyx":1220 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -24784,16 +25231,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___ __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":1200 + /* "dependency_injector/providers.pyx":1221 * """ * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<< * return super().__call__(*args, **kwargs) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1200, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1200, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -24807,7 +25254,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___ } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1200, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -24823,14 +25270,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___ __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 1200, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 1200, __pyx_L1_error) + __PYX_ERR(1, 1221, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1199 + /* "dependency_injector/providers.pyx":1220 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -24839,7 +25286,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___ */ } - /* "dependency_injector/providers.pyx":1201 + /* "dependency_injector/providers.pyx":1222 * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) * return super().__call__(*args, **kwargs) # <<<<<<<<<<<<<< @@ -24847,7 +25294,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___ * def override(self, provider): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1201, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCallable)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCallable)); @@ -24855,20 +25302,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1201, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_call); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1201, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_call); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1201, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1194 + /* "dependency_injector/providers.pyx":1215 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -24891,7 +25338,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___ return __pyx_r; } -/* "dependency_injector/providers.pyx":1203 +/* "dependency_injector/providers.pyx":1224 * return super().__call__(*args, **kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -24930,7 +25377,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":1214 + /* "dependency_injector/providers.pyx":1235 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, Callable): # <<<<<<<<<<<<<< @@ -24941,24 +25388,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":1215 + /* "dependency_injector/providers.pyx":1236 * """ * if not isinstance(provider, Callable): * raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<< * '{1} providers'.format(self, Callable)) * return super(AbstractCallable, self).override(provider) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1215, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":1216 + /* "dependency_injector/providers.pyx":1237 * if not isinstance(provider, Callable): * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, Callable)) # <<<<<<<<<<<<<< * return super(AbstractCallable, self).override(provider) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1216, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -24975,7 +25422,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1216, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1237, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -24983,13 +25430,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1216, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1237, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1216, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -25000,7 +25447,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1216, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -25018,14 +25465,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 1215, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 1215, __pyx_L1_error) + __PYX_ERR(1, 1236, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1214 + /* "dependency_injector/providers.pyx":1235 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, Callable): # <<<<<<<<<<<<<< @@ -25034,7 +25481,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o */ } - /* "dependency_injector/providers.pyx":1217 + /* "dependency_injector/providers.pyx":1238 * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, Callable)) * return super(AbstractCallable, self).override(provider) # <<<<<<<<<<<<<< @@ -25042,7 +25489,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o * cpdef object _provide(self, tuple args, dict kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1217, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCallable)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCallable)); @@ -25050,10 +25497,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1217, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1217, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -25068,14 +25515,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1217, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1203 + /* "dependency_injector/providers.pyx":1224 * return super().__call__(*args, **kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -25099,7 +25546,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2o return __pyx_r; } -/* "dependency_injector/providers.pyx":1219 +/* "dependency_injector/providers.pyx":1240 * return super(AbstractCallable, self).override(provider) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -25130,7 +25577,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16AbstractCallable__pr if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1219, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_16AbstractCallable_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -25150,7 +25597,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16AbstractCallable__pr #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1219, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1240, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -25158,13 +25605,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16AbstractCallable__pr #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1219, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1240, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1219, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -25175,7 +25622,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16AbstractCallable__pr __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1219, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -25198,20 +25645,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16AbstractCallable__pr #endif } - /* "dependency_injector/providers.pyx":1221 + /* "dependency_injector/providers.pyx":1242 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" * raise NotImplementedError('Abstract provider forward providing logic ' # <<<<<<<<<<<<<< * 'to overriding provider') * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1221, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1221, __pyx_L1_error) + __PYX_ERR(1, 1242, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1219 + /* "dependency_injector/providers.pyx":1240 * return super(AbstractCallable, self).override(provider) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -25269,11 +25716,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_5_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1219, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1240, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1219, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1240, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -25286,14 +25733,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_5_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1219, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1240, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.AbstractCallable._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1219, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1219, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1240, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1240, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_16AbstractCallable_4_provide(((struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -25314,7 +25761,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_4_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_16AbstractCallable__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1219, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_16AbstractCallable__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -25685,7 +26132,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_8_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1235 +/* "dependency_injector/providers.pyx":1256 * """ * * def __init__(self, callable): # <<<<<<<<<<<<<< @@ -25726,7 +26173,7 @@ static int __pyx_pw_19dependency_injector_9providers_16CallableDelegate_1__init_ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1235, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1256, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -25737,7 +26184,7 @@ static int __pyx_pw_19dependency_injector_9providers_16CallableDelegate_1__init_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1235, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1256, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.CallableDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -25768,7 +26215,7 @@ static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1241 + /* "dependency_injector/providers.pyx":1262 * :type callable: object * """ * if isinstance(callable, Callable) is False: # <<<<<<<<<<<<<< @@ -25779,26 +26226,26 @@ static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__ __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":1242 + /* "dependency_injector/providers.pyx":1263 * """ * if isinstance(callable, Callable) is False: * raise Error('{0} can wrap only {1} providers'.format( # <<<<<<<<<<<<<< * self.__class__, Callable)) * super(CallableDelegate, self).__init__(callable) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1242, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1242, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "dependency_injector/providers.pyx":1243 + /* "dependency_injector/providers.pyx":1264 * if isinstance(callable, Callable) is False: * raise Error('{0} can wrap only {1} providers'.format( * self.__class__, Callable)) # <<<<<<<<<<<<<< * super(CallableDelegate, self).__init__(callable) * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1243, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -25815,7 +26262,7 @@ static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1242, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1263, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -25824,14 +26271,14 @@ static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1242, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1263, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1242, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -25842,7 +26289,7 @@ static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__ __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); __pyx_t_7 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1242, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -25860,14 +26307,14 @@ static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__ __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 1242, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 1242, __pyx_L1_error) + __PYX_ERR(1, 1263, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1241 + /* "dependency_injector/providers.pyx":1262 * :type callable: object * """ * if isinstance(callable, Callable) is False: # <<<<<<<<<<<<<< @@ -25876,14 +26323,14 @@ static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__ */ } - /* "dependency_injector/providers.pyx":1244 + /* "dependency_injector/providers.pyx":1265 * raise Error('{0} can wrap only {1} providers'.format( * self.__class__, Callable)) * super(CallableDelegate, self).__init__(callable) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1244, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_CallableDelegate)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_CallableDelegate)); @@ -25891,10 +26338,10 @@ static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1244, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1244, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -25909,12 +26356,12 @@ static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__ } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_callable) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_callable); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1244, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1235 + /* "dependency_injector/providers.pyx":1256 * """ * * def __init__(self, callable): # <<<<<<<<<<<<<< @@ -26262,131 +26709,68 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16CallableDelegate_4_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1273 +/* "dependency_injector/providers.pyx":1294 * _is_coroutine = _is_coroutine_marker * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< - * """Initializer. - * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * if not asyncio: */ /* Python wrapper */ -static int __pyx_pw_19dependency_injector_9providers_9Coroutine_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_9Coroutine___init__[] = "Initializer.\n\n :param provides: Wrapped callable.\n :type provides: callable\n "; -#if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_9Coroutine___init__; -#endif -static int __pyx_pw_19dependency_injector_9providers_9Coroutine_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_provides = 0; - PyObject *__pyx_v_args = 0; - PyObject *__pyx_v_kwargs = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - int __pyx_r; +static PyObject *__pyx_pw_19dependency_injector_9providers_9Coroutine_1set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_9Coroutine_set_provides[] = "Set provider's provides."; +static PyObject *__pyx_pw_19dependency_injector_9providers_9Coroutine_1set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); - __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1; - __Pyx_GOTREF(__pyx_v_kwargs); - if (PyTuple_GET_SIZE(__pyx_args) > 1) { - __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); - if (unlikely(!__pyx_v_args)) { - __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; - __Pyx_RefNannyFinishContext(); - return -1; - } - __Pyx_GOTREF(__pyx_v_args); - } else { - __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); - } - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; - PyObject* values[1] = {0}; - if (unlikely(__pyx_kwds)) { - Py_ssize_t kw_args; - const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); - switch (pos_args) { - default: - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - } - kw_args = PyDict_Size(__pyx_kwds); - switch (pos_args) { - case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1273, __pyx_L3_error) - } - } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - } - __pyx_v_provides = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1273, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; - __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; - __Pyx_AddTraceback("dependency_injector.providers.Coroutine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return -1; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_9Coroutine___init__(((struct __pyx_obj_19dependency_injector_9providers_Coroutine *)__pyx_v_self), __pyx_v_provides, __pyx_v_args, __pyx_v_kwargs); + __Pyx_RefNannySetupContext("set_provides (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_9Coroutine_set_provides(((struct __pyx_obj_19dependency_injector_9providers_Coroutine *)__pyx_v_self), ((PyObject *)__pyx_v_provides)); /* function exit code */ - __Pyx_XDECREF(__pyx_v_args); - __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_19dependency_injector_9providers_9Coroutine___init__(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { - int __pyx_r; +static PyObject *__pyx_pf_19dependency_injector_9providers_9Coroutine_set_provides(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_UCS4 __pyx_t_8; PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; + PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_RefNannySetupContext("set_provides", 0); - /* "dependency_injector/providers.pyx":1279 - * :type provides: callable - * """ + /* "dependency_injector/providers.pyx":1296 + * def set_provides(self, provides): + * """Set provider's provides.""" * if not asyncio: # <<<<<<<<<<<<<< * raise Error('Package asyncio is not available') - * + * if provides and not asyncio.iscoroutinefunction(provides): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1279, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1279, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":1280 - * """ + /* "dependency_injector/providers.pyx":1297 + * """Set provider's provides.""" * if not asyncio: * raise Error('Package asyncio is not available') # <<<<<<<<<<<<<< - * - * if not asyncio.iscoroutinefunction(provides): + * if provides and not asyncio.iscoroutinefunction(provides): + * raise Error(f'Provider {_class_qualname(self)} expected to get coroutine function, ' */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1280, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -26400,32 +26784,38 @@ static int __pyx_pf_19dependency_injector_9providers_9Coroutine___init__(struct } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Package_asyncio_is_not_available) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Package_asyncio_is_not_available); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1280, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1280, __pyx_L1_error) + __PYX_ERR(1, 1297, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1279 - * :type provides: callable - * """ + /* "dependency_injector/providers.pyx":1296 + * def set_provides(self, provides): + * """Set provider's provides.""" * if not asyncio: # <<<<<<<<<<<<<< * raise Error('Package asyncio is not available') - * + * if provides and not asyncio.iscoroutinefunction(provides): */ } - /* "dependency_injector/providers.pyx":1282 + /* "dependency_injector/providers.pyx":1298 + * if not asyncio: * raise Error('Package asyncio is not available') - * - * if not asyncio.iscoroutinefunction(provides): # <<<<<<<<<<<<<< - * raise Error('Provider {0} expected to get coroutine function, ' - * 'got {1}'.format('.'.join((self.__class__.__module__, + * if provides and not asyncio.iscoroutinefunction(provides): # <<<<<<<<<<<<<< + * raise Error(f'Provider {_class_qualname(self)} expected to get coroutine function, ' + * f'got {provides} instead') */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1282, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_provides); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1298, __pyx_L1_error) + if (__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1282, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -26440,211 +26830,166 @@ static int __pyx_pf_19dependency_injector_9providers_9Coroutine___init__(struct } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_provides); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1282, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1282, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1298, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = ((!__pyx_t_3) != 0); - if (unlikely(__pyx_t_2)) { + __pyx_t_6 = ((!__pyx_t_2) != 0); + __pyx_t_3 = __pyx_t_6; + __pyx_L5_bool_binop_done:; + if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":1283 - * - * if not asyncio.iscoroutinefunction(provides): - * raise Error('Provider {0} expected to get coroutine function, ' # <<<<<<<<<<<<<< - * 'got {1}'.format('.'.join((self.__class__.__module__, - * self.__class__.__name__)), + /* "dependency_injector/providers.pyx":1299 + * raise Error('Package asyncio is not available') + * if provides and not asyncio.iscoroutinefunction(provides): + * raise Error(f'Provider {_class_qualname(self)} expected to get coroutine function, ' # <<<<<<<<<<<<<< + * f'got {provides} instead') + * return super().set_provides(provides) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1283, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - - /* "dependency_injector/providers.pyx":1284 - * if not asyncio.iscoroutinefunction(provides): - * raise Error('Provider {0} expected to get coroutine function, ' - * 'got {1}'.format('.'.join((self.__class__.__module__, # <<<<<<<<<<<<<< - * self.__class__.__name__)), - * provides)) - */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provider_0_expected_to_get_corou, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_module); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "dependency_injector/providers.pyx":1285 - * raise Error('Provider {0} expected to get coroutine function, ' - * 'got {1}'.format('.'.join((self.__class__.__module__, - * self.__class__.__name__)), # <<<<<<<<<<<<<< - * provides)) - * - */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1285, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = 0; + __pyx_t_8 = 127; + __Pyx_INCREF(__pyx_kp_u_Provider_2); + __pyx_t_7 += 9; + __Pyx_GIVEREF(__pyx_kp_u_Provider_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Provider_2); + __pyx_t_9 = __pyx_f_19dependency_injector_9providers__class_qualname(((PyObject *)__pyx_v_self), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "dependency_injector/providers.pyx":1284 - * if not asyncio.iscoroutinefunction(provides): - * raise Error('Provider {0} expected to get coroutine function, ' - * 'got {1}'.format('.'.join((self.__class__.__module__, # <<<<<<<<<<<<<< - * self.__class__.__name__)), - * provides)) - */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); - __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9); - __pyx_t_8 = 0; - __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "dependency_injector/providers.pyx":1286 - * 'got {1}'.format('.'.join((self.__class__.__module__, - * self.__class__.__name__)), - * provides)) # <<<<<<<<<<<<<< - * - * super(Coroutine, self).__init__(provides, *args, **kwargs) - */ - __pyx_t_7 = NULL; + __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_8; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10); __pyx_t_10 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_10 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_provides}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1284, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_provides}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1284, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (__pyx_t_7) { - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; - } - __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_t_9); - __Pyx_INCREF(__pyx_v_provides); - __Pyx_GIVEREF(__pyx_v_provides); - PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_provides); - __pyx_t_9 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1284, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_kp_u_expected_to_get_coroutine_funct); + __pyx_t_7 += 41; + __Pyx_GIVEREF(__pyx_kp_u_expected_to_get_coroutine_funct); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_expected_to_get_coroutine_funct); + + /* "dependency_injector/providers.pyx":1300 + * if provides and not asyncio.iscoroutinefunction(provides): + * raise Error(f'Provider {_class_qualname(self)} expected to get coroutine function, ' + * f'got {provides} instead') # <<<<<<<<<<<<<< + * return super().set_provides(provides) + * + */ + __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_provides, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_8; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u_instead); + __pyx_t_7 += 8; + __Pyx_GIVEREF(__pyx_kp_u_instead); + PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u_instead); + + /* "dependency_injector/providers.pyx":1299 + * raise Error('Package asyncio is not available') + * if provides and not asyncio.iscoroutinefunction(provides): + * raise Error(f'Provider {_class_qualname(self)} expected to get coroutine function, ' # <<<<<<<<<<<<<< + * f'got {provides} instead') + * return super().set_provides(provides) + */ + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } - __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1283, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1283, __pyx_L1_error) + __PYX_ERR(1, 1299, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1282 + /* "dependency_injector/providers.pyx":1298 + * if not asyncio: * raise Error('Package asyncio is not available') - * - * if not asyncio.iscoroutinefunction(provides): # <<<<<<<<<<<<<< - * raise Error('Provider {0} expected to get coroutine function, ' - * 'got {1}'.format('.'.join((self.__class__.__module__, + * if provides and not asyncio.iscoroutinefunction(provides): # <<<<<<<<<<<<<< + * raise Error(f'Provider {_class_qualname(self)} expected to get coroutine function, ' + * f'got {provides} instead') */ } - /* "dependency_injector/providers.pyx":1288 - * provides)) - * - * super(Coroutine, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":1301 + * raise Error(f'Provider {_class_qualname(self)} expected to get coroutine function, ' + * f'got {provides} instead') + * return super().set_provides(provides) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1288, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1288, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_10, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_v_provides); - __Pyx_GIVEREF(__pyx_v_provides); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_provides); - __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_v_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "dependency_injector/providers.pyx":1273 + /* "dependency_injector/providers.pyx":1294 * _is_coroutine = _is_coroutine_marker * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< - * """Initializer. - * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * if not asyncio: */ /* function exit code */ - __pyx_r = 0; - goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("dependency_injector.providers.Coroutine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("dependency_injector.providers.Coroutine.set_provides", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -27357,7 +27702,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedCoroutine_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1310 +/* "dependency_injector/providers.pyx":1323 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -27410,7 +27755,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "dependency_injector/providers.pyx":1315 + /* "dependency_injector/providers.pyx":1328 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -27421,16 +27766,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine__ __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":1316 + /* "dependency_injector/providers.pyx":1329 * """ * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<< * return super().__call__(*args, **kwargs) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1316, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1316, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -27444,7 +27789,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine__ } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1316, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -27460,14 +27805,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine__ __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 1316, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 1316, __pyx_L1_error) + __PYX_ERR(1, 1329, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1315 + /* "dependency_injector/providers.pyx":1328 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -27476,7 +27821,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine__ */ } - /* "dependency_injector/providers.pyx":1317 + /* "dependency_injector/providers.pyx":1330 * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) * return super().__call__(*args, **kwargs) # <<<<<<<<<<<<<< @@ -27484,7 +27829,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine__ * def override(self, provider): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1317, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine)); @@ -27492,20 +27837,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine__ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1317, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_call); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1317, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_call); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1317, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1310 + /* "dependency_injector/providers.pyx":1323 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -27528,7 +27873,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine__ return __pyx_r; } -/* "dependency_injector/providers.pyx":1319 +/* "dependency_injector/providers.pyx":1332 * return super().__call__(*args, **kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -27567,7 +27912,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":1330 + /* "dependency_injector/providers.pyx":1343 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, Coroutine): # <<<<<<<<<<<<<< @@ -27578,24 +27923,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":1331 + /* "dependency_injector/providers.pyx":1344 * """ * if not isinstance(provider, Coroutine): * raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<< * '{1} providers'.format(self, Coroutine)) * return super(AbstractCoroutine, self).override(provider) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1331, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":1332 + /* "dependency_injector/providers.pyx":1345 * if not isinstance(provider, Coroutine): * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, Coroutine)) # <<<<<<<<<<<<<< * return super(AbstractCoroutine, self).override(provider) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1332, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -27612,7 +27957,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1332, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1345, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -27620,13 +27965,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1332, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1345, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1332, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -27637,7 +27982,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1332, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -27655,14 +28000,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 1331, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 1331, __pyx_L1_error) + __PYX_ERR(1, 1344, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1330 + /* "dependency_injector/providers.pyx":1343 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, Coroutine): # <<<<<<<<<<<<<< @@ -27671,7 +28016,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 */ } - /* "dependency_injector/providers.pyx":1333 + /* "dependency_injector/providers.pyx":1346 * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, Coroutine)) * return super(AbstractCoroutine, self).override(provider) # <<<<<<<<<<<<<< @@ -27679,7 +28024,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 * cpdef object _provide(self, tuple args, dict kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1333, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine)); @@ -27687,10 +28032,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1333, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1333, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -27705,14 +28050,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1333, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1319 + /* "dependency_injector/providers.pyx":1332 * return super().__call__(*args, **kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -27736,7 +28081,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2 return __pyx_r; } -/* "dependency_injector/providers.pyx":1335 +/* "dependency_injector/providers.pyx":1348 * return super(AbstractCoroutine, self).override(provider) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -27767,7 +28112,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_17AbstractCoroutine__p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1335, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -27787,7 +28132,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_17AbstractCoroutine__p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1335, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -27795,13 +28140,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_17AbstractCoroutine__p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1335, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1335, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -27812,7 +28157,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_17AbstractCoroutine__p __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1335, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -27835,20 +28180,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_17AbstractCoroutine__p #endif } - /* "dependency_injector/providers.pyx":1337 + /* "dependency_injector/providers.pyx":1350 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" * raise NotImplementedError('Abstract provider forward providing logic ' # <<<<<<<<<<<<<< * 'to overriding provider') * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1337, __pyx_L1_error) + __PYX_ERR(1, 1350, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1335 + /* "dependency_injector/providers.pyx":1348 * return super(AbstractCoroutine, self).override(provider) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -27906,11 +28251,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_5 case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1335, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1348, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1335, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1348, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -27923,14 +28268,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_5 } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1335, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1348, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.AbstractCoroutine._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1335, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1335, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1348, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1348, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_4_provide(((struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -27951,7 +28296,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_17AbstractCoroutine__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1335, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_17AbstractCoroutine__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28322,7 +28667,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_8 return __pyx_r; } -/* "dependency_injector/providers.pyx":1351 +/* "dependency_injector/providers.pyx":1364 * """ * * def __init__(self, coroutine): # <<<<<<<<<<<<<< @@ -28363,7 +28708,7 @@ static int __pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_1__init else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1351, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1364, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -28374,7 +28719,7 @@ static int __pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_1__init } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1351, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1364, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.CoroutineDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -28405,7 +28750,7 @@ static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1357 + /* "dependency_injector/providers.pyx":1370 * :type coroutine: object * """ * if isinstance(coroutine, Coroutine) is False: # <<<<<<<<<<<<<< @@ -28416,26 +28761,26 @@ static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init_ __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":1358 + /* "dependency_injector/providers.pyx":1371 * """ * if isinstance(coroutine, Coroutine) is False: * raise Error('{0} can wrap only {1} providers'.format( # <<<<<<<<<<<<<< * self.__class__, Callable)) * super(CoroutineDelegate, self).__init__(coroutine) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1358, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1358, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "dependency_injector/providers.pyx":1359 + /* "dependency_injector/providers.pyx":1372 * if isinstance(coroutine, Coroutine) is False: * raise Error('{0} can wrap only {1} providers'.format( * self.__class__, Callable)) # <<<<<<<<<<<<<< * super(CoroutineDelegate, self).__init__(coroutine) * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1359, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -28452,7 +28797,7 @@ static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1358, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -28461,14 +28806,14 @@ static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1358, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1358, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -28479,7 +28824,7 @@ static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init_ __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); __pyx_t_7 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1358, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -28497,14 +28842,14 @@ static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init_ __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 1358, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 1358, __pyx_L1_error) + __PYX_ERR(1, 1371, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1357 + /* "dependency_injector/providers.pyx":1370 * :type coroutine: object * """ * if isinstance(coroutine, Coroutine) is False: # <<<<<<<<<<<<<< @@ -28513,14 +28858,14 @@ static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init_ */ } - /* "dependency_injector/providers.pyx":1360 + /* "dependency_injector/providers.pyx":1373 * raise Error('{0} can wrap only {1} providers'.format( * self.__class__, Callable)) * super(CoroutineDelegate, self).__init__(coroutine) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1360, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate)); @@ -28528,10 +28873,10 @@ static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init_ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1360, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1360, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -28546,12 +28891,12 @@ static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init_ } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_coroutine) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_coroutine); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1360, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1351 + /* "dependency_injector/providers.pyx":1364 * """ * * def __init__(self, coroutine): # <<<<<<<<<<<<<< @@ -28899,7 +29244,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17CoroutineDelegate_4 return __pyx_r; } -/* "dependency_injector/providers.pyx":1370 +/* "dependency_injector/providers.pyx":1383 * """ * * def __init__(self, name, Configuration root, required=False): # <<<<<<<<<<<<<< @@ -28945,7 +29290,7 @@ static int __pyx_pw_19dependency_injector_9providers_19ConfigurationOption_1__in case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(1, 1370, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(1, 1383, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -28955,7 +29300,7 @@ static int __pyx_pw_19dependency_injector_9providers_19ConfigurationOption_1__in } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1370, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1383, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -28973,13 +29318,13 @@ static int __pyx_pw_19dependency_injector_9providers_19ConfigurationOption_1__in } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1370, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1383, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_19dependency_injector_9providers_Configuration, 1, "root", 0))) __PYX_ERR(1, 1370, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_19dependency_injector_9providers_Configuration, 1, "root", 0))) __PYX_ERR(1, 1383, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_19ConfigurationOption___init__(((struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption *)__pyx_v_self), __pyx_v_name, __pyx_v_root, __pyx_v_required); /* function exit code */ @@ -29003,14 +29348,14 @@ static int __pyx_pf_19dependency_injector_9providers_19ConfigurationOption___ini int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1371 + /* "dependency_injector/providers.pyx":1384 * * def __init__(self, name, Configuration root, required=False): * self.__name = name # <<<<<<<<<<<<<< * self.__root = root * self.__children = {} */ - if (!(likely(PyTuple_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 1371, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 1384, __pyx_L1_error) __pyx_t_1 = __pyx_v_name; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -29019,7 +29364,7 @@ static int __pyx_pf_19dependency_injector_9providers_19ConfigurationOption___ini __pyx_v_self->__pyx___name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1372 + /* "dependency_injector/providers.pyx":1385 * def __init__(self, name, Configuration root, required=False): * self.__name = name * self.__root = root # <<<<<<<<<<<<<< @@ -29032,14 +29377,14 @@ static int __pyx_pf_19dependency_injector_9providers_19ConfigurationOption___ini __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___root)); __pyx_v_self->__pyx___root = __pyx_v_root; - /* "dependency_injector/providers.pyx":1373 + /* "dependency_injector/providers.pyx":1386 * self.__name = name * self.__root = root * self.__children = {} # <<<<<<<<<<<<<< * self.__required = required * self.__cache = UNDEFINED */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1373, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___children); @@ -29047,24 +29392,24 @@ static int __pyx_pf_19dependency_injector_9providers_19ConfigurationOption___ini __pyx_v_self->__pyx___children = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1374 + /* "dependency_injector/providers.pyx":1387 * self.__root = root * self.__children = {} * self.__required = required # <<<<<<<<<<<<<< * self.__cache = UNDEFINED * super().__init__() */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_required); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1374, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_required); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1387, __pyx_L1_error) __pyx_v_self->__pyx___required = __pyx_t_2; - /* "dependency_injector/providers.pyx":1375 + /* "dependency_injector/providers.pyx":1388 * self.__children = {} * self.__required = required * self.__cache = UNDEFINED # <<<<<<<<<<<<<< * super().__init__() * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1375, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___cache); @@ -29072,14 +29417,14 @@ static int __pyx_pf_19dependency_injector_9providers_19ConfigurationOption___ini __pyx_v_self->__pyx___cache = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1376 + /* "dependency_injector/providers.pyx":1389 * self.__required = required * self.__cache = UNDEFINED * super().__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1376, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption)); @@ -29087,10 +29432,10 @@ static int __pyx_pf_19dependency_injector_9providers_19ConfigurationOption___ini __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1376, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1376, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -29105,12 +29450,12 @@ static int __pyx_pf_19dependency_injector_9providers_19ConfigurationOption___ini } __pyx_t_1 = (__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_1)) __PYX_ERR(1, 1376, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1370 + /* "dependency_injector/providers.pyx":1383 * """ * * def __init__(self, name, Configuration root, required=False): # <<<<<<<<<<<<<< @@ -29132,7 +29477,7 @@ static int __pyx_pf_19dependency_injector_9providers_19ConfigurationOption___ini return __pyx_r; } -/* "dependency_injector/providers.pyx":1378 +/* "dependency_injector/providers.pyx":1391 * super().__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -29173,16 +29518,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":1381 + /* "dependency_injector/providers.pyx":1394 * cdef ConfigurationOption copied * * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1381, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1381, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -29197,14 +29542,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1381, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_ConfigurationOption))))) __PYX_ERR(1, 1381, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_ConfigurationOption))))) __PYX_ERR(1, 1394, __pyx_L1_error) __pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption *)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1382 + /* "dependency_injector/providers.pyx":1395 * * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -29215,7 +29560,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":1383 + /* "dependency_injector/providers.pyx":1396 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -29227,7 +29572,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_r = ((PyObject *)__pyx_v_copied); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1382 + /* "dependency_injector/providers.pyx":1395 * * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -29236,7 +29581,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1385 + /* "dependency_injector/providers.pyx":1398 * return copied * * copied_name = deepcopy(self.__name, memo) # <<<<<<<<<<<<<< @@ -29245,16 +29590,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ __pyx_t_1 = __pyx_v_self->__pyx___name; __Pyx_INCREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1385, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1398, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1385, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_copied_name = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1386 + /* "dependency_injector/providers.pyx":1399 * * copied_name = deepcopy(self.__name, memo) * copied_root = deepcopy(self.__root, memo) # <<<<<<<<<<<<<< @@ -29263,25 +29608,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx___root); __Pyx_INCREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1386, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1399, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1386, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied_root = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1388 + /* "dependency_injector/providers.pyx":1401 * copied_root = deepcopy(self.__root, memo) * * copied = self.__class__(copied_name, copied_root, self.__required) # <<<<<<<<<<<<<< * copied.__children = deepcopy(self.__children, memo) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1388, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___required); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1388, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___required); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_8 = 0; @@ -29298,7 +29643,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_copied_name, __pyx_v_copied_root, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1388, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1401, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -29307,14 +29652,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_copied_name, __pyx_v_copied_root, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1388, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1401, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1388, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -29328,16 +29673,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1388, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_ConfigurationOption))))) __PYX_ERR(1, 1388, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_ConfigurationOption))))) __PYX_ERR(1, 1401, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_copied, ((struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1389 + /* "dependency_injector/providers.pyx":1402 * * copied = self.__class__(copied_name, copied_root, self.__required) * copied.__children = deepcopy(self.__children, memo) # <<<<<<<<<<<<<< @@ -29346,20 +29691,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ __pyx_t_1 = __pyx_v_self->__pyx___children; __Pyx_INCREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1389, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1402, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1389, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 1389, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 1402, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_copied->__pyx___children); __Pyx_DECREF(__pyx_v_copied->__pyx___children); __pyx_v_copied->__pyx___children = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1391 + /* "dependency_injector/providers.pyx":1404 * copied.__children = deepcopy(self.__children, memo) * * return copied # <<<<<<<<<<<<<< @@ -29371,7 +29716,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_r = ((PyObject *)__pyx_v_copied); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1378 + /* "dependency_injector/providers.pyx":1391 * super().__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -29397,7 +29742,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1393 +/* "dependency_injector/providers.pyx":1406 * return copied * * def __enter__(self): # <<<<<<<<<<<<<< @@ -29423,7 +29768,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "dependency_injector/providers.pyx":1394 + /* "dependency_injector/providers.pyx":1407 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -29435,7 +29780,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1393 + /* "dependency_injector/providers.pyx":1406 * return copied * * def __enter__(self): # <<<<<<<<<<<<<< @@ -29450,7 +29795,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1396 +/* "dependency_injector/providers.pyx":1409 * return self * * def __exit__(self, *exc_info): # <<<<<<<<<<<<<< @@ -29488,7 +29833,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1399 +/* "dependency_injector/providers.pyx":1412 * pass * * def __str__(self): # <<<<<<<<<<<<<< @@ -29520,7 +29865,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":1400 + /* "dependency_injector/providers.pyx":1413 * * def __str__(self): * return represent_provider(provider=self, provides=self.get_name()) # <<<<<<<<<<<<<< @@ -29528,7 +29873,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * def __getattr__(self, item): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1400, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -29542,17 +29887,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1400, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1400, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1399 + /* "dependency_injector/providers.pyx":1412 * pass * * def __str__(self): # <<<<<<<<<<<<<< @@ -29573,7 +29918,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1402 +/* "dependency_injector/providers.pyx":1415 * return represent_provider(provider=self, provides=self.get_name()) * * def __getattr__(self, item): # <<<<<<<<<<<<<< @@ -29610,14 +29955,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":1403 + /* "dependency_injector/providers.pyx":1416 * * def __getattr__(self, item): * if item.startswith('__') and item.endswith('__'): # <<<<<<<<<<<<<< * raise AttributeError( * '\'{cls}\' object has no attribute ' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1403, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -29629,19 +29974,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__11); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1403, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1403, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1403, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -29653,72 +29998,72 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__11); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1403, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1403, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "dependency_injector/providers.pyx":1406 + /* "dependency_injector/providers.pyx":1419 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=item)) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1406, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1406, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1406, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1406, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 1406, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 1419, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1407 + /* "dependency_injector/providers.pyx":1420 * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, * attribute_name=item)) # <<<<<<<<<<<<<< * * child = self.__children.get(item) */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_item) < 0) __PYX_ERR(1, 1406, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_item) < 0) __PYX_ERR(1, 1419, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1406 + /* "dependency_injector/providers.pyx":1419 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=item)) * */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1406, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1404 + /* "dependency_injector/providers.pyx":1417 * def __getattr__(self, item): * if item.startswith('__') and item.endswith('__'): * raise AttributeError( # <<<<<<<<<<<<<< * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1404, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 1404, __pyx_L1_error) + __PYX_ERR(1, 1417, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1403 + /* "dependency_injector/providers.pyx":1416 * * def __getattr__(self, item): * if item.startswith('__') and item.endswith('__'): # <<<<<<<<<<<<<< @@ -29727,7 +30072,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1409 + /* "dependency_injector/providers.pyx":1422 * attribute_name=item)) * * child = self.__children.get(item) # <<<<<<<<<<<<<< @@ -29736,14 +30081,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(1, 1409, __pyx_L1_error) + __PYX_ERR(1, 1422, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_item, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1409, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_item, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_child = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1410 + /* "dependency_injector/providers.pyx":1423 * * child = self.__children.get(item) * if child is None: # <<<<<<<<<<<<<< @@ -29754,32 +30099,32 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pyx":1411 + /* "dependency_injector/providers.pyx":1424 * child = self.__children.get(item) * if child is None: * child_name = self.__name + (item,) # <<<<<<<<<<<<<< * child = ConfigurationOption(child_name, self.__root) * self.__children[item] = child */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1411, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_item); - __pyx_t_6 = PyNumber_Add(__pyx_v_self->__pyx___name, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1411, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_v_self->__pyx___name, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_child_name = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1412 + /* "dependency_injector/providers.pyx":1425 * if child is None: * child_name = self.__name + (item,) * child = ConfigurationOption(child_name, self.__root) # <<<<<<<<<<<<<< * self.__children[item] = child * return child */ - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1412, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_child_name); __Pyx_GIVEREF(__pyx_v_child_name); @@ -29787,13 +30132,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___root)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___root)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_self->__pyx___root)); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1412, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_child, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1413 + /* "dependency_injector/providers.pyx":1426 * child_name = self.__name + (item,) * child = ConfigurationOption(child_name, self.__root) * self.__children[item] = child # <<<<<<<<<<<<<< @@ -29802,11 +30147,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 1413, __pyx_L1_error) + __PYX_ERR(1, 1426, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_item, __pyx_v_child) < 0)) __PYX_ERR(1, 1413, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_item, __pyx_v_child) < 0)) __PYX_ERR(1, 1426, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1410 + /* "dependency_injector/providers.pyx":1423 * * child = self.__children.get(item) * if child is None: # <<<<<<<<<<<<<< @@ -29815,7 +30160,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1414 + /* "dependency_injector/providers.pyx":1427 * child = ConfigurationOption(child_name, self.__root) * self.__children[item] = child * return child # <<<<<<<<<<<<<< @@ -29827,7 +30172,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_r = __pyx_v_child; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1402 + /* "dependency_injector/providers.pyx":1415 * return represent_provider(provider=self, provides=self.get_name()) * * def __getattr__(self, item): # <<<<<<<<<<<<<< @@ -29851,7 +30196,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1416 +/* "dependency_injector/providers.pyx":1429 * return child * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -29886,7 +30231,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "dependency_injector/providers.pyx":1417 + /* "dependency_injector/providers.pyx":1430 * * def __getitem__(self, item): * child = self.__children.get(item) # <<<<<<<<<<<<<< @@ -29895,14 +30240,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(1, 1417, __pyx_L1_error) + __PYX_ERR(1, 1430, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_item, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1417, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_item, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_child = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1418 + /* "dependency_injector/providers.pyx":1431 * def __getitem__(self, item): * child = self.__children.get(item) * if child is None: # <<<<<<<<<<<<<< @@ -29913,32 +30258,32 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "dependency_injector/providers.pyx":1419 + /* "dependency_injector/providers.pyx":1432 * child = self.__children.get(item) * if child is None: * child_name = self.__name + (item,) # <<<<<<<<<<<<<< * child = ConfigurationOption(child_name, self.__root) * self.__children[item] = child */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1419, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_item); - __pyx_t_4 = PyNumber_Add(__pyx_v_self->__pyx___name, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1419, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_self->__pyx___name, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_child_name = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1420 + /* "dependency_injector/providers.pyx":1433 * if child is None: * child_name = self.__name + (item,) * child = ConfigurationOption(child_name, self.__root) # <<<<<<<<<<<<<< * self.__children[item] = child * return child */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1420, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_child_name); __Pyx_GIVEREF(__pyx_v_child_name); @@ -29946,13 +30291,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___root)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___root)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self->__pyx___root)); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1420, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_child, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1421 + /* "dependency_injector/providers.pyx":1434 * child_name = self.__name + (item,) * child = ConfigurationOption(child_name, self.__root) * self.__children[item] = child # <<<<<<<<<<<<<< @@ -29961,11 +30306,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 1421, __pyx_L1_error) + __PYX_ERR(1, 1434, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_item, __pyx_v_child) < 0)) __PYX_ERR(1, 1421, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_item, __pyx_v_child) < 0)) __PYX_ERR(1, 1434, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1418 + /* "dependency_injector/providers.pyx":1431 * def __getitem__(self, item): * child = self.__children.get(item) * if child is None: # <<<<<<<<<<<<<< @@ -29974,7 +30319,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1422 + /* "dependency_injector/providers.pyx":1435 * child = ConfigurationOption(child_name, self.__root) * self.__children[item] = child * return child # <<<<<<<<<<<<<< @@ -29986,7 +30331,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_r = __pyx_v_child; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1416 + /* "dependency_injector/providers.pyx":1429 * return child * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -30008,7 +30353,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1424 +/* "dependency_injector/providers.pyx":1437 * return child * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -30043,7 +30388,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1424, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_19ConfigurationOption_15_provide)) { __Pyx_XDECREF(__pyx_r); @@ -30063,7 +30408,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1437, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -30071,13 +30416,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1437, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1424, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -30088,7 +30433,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -30111,21 +30456,21 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ #endif } - /* "dependency_injector/providers.pyx":1426 + /* "dependency_injector/providers.pyx":1439 * cpdef object _provide(self, tuple args, dict kwargs): * """Return new instance.""" * if self.__cache is not UNDEFINED: # <<<<<<<<<<<<<< * return self.__cache * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1426, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (__pyx_v_self->__pyx___cache != __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "dependency_injector/providers.pyx":1427 + /* "dependency_injector/providers.pyx":1440 * """Return new instance.""" * if self.__cache is not UNDEFINED: * return self.__cache # <<<<<<<<<<<<<< @@ -30137,7 +30482,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ __pyx_r = __pyx_v_self->__pyx___cache; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1426 + /* "dependency_injector/providers.pyx":1439 * cpdef object _provide(self, tuple args, dict kwargs): * """Return new instance.""" * if self.__cache is not UNDEFINED: # <<<<<<<<<<<<<< @@ -30146,16 +30491,16 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ */ } - /* "dependency_injector/providers.pyx":1429 + /* "dependency_injector/providers.pyx":1442 * return self.__cache * * value = self.__root.get(self._get_self_name(), self.__required) # <<<<<<<<<<<<<< * self.__cache = value * return value */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___root), __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1429, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___root), __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_self_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1429, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_self_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -30169,10 +30514,10 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1429, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___required); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1429, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___required); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -30189,7 +30534,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1429, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1442, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -30199,7 +30544,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1429, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1442, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -30207,7 +30552,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1429, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -30218,7 +30563,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_5, __pyx_t_6); __pyx_t_3 = 0; __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1429, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -30226,7 +30571,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ __pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1430 + /* "dependency_injector/providers.pyx":1443 * * value = self.__root.get(self._get_self_name(), self.__required) * self.__cache = value # <<<<<<<<<<<<<< @@ -30239,7 +30584,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ __Pyx_DECREF(__pyx_v_self->__pyx___cache); __pyx_v_self->__pyx___cache = __pyx_v_value; - /* "dependency_injector/providers.pyx":1431 + /* "dependency_injector/providers.pyx":1444 * value = self.__root.get(self._get_self_name(), self.__required) * self.__cache = value * return value # <<<<<<<<<<<<<< @@ -30251,7 +30596,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ConfigurationOption_ __pyx_r = __pyx_v_value; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1424 + /* "dependency_injector/providers.pyx":1437 * return child * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -30311,11 +30656,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1424, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1437, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1424, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1437, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -30328,14 +30673,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1424, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1437, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1424, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1424, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1437, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1437, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_19ConfigurationOption_14_provide(((struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -30356,7 +30701,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_19ConfigurationOption__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1424, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_19ConfigurationOption__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -30373,7 +30718,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1433 +/* "dependency_injector/providers.pyx":1446 * return value * * def _get_self_name(self): # <<<<<<<<<<<<<< @@ -30395,7 +30740,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption_14_get_self_name_2generator21(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":1435 +/* "dependency_injector/providers.pyx":1448 * def _get_self_name(self): * return '.'.join( * segment() if is_provider(segment) else segment for segment in self.__name # <<<<<<<<<<<<<< @@ -30415,7 +30760,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_7_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 1435, __pyx_L1_error) + __PYX_ERR(1, 1448, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -30423,7 +30768,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __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_9providers_19ConfigurationOption_14_get_self_name_2generator21, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_get_self_name_locals_genexpr, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 1435, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_19ConfigurationOption_14_get_self_name_2generator21, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_get_self_name_locals_genexpr, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 1448, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -30462,19 +30807,19 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1435, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(1, 1435, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1448, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(1, 1448, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx___name == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 1435, __pyx_L1_error) + __PYX_ERR(1, 1448, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx___name; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1435, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1448, __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(1, 1435, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_segment); @@ -30495,7 +30840,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption } __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, 1435, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __pyx_t_4; @@ -30520,7 +30865,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption __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(1, 1435, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1448, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -30546,7 +30891,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1433 +/* "dependency_injector/providers.pyx":1446 * return value * * def _get_self_name(self): # <<<<<<<<<<<<<< @@ -30568,7 +30913,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_6__get_self_name *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 1433, __pyx_L1_error) + __PYX_ERR(1, 1446, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -30576,7 +30921,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "dependency_injector/providers.pyx":1434 + /* "dependency_injector/providers.pyx":1447 * * def _get_self_name(self): * return '.'.join( # <<<<<<<<<<<<<< @@ -30585,31 +30930,31 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ __Pyx_XDECREF(__pyx_r); - /* "dependency_injector/providers.pyx":1435 + /* "dependency_injector/providers.pyx":1448 * def _get_self_name(self): * return '.'.join( * segment() if is_provider(segment) else segment for segment in self.__name # <<<<<<<<<<<<<< * ) * */ - __pyx_t_1 = __pyx_pf_19dependency_injector_9providers_19ConfigurationOption_14_get_self_name_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1435, __pyx_L1_error) + __pyx_t_1 = __pyx_pf_19dependency_injector_9providers_19ConfigurationOption_14_get_self_name_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1434 + /* "dependency_injector/providers.pyx":1447 * * def _get_self_name(self): * return '.'.join( # <<<<<<<<<<<<<< * segment() if is_provider(segment) else segment for segment in self.__name * ) */ - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1434, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1433 + /* "dependency_injector/providers.pyx":1446 * return value * * def _get_self_name(self): # <<<<<<<<<<<<<< @@ -30630,7 +30975,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1439 +/* "dependency_injector/providers.pyx":1452 * * @property * def root(self): # <<<<<<<<<<<<<< @@ -30656,7 +31001,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1440 + /* "dependency_injector/providers.pyx":1453 * @property * def root(self): * return self.__root # <<<<<<<<<<<<<< @@ -30668,7 +31013,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_r = ((PyObject *)__pyx_v_self->__pyx___root); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1439 + /* "dependency_injector/providers.pyx":1452 * * @property * def root(self): # <<<<<<<<<<<<<< @@ -30683,7 +31028,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1442 +/* "dependency_injector/providers.pyx":1455 * return self.__root * * def get_name(self): # <<<<<<<<<<<<<< @@ -30716,7 +31061,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_name", 0); - /* "dependency_injector/providers.pyx":1443 + /* "dependency_injector/providers.pyx":1456 * * def get_name(self): * return '.'.join((self.__root.get_name(), self._get_self_name())) # <<<<<<<<<<<<<< @@ -30724,7 +31069,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * def get_name_segments(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___root), __pyx_n_s_get_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1443, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___root), __pyx_n_s_get_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -30738,10 +31083,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1443, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_self_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1443, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_self_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -30755,10 +31100,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __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, 1443, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1443, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -30766,14 +31111,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1443, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1442 + /* "dependency_injector/providers.pyx":1455 * return self.__root * * def get_name(self): # <<<<<<<<<<<<<< @@ -30795,7 +31140,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1445 +/* "dependency_injector/providers.pyx":1458 * return '.'.join((self.__root.get_name(), self._get_self_name())) * * def get_name_segments(self): # <<<<<<<<<<<<<< @@ -30821,7 +31166,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_name_segments", 0); - /* "dependency_injector/providers.pyx":1446 + /* "dependency_injector/providers.pyx":1459 * * def get_name_segments(self): * return self.__name # <<<<<<<<<<<<<< @@ -30833,7 +31178,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_r = __pyx_v_self->__pyx___name; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1445 + /* "dependency_injector/providers.pyx":1458 * return '.'.join((self.__root.get_name(), self._get_self_name())) * * def get_name_segments(self): # <<<<<<<<<<<<<< @@ -30848,7 +31193,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1448 +/* "dependency_injector/providers.pyx":1461 * return self.__name * * def as_int(self): # <<<<<<<<<<<<<< @@ -30879,7 +31224,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_int", 0); - /* "dependency_injector/providers.pyx":1449 + /* "dependency_injector/providers.pyx":1462 * * def as_int(self): * return TypedConfigurationOption(int, self) # <<<<<<<<<<<<<< @@ -30887,7 +31232,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * def as_float(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1449, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)(&PyInt_Type))); __Pyx_GIVEREF(((PyObject *)(&PyInt_Type))); @@ -30895,14 +31240,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1449, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1448 + /* "dependency_injector/providers.pyx":1461 * return self.__name * * def as_int(self): # <<<<<<<<<<<<<< @@ -30922,7 +31267,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1451 +/* "dependency_injector/providers.pyx":1464 * return TypedConfigurationOption(int, self) * * def as_float(self): # <<<<<<<<<<<<<< @@ -30953,7 +31298,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_float", 0); - /* "dependency_injector/providers.pyx":1452 + /* "dependency_injector/providers.pyx":1465 * * def as_float(self): * return TypedConfigurationOption(float, self) # <<<<<<<<<<<<<< @@ -30961,7 +31306,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * def as_(self, callback, *args, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1452, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)(&PyFloat_Type))); __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type))); @@ -30969,14 +31314,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1452, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1451 + /* "dependency_injector/providers.pyx":1464 * return TypedConfigurationOption(int, self) * * def as_float(self): # <<<<<<<<<<<<<< @@ -30996,7 +31341,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1454 +/* "dependency_injector/providers.pyx":1467 * return TypedConfigurationOption(float, self) * * def as_(self, callback, *args, **kwargs): # <<<<<<<<<<<<<< @@ -31049,7 +31394,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "as_") < 0)) __PYX_ERR(1, 1454, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "as_") < 0)) __PYX_ERR(1, 1467, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -31060,7 +31405,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("as_", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1454, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("as_", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1467, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -31087,7 +31432,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_", 0); - /* "dependency_injector/providers.pyx":1455 + /* "dependency_injector/providers.pyx":1468 * * def as_(self, callback, *args, **kwargs): * return TypedConfigurationOption(callback, self, *args, **kwargs) # <<<<<<<<<<<<<< @@ -31095,7 +31440,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * def required(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1455, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); @@ -31103,17 +31448,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1455, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption), __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1455, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption), __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1454 + /* "dependency_injector/providers.pyx":1467 * return TypedConfigurationOption(float, self) * * def as_(self, callback, *args, **kwargs): # <<<<<<<<<<<<<< @@ -31133,7 +31478,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1457 +/* "dependency_injector/providers.pyx":1470 * return TypedConfigurationOption(callback, self, *args, **kwargs) * * def required(self): # <<<<<<<<<<<<<< @@ -31166,7 +31511,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("required", 0); - /* "dependency_injector/providers.pyx":1458 + /* "dependency_injector/providers.pyx":1471 * * def required(self): * return self.__class__(self.__name, self.__root, required=True) # <<<<<<<<<<<<<< @@ -31174,9 +31519,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * def is_required(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1458, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1458, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->__pyx___name); __Pyx_GIVEREF(__pyx_v_self->__pyx___name); @@ -31184,10 +31529,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___root)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___root)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->__pyx___root)); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1458, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(1, 1458, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1458, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(1, 1471, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1471, __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; @@ -31196,7 +31541,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_4 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1457 + /* "dependency_injector/providers.pyx":1470 * return TypedConfigurationOption(callback, self, *args, **kwargs) * * def required(self): # <<<<<<<<<<<<<< @@ -31218,7 +31563,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1460 +/* "dependency_injector/providers.pyx":1473 * return self.__class__(self.__name, self.__root, required=True) * * def is_required(self): # <<<<<<<<<<<<<< @@ -31248,7 +31593,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_required", 0); - /* "dependency_injector/providers.pyx":1461 + /* "dependency_injector/providers.pyx":1474 * * def is_required(self): * return self.__required # <<<<<<<<<<<<<< @@ -31256,13 +31601,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * def override(self, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___required); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1461, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___required); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1460 + /* "dependency_injector/providers.pyx":1473 * return self.__class__(self.__name, self.__root, required=True) * * def is_required(self): # <<<<<<<<<<<<<< @@ -31281,7 +31626,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1463 +/* "dependency_injector/providers.pyx":1476 * return self.__required * * def override(self, value): # <<<<<<<<<<<<<< @@ -31318,7 +31663,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":1464 + /* "dependency_injector/providers.pyx":1477 * * def override(self, value): * if isinstance(value, Provider): # <<<<<<<<<<<<<< @@ -31329,14 +31674,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":1465 + /* "dependency_injector/providers.pyx":1478 * def override(self, value): * if isinstance(value, Provider): * raise Error('Configuration option can only be overridden by a value') # <<<<<<<<<<<<<< * return self.__root.set(self._get_self_name(), value) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1465, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -31350,14 +31695,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Configuration_option_can_only_be) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Configuration_option_can_only_be); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1465, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 1465, __pyx_L1_error) + __PYX_ERR(1, 1478, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1464 + /* "dependency_injector/providers.pyx":1477 * * def override(self, value): * if isinstance(value, Provider): # <<<<<<<<<<<<<< @@ -31366,7 +31711,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1466 + /* "dependency_injector/providers.pyx":1479 * if isinstance(value, Provider): * raise Error('Configuration option can only be overridden by a value') * return self.__root.set(self._get_self_name(), value) # <<<<<<<<<<<<<< @@ -31374,9 +31719,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * def reset_last_overriding(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___root), __pyx_n_s_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1466, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___root), __pyx_n_s_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_self_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1466, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_self_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -31390,7 +31735,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1466, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -31408,7 +31753,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_v_value}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1466, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1479, __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; @@ -31417,14 +31762,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_v_value}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1466, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1479, __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_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1466, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -31435,7 +31780,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_value); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1466, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -31444,7 +31789,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1463 + /* "dependency_injector/providers.pyx":1476 * return self.__required * * def override(self, value): # <<<<<<<<<<<<<< @@ -31467,7 +31812,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1468 +/* "dependency_injector/providers.pyx":1481 * return self.__root.set(self._get_self_name(), value) * * def reset_last_overriding(self): # <<<<<<<<<<<<<< @@ -31499,14 +31844,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_last_overriding", 0); - /* "dependency_injector/providers.pyx":1469 + /* "dependency_injector/providers.pyx":1482 * * def reset_last_overriding(self): * raise Error('Configuration option does not support this method') # <<<<<<<<<<<<<< * * def reset_override(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1469, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -31520,14 +31865,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Configuration_option_does_not_su) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Configuration_option_does_not_su); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1469, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1469, __pyx_L1_error) + __PYX_ERR(1, 1482, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1468 + /* "dependency_injector/providers.pyx":1481 * return self.__root.set(self._get_self_name(), value) * * def reset_last_overriding(self): # <<<<<<<<<<<<<< @@ -31547,7 +31892,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1471 +/* "dependency_injector/providers.pyx":1484 * raise Error('Configuration option does not support this method') * * def reset_override(self): # <<<<<<<<<<<<<< @@ -31579,14 +31924,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_override", 0); - /* "dependency_injector/providers.pyx":1472 + /* "dependency_injector/providers.pyx":1485 * * def reset_override(self): * raise Error('Configuration option does not support this method') # <<<<<<<<<<<<<< * * def reset_cache(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1472, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -31600,14 +31945,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Configuration_option_does_not_su) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Configuration_option_does_not_su); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1472, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1472, __pyx_L1_error) + __PYX_ERR(1, 1485, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1471 + /* "dependency_injector/providers.pyx":1484 * raise Error('Configuration option does not support this method') * * def reset_override(self): # <<<<<<<<<<<<<< @@ -31627,7 +31972,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1474 +/* "dependency_injector/providers.pyx":1487 * raise Error('Configuration option does not support this method') * * def reset_cache(self): # <<<<<<<<<<<<<< @@ -31663,14 +32008,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_cache", 0); - /* "dependency_injector/providers.pyx":1475 + /* "dependency_injector/providers.pyx":1488 * * def reset_cache(self): * self.__cache = UNDEFINED # <<<<<<<<<<<<<< * for child in self.__children.values(): * child.reset_cache() */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1475, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___cache); @@ -31678,7 +32023,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_v_self->__pyx___cache = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1476 + /* "dependency_injector/providers.pyx":1489 * def reset_cache(self): * self.__cache = UNDEFINED * for child in self.__children.values(): # <<<<<<<<<<<<<< @@ -31687,17 +32032,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(1, 1476, __pyx_L1_error) + __PYX_ERR(1, 1489, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1476, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1489, __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, 1476, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1489, __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, 1476, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1489, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -31705,17 +32050,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption 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, 1476, __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, 1489, __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, 1476, __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, 1489, __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, 1476, __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, 1489, __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, 1476, __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, 1489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -31725,7 +32070,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 1476, __pyx_L1_error) + else __PYX_ERR(1, 1489, __pyx_L1_error) } break; } @@ -31734,14 +32079,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1477 + /* "dependency_injector/providers.pyx":1490 * self.__cache = UNDEFINED * for child in self.__children.values(): * child.reset_cache() # <<<<<<<<<<<<<< * * def update(self, value): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_cache); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_cache); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -31755,12 +32100,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__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_1)) __PYX_ERR(1, 1477, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1476 + /* "dependency_injector/providers.pyx":1489 * def reset_cache(self): * self.__cache = UNDEFINED * for child in self.__children.values(): # <<<<<<<<<<<<<< @@ -31770,7 +32115,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1474 + /* "dependency_injector/providers.pyx":1487 * raise Error('Configuration option does not support this method') * * def reset_cache(self): # <<<<<<<<<<<<<< @@ -31795,7 +32140,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1479 +/* "dependency_injector/providers.pyx":1492 * child.reset_cache() * * def update(self, value): # <<<<<<<<<<<<<< @@ -31828,14 +32173,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update", 0); - /* "dependency_injector/providers.pyx":1491 + /* "dependency_injector/providers.pyx":1504 * :rtype: None * """ * self.override(value) # <<<<<<<<<<<<<< * * def from_ini(self, filepath, required=UNDEFINED): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1491, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -31849,12 +32194,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1491, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1479 + /* "dependency_injector/providers.pyx":1492 * child.reset_cache() * * def update(self, value): # <<<<<<<<<<<<<< @@ -31877,7 +32222,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1493 +/* "dependency_injector/providers.pyx":1506 * self.override(value) * * def from_ini(self, filepath, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -31900,7 +32245,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filepath,&__pyx_n_s_required,0}; PyObject* values[2] = {0,0}; - values[1] = __pyx_k__13; + values[1] = __pyx_k__12; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -31925,7 +32270,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_ini") < 0)) __PYX_ERR(1, 1493, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_ini") < 0)) __PYX_ERR(1, 1506, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -31941,7 +32286,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_ini", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1493, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_ini", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1506, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption.from_ini", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -31983,7 +32328,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_ini", 0); - /* "dependency_injector/providers.pyx":1506 + /* "dependency_injector/providers.pyx":1519 * :rtype: None * """ * try: # <<<<<<<<<<<<<< @@ -31999,14 +32344,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":1507 + /* "dependency_injector/providers.pyx":1520 * """ * try: * parser = _parse_ini_file(filepath) # <<<<<<<<<<<<<< * except IOError as exception: * if required is not False \ */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_parse_ini_file); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1507, __pyx_L3_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_parse_ini_file); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1520, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -32020,13 +32365,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_filepath) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filepath); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1507, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1520, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_parser = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1506 + /* "dependency_injector/providers.pyx":1519 * :rtype: None * """ * try: # <<<<<<<<<<<<<< @@ -32043,7 +32388,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1508 + /* "dependency_injector/providers.pyx":1521 * try: * parser = _parse_ini_file(filepath) * except IOError as exception: # <<<<<<<<<<<<<< @@ -32053,14 +32398,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IOError); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption.from_ini", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 1508, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 1521, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_exception = __pyx_t_5; - /* "dependency_injector/providers.pyx":1509 + /* "dependency_injector/providers.pyx":1522 * parser = _parse_ini_file(filepath) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -32075,14 +32420,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption goto __pyx_L12_bool_binop_done; } - /* "dependency_injector/providers.pyx":1510 + /* "dependency_injector/providers.pyx":1523 * except IOError as exception: * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ # <<<<<<<<<<<<<< * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1510, __pyx_L5_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1523, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -32096,10 +32441,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_11 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1510, __pyx_L5_except_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1523, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1510, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1523, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (!__pyx_t_10) { } else { @@ -32114,37 +32459,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_L14_next_and:; - /* "dependency_injector/providers.pyx":1511 + /* "dependency_injector/providers.pyx":1524 * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ * and exception.errno in (errno.ENOENT, errno.EISDIR): # <<<<<<<<<<<<<< * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_errno); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1511, __pyx_L5_except_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_errno); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1524, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_errno); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1511, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_errno); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1524, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_ENOENT); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1511, __pyx_L5_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_ENOENT); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1524, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1511, __pyx_L5_except_error) + __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1524, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1511, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1524, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L16_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_errno); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1511, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_errno); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1524, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_EISDIR); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1511, __pyx_L5_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_EISDIR); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1524, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1511, __pyx_L5_except_error) + __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1524, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1511, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1524, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_9 = __pyx_t_10; __pyx_L16_bool_binop_done:; @@ -32153,7 +32498,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_8 = __pyx_t_10; __pyx_L12_bool_binop_done:; - /* "dependency_injector/providers.pyx":1509 + /* "dependency_injector/providers.pyx":1522 * parser = _parse_ini_file(filepath) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -32162,16 +32507,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ if (unlikely(__pyx_t_8)) { - /* "dependency_injector/providers.pyx":1512 + /* "dependency_injector/providers.pyx":1525 * and (self._is_strict_mode_enabled() or required is True) \ * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) # <<<<<<<<<<<<<< * raise * return */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_load_configuration_fil, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1512, __pyx_L5_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_load_configuration_fil, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1525, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_strerror); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1512, __pyx_L5_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_strerror); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1525, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -32186,13 +32531,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_11 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1512, __pyx_L5_except_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1525, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_exception, __pyx_n_s_strerror, __pyx_t_11) < 0) __PYX_ERR(1, 1512, __pyx_L5_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_exception, __pyx_n_s_strerror, __pyx_t_11) < 0) __PYX_ERR(1, 1525, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "dependency_injector/providers.pyx":1513 + /* "dependency_injector/providers.pyx":1526 * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise # <<<<<<<<<<<<<< @@ -32204,9 +32549,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - __PYX_ERR(1, 1513, __pyx_L5_except_error) + __PYX_ERR(1, 1526, __pyx_L5_except_error) - /* "dependency_injector/providers.pyx":1509 + /* "dependency_injector/providers.pyx":1522 * parser = _parse_ini_file(filepath) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -32215,7 +32560,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1514 + /* "dependency_injector/providers.pyx":1527 * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise * return # <<<<<<<<<<<<<< @@ -32232,7 +32577,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":1506 + /* "dependency_injector/providers.pyx":1519 * :rtype: None * """ * try: # <<<<<<<<<<<<<< @@ -32253,26 +32598,26 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_L8_try_end:; } - /* "dependency_injector/providers.pyx":1516 + /* "dependency_injector/providers.pyx":1529 * return * * config = {} # <<<<<<<<<<<<<< * for section in parser.sections(): * config[section] = dict(parser.items(section)) */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1516, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_config = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1517 + /* "dependency_injector/providers.pyx":1530 * * config = {} * for section in parser.sections(): # <<<<<<<<<<<<<< * config[section] = dict(parser.items(section)) * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_sections); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1517, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_sections); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -32286,16 +32631,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1517, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_15 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1517, __pyx_L1_error) + __pyx_t_15 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_16 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 1517, __pyx_L1_error) + __pyx_t_16 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 1530, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -32303,17 +32648,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(1, 1517, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(1, 1530, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1517, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(1, 1517, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(1, 1530, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1517, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -32323,7 +32668,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 1517, __pyx_L1_error) + else __PYX_ERR(1, 1530, __pyx_L1_error) } break; } @@ -32332,14 +32677,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XDECREF_SET(__pyx_v_section, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1518 + /* "dependency_injector/providers.pyx":1531 * config = {} * for section in parser.sections(): * config[section] = dict(parser.items(section)) # <<<<<<<<<<<<<< * * current_config = self.__call__() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1518, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -32353,16 +32698,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_v_section) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_section); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1518, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1518, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_config, __pyx_v_section, __pyx_t_4) < 0)) __PYX_ERR(1, 1518, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_config, __pyx_v_section, __pyx_t_4) < 0)) __PYX_ERR(1, 1531, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1517 + /* "dependency_injector/providers.pyx":1530 * * config = {} * for section in parser.sections(): # <<<<<<<<<<<<<< @@ -32372,14 +32717,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1520 + /* "dependency_injector/providers.pyx":1533 * config[section] = dict(parser.items(section)) * * current_config = self.__call__() # <<<<<<<<<<<<<< * if not current_config: * current_config = {} */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1520, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -32393,36 +32738,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1520, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_current_config = __pyx_t_5; __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1521 + /* "dependency_injector/providers.pyx":1534 * * current_config = self.__call__() * if not current_config: # <<<<<<<<<<<<<< * current_config = {} * self.override(merge_dicts(current_config, config)) */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 1521, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 1534, __pyx_L1_error) __pyx_t_10 = ((!__pyx_t_8) != 0); if (__pyx_t_10) { - /* "dependency_injector/providers.pyx":1522 + /* "dependency_injector/providers.pyx":1535 * current_config = self.__call__() * if not current_config: * current_config = {} # <<<<<<<<<<<<<< * self.override(merge_dicts(current_config, config)) * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1522, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_current_config, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1521 + /* "dependency_injector/providers.pyx":1534 * * current_config = self.__call__() * if not current_config: # <<<<<<<<<<<<<< @@ -32431,16 +32776,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1523 + /* "dependency_injector/providers.pyx":1536 * if not current_config: * current_config = {} * self.override(merge_dicts(current_config, config)) # <<<<<<<<<<<<<< * * def from_yaml(self, filepath, required=UNDEFINED, loader=None): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1523, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1523, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; __pyx_t_7 = 0; @@ -32457,7 +32802,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_current_config, __pyx_v_config}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1523, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1536, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -32465,13 +32810,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_current_config, __pyx_v_config}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1523, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1536, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_13 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1523, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; @@ -32482,7 +32827,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(__pyx_v_config); __Pyx_GIVEREF(__pyx_v_config); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_v_config); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1523, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -32500,12 +32845,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_5 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1523, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1493 + /* "dependency_injector/providers.pyx":1506 * self.override(value) * * def from_ini(self, filepath, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -32537,7 +32882,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1525 +/* "dependency_injector/providers.pyx":1538 * self.override(merge_dicts(current_config, config)) * * def from_yaml(self, filepath, required=UNDEFINED, loader=None): # <<<<<<<<<<<<<< @@ -32561,7 +32906,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filepath,&__pyx_n_s_required,&__pyx_n_s_loader,0}; PyObject* values[3] = {0,0,0}; - values[1] = __pyx_k__14; + values[1] = __pyx_k__13; values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -32595,7 +32940,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_yaml") < 0)) __PYX_ERR(1, 1525, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_yaml") < 0)) __PYX_ERR(1, 1538, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -32614,7 +32959,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_yaml", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1525, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_yaml", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1538, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption.from_yaml", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -32659,28 +33004,28 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_RefNannySetupContext("from_yaml", 0); __Pyx_INCREF(__pyx_v_loader); - /* "dependency_injector/providers.pyx":1541 + /* "dependency_injector/providers.pyx":1554 * :rtype: None * """ * if yaml is None: # <<<<<<<<<<<<<< * raise Error( * 'Unable to load yaml configuration - PyYAML is not installed. ' */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_yaml); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1541, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_yaml); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":1542 + /* "dependency_injector/providers.pyx":1555 * """ * if yaml is None: * raise Error( # <<<<<<<<<<<<<< * 'Unable to load yaml configuration - PyYAML is not installed. ' * 'Install PyYAML or install Dependency Injector with yaml extras: ' */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1542, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -32694,14 +33039,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Unable_to_load_yaml_configuratio) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Unable_to_load_yaml_configuratio); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1542, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1542, __pyx_L1_error) + __PYX_ERR(1, 1555, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1541 + /* "dependency_injector/providers.pyx":1554 * :rtype: None * """ * if yaml is None: # <<<<<<<<<<<<<< @@ -32710,7 +33055,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1548 + /* "dependency_injector/providers.pyx":1561 * ) * * if loader is None: # <<<<<<<<<<<<<< @@ -32721,19 +33066,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":1549 + /* "dependency_injector/providers.pyx":1562 * * if loader is None: * loader = YamlLoader # <<<<<<<<<<<<<< * * try: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_YamlLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1549, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_YamlLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_loader, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1548 + /* "dependency_injector/providers.pyx":1561 * ) * * if loader is None: # <<<<<<<<<<<<<< @@ -32742,7 +33087,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1551 + /* "dependency_injector/providers.pyx":1564 * loader = YamlLoader * * try: # <<<<<<<<<<<<<< @@ -32758,7 +33103,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "dependency_injector/providers.pyx":1552 + /* "dependency_injector/providers.pyx":1565 * * try: * with open(filepath) as opened_file: # <<<<<<<<<<<<<< @@ -32766,11 +33111,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * except IOError as exception: */ /*with:*/ { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_v_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1552, __pyx_L5_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_v_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1565, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1552, __pyx_L5_error) + __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1565, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1552, __pyx_L11_error) + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1565, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -32784,7 +33129,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1552, __pyx_L11_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1565, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_4; @@ -32802,16 +33147,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_v_opened_file = __pyx_t_5; __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1553 + /* "dependency_injector/providers.pyx":1566 * try: * with open(filepath) as opened_file: * config = yaml.load(opened_file, loader) # <<<<<<<<<<<<<< * except IOError as exception: * if required is not False \ */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_yaml); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1553, __pyx_L15_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_yaml); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1566, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1553, __pyx_L15_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1566, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -32829,7 +33174,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_opened_file, __pyx_v_loader}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1553, __pyx_L15_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1566, __pyx_L15_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -32837,13 +33182,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_opened_file, __pyx_v_loader}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1553, __pyx_L15_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1566, __pyx_L15_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1553, __pyx_L15_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1566, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -32854,7 +33199,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(__pyx_v_loader); __Pyx_GIVEREF(__pyx_v_loader); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_14, __pyx_v_loader); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1553, __pyx_L15_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1566, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -32862,7 +33207,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_v_config = __pyx_t_5; __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1552 + /* "dependency_injector/providers.pyx":1565 * * try: * with open(filepath) as opened_file: # <<<<<<<<<<<<<< @@ -32881,20 +33226,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /*except:*/ { __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption.from_yaml", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_10) < 0) __PYX_ERR(1, 1552, __pyx_L17_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_10) < 0) __PYX_ERR(1, 1565, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_10); - __pyx_t_1 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1552, __pyx_L17_except_error) + __pyx_t_1 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1565, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 1552, __pyx_L17_except_error) + if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 1565, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_15); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (__pyx_t_2 < 0) __PYX_ERR(1, 1552, __pyx_L17_except_error) + if (__pyx_t_2 < 0) __PYX_ERR(1, 1565, __pyx_L17_except_error) __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_5); @@ -32902,7 +33247,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_4, __pyx_t_10); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_10 = 0; - __PYX_ERR(1, 1552, __pyx_L17_except_error) + __PYX_ERR(1, 1565, __pyx_L17_except_error) } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -32928,7 +33273,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption if (__pyx_t_9) { __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple_, NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1552, __pyx_L5_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1565, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -32943,7 +33288,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_L24:; } - /* "dependency_injector/providers.pyx":1551 + /* "dependency_injector/providers.pyx":1564 * loader = YamlLoader * * try: # <<<<<<<<<<<<<< @@ -32961,7 +33306,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1554 + /* "dependency_injector/providers.pyx":1567 * with open(filepath) as opened_file: * config = yaml.load(opened_file, loader) * except IOError as exception: # <<<<<<<<<<<<<< @@ -32971,14 +33316,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IOError); if (__pyx_t_14) { __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption.from_yaml", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(1, 1554, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(1, 1567, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_v_exception = __pyx_t_4; - /* "dependency_injector/providers.pyx":1555 + /* "dependency_injector/providers.pyx":1568 * config = yaml.load(opened_file, loader) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -32993,14 +33338,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption goto __pyx_L28_bool_binop_done; } - /* "dependency_injector/providers.pyx":1556 + /* "dependency_injector/providers.pyx":1569 * except IOError as exception: * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ # <<<<<<<<<<<<<< * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) */ - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1556, __pyx_L7_except_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1569, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) { @@ -33014,10 +33359,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__pyx_t_18) ? __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_18) : __Pyx_PyObject_CallNoArg(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1556, __pyx_L7_except_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1569, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1556, __pyx_L7_except_error) + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1569, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_16) { } else { @@ -33032,37 +33377,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_L30_next_and:; - /* "dependency_injector/providers.pyx":1557 + /* "dependency_injector/providers.pyx":1570 * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ * and exception.errno in (errno.ENOENT, errno.EISDIR): # <<<<<<<<<<<<<< * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1557, __pyx_L7_except_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1570, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_errno); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1557, __pyx_L7_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_errno); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1570, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_ENOENT); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1557, __pyx_L7_except_error) + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_ENOENT); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1570, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = PyObject_RichCompare(__pyx_t_1, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1557, __pyx_L7_except_error) + __pyx_t_17 = PyObject_RichCompare(__pyx_t_1, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1570, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1557, __pyx_L7_except_error) + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1570, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (!__pyx_t_16) { } else { __pyx_t_2 = __pyx_t_16; goto __pyx_L32_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_errno); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1557, __pyx_L7_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_errno); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1570, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_EISDIR); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1557, __pyx_L7_except_error) + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_EISDIR); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1570, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = PyObject_RichCompare(__pyx_t_1, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1557, __pyx_L7_except_error) + __pyx_t_17 = PyObject_RichCompare(__pyx_t_1, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1570, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1557, __pyx_L7_except_error) + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1570, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_2 = __pyx_t_16; __pyx_L32_bool_binop_done:; @@ -33071,7 +33416,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_3 = __pyx_t_16; __pyx_L28_bool_binop_done:; - /* "dependency_injector/providers.pyx":1555 + /* "dependency_injector/providers.pyx":1568 * config = yaml.load(opened_file, loader) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -33080,16 +33425,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":1558 + /* "dependency_injector/providers.pyx":1571 * and (self._is_strict_mode_enabled() or required is True) \ * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) # <<<<<<<<<<<<<< * raise * return */ - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_load_configuration_fil, __pyx_n_s_format); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1558, __pyx_L7_except_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_load_configuration_fil, __pyx_n_s_format); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1571, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_strerror); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1558, __pyx_L7_except_error) + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_strerror); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1571, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) { @@ -33104,13 +33449,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_1 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_19, __pyx_t_18) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1558, __pyx_L7_except_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1571, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_exception, __pyx_n_s_strerror, __pyx_t_1) < 0) __PYX_ERR(1, 1558, __pyx_L7_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_exception, __pyx_n_s_strerror, __pyx_t_1) < 0) __PYX_ERR(1, 1571, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1559 + /* "dependency_injector/providers.pyx":1572 * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise # <<<<<<<<<<<<<< @@ -33122,9 +33467,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_10, __pyx_t_4, __pyx_t_5); __pyx_t_10 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __PYX_ERR(1, 1559, __pyx_L7_except_error) + __PYX_ERR(1, 1572, __pyx_L7_except_error) - /* "dependency_injector/providers.pyx":1555 + /* "dependency_injector/providers.pyx":1568 * config = yaml.load(opened_file, loader) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -33133,7 +33478,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1560 + /* "dependency_injector/providers.pyx":1573 * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise * return # <<<<<<<<<<<<<< @@ -33150,7 +33495,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "dependency_injector/providers.pyx":1551 + /* "dependency_injector/providers.pyx":1564 * loader = YamlLoader * * try: # <<<<<<<<<<<<<< @@ -33171,14 +33516,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_L10_try_end:; } - /* "dependency_injector/providers.pyx":1562 + /* "dependency_injector/providers.pyx":1575 * return * * current_config = self.__call__() # <<<<<<<<<<<<<< * if not current_config: * current_config = {} */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1562, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -33192,36 +33537,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1562, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_current_config = __pyx_t_5; __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1563 + /* "dependency_injector/providers.pyx":1576 * * current_config = self.__call__() * if not current_config: # <<<<<<<<<<<<<< * current_config = {} * self.override(merge_dicts(current_config, config)) */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1563, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1576, __pyx_L1_error) __pyx_t_16 = ((!__pyx_t_3) != 0); if (__pyx_t_16) { - /* "dependency_injector/providers.pyx":1564 + /* "dependency_injector/providers.pyx":1577 * current_config = self.__call__() * if not current_config: * current_config = {} # <<<<<<<<<<<<<< * self.override(merge_dicts(current_config, config)) * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1564, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_current_config, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1563 + /* "dependency_injector/providers.pyx":1576 * * current_config = self.__call__() * if not current_config: # <<<<<<<<<<<<<< @@ -33230,18 +33575,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1565 + /* "dependency_injector/providers.pyx":1578 * if not current_config: * current_config = {} * self.override(merge_dicts(current_config, config)) # <<<<<<<<<<<<<< * * def from_pydantic(self, settings, required=UNDEFINED, **kwargs): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1565, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1565, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_v_config)) { __Pyx_RaiseUnboundLocalError("config"); __PYX_ERR(1, 1565, __pyx_L1_error) } + if (unlikely(!__pyx_v_config)) { __Pyx_RaiseUnboundLocalError("config"); __PYX_ERR(1, 1578, __pyx_L1_error) } __pyx_t_17 = NULL; __pyx_t_14 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -33257,7 +33602,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_current_config, __pyx_v_config}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1565, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1578, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_10); } else @@ -33265,13 +33610,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_current_config, __pyx_v_config}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1565, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1578, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_10); } else #endif { - __pyx_t_18 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1565, __pyx_L1_error) + __pyx_t_18 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_17) { __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17); __pyx_t_17 = NULL; @@ -33282,7 +33627,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(__pyx_v_config); __Pyx_GIVEREF(__pyx_v_config); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_14, __pyx_v_config); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1565, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } @@ -33300,12 +33645,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1565, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1525 + /* "dependency_injector/providers.pyx":1538 * self.override(merge_dicts(current_config, config)) * * def from_yaml(self, filepath, required=UNDEFINED, loader=None): # <<<<<<<<<<<<<< @@ -33337,7 +33682,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1567 +/* "dependency_injector/providers.pyx":1580 * self.override(merge_dicts(current_config, config)) * * def from_pydantic(self, settings, required=UNDEFINED, **kwargs): # <<<<<<<<<<<<<< @@ -33363,7 +33708,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_settings,&__pyx_n_s_required,0}; PyObject* values[2] = {0,0}; - values[1] = __pyx_k__15; + values[1] = __pyx_k__14; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -33388,7 +33733,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "from_pydantic") < 0)) __PYX_ERR(1, 1567, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "from_pydantic") < 0)) __PYX_ERR(1, 1580, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -33404,7 +33749,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_pydantic", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1567, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pydantic", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1580, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption.from_pydantic", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -33436,28 +33781,28 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_pydantic", 0); - /* "dependency_injector/providers.pyx":1583 + /* "dependency_injector/providers.pyx":1596 * :rtype: None * """ * if pydantic is None: # <<<<<<<<<<<<<< * raise Error( * 'Unable to load pydantic configuration - pydantic is not installed. ' */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1583, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":1584 + /* "dependency_injector/providers.pyx":1597 * """ * if pydantic is None: * raise Error( # <<<<<<<<<<<<<< * 'Unable to load pydantic configuration - pydantic is not installed. ' * 'Install pydantic or install Dependency Injector with pydantic extras: ' */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1584, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -33471,14 +33816,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Unable_to_load_pydantic_configur) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Unable_to_load_pydantic_configur); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1584, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1584, __pyx_L1_error) + __PYX_ERR(1, 1597, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1583 + /* "dependency_injector/providers.pyx":1596 * :rtype: None * """ * if pydantic is None: # <<<<<<<<<<<<<< @@ -33487,7 +33832,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1590 + /* "dependency_injector/providers.pyx":1603 * ) * * if isinstance(settings, CLASS_TYPES) and issubclass(settings, pydantic.BaseSettings): # <<<<<<<<<<<<<< @@ -33496,7 +33841,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ __pyx_t_1 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_settings, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1590, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v_settings, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_2 != 0); if (__pyx_t_6) { @@ -33504,38 +33849,38 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_3 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1590, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BaseSettings); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1590, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BaseSettings); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = PyObject_IsSubclass(__pyx_v_settings, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1590, __pyx_L1_error) + __pyx_t_6 = PyObject_IsSubclass(__pyx_v_settings, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = (__pyx_t_6 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":1591 + /* "dependency_injector/providers.pyx":1604 * * if isinstance(settings, CLASS_TYPES) and issubclass(settings, pydantic.BaseSettings): * raise Error( # <<<<<<<<<<<<<< * 'Got settings class, but expect instance: ' * 'instead "{0}" use "{0}()"'.format(settings.__name__) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1591, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1593 + /* "dependency_injector/providers.pyx":1606 * raise Error( * 'Got settings class, but expect instance: ' * 'instead "{0}" use "{0}()"'.format(settings.__name__) # <<<<<<<<<<<<<< * ) * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Got_settings_class_but_expect_in, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1593, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Got_settings_class_but_expect_in, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_settings, __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1593, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_settings, __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -33550,7 +33895,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1593, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -33566,14 +33911,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1591, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(1, 1591, __pyx_L1_error) + __PYX_ERR(1, 1604, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1590 + /* "dependency_injector/providers.pyx":1603 * ) * * if isinstance(settings, CLASS_TYPES) and issubclass(settings, pydantic.BaseSettings): # <<<<<<<<<<<<<< @@ -33582,41 +33927,41 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1596 + /* "dependency_injector/providers.pyx":1609 * ) * * if not isinstance(settings, pydantic.BaseSettings): # <<<<<<<<<<<<<< * raise Error( * 'Unable to recognize settings instance, expect "pydantic.BaseSettings", ' */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1596, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_BaseSettings); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_BaseSettings); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = PyObject_IsInstance(__pyx_v_settings, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_settings, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":1597 + /* "dependency_injector/providers.pyx":1610 * * if not isinstance(settings, pydantic.BaseSettings): * raise Error( # <<<<<<<<<<<<<< * 'Unable to recognize settings instance, expect "pydantic.BaseSettings", ' * 'got {0} instead'.format(settings) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1597, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":1599 + /* "dependency_injector/providers.pyx":1612 * raise Error( * 'Unable to recognize settings instance, expect "pydantic.BaseSettings", ' * 'got {0} instead'.format(settings) # <<<<<<<<<<<<<< * ) * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_recognize_settings_ins, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1599, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_recognize_settings_ins, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -33630,7 +33975,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_settings) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_settings); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1599, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -33646,14 +33991,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1597, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1597, __pyx_L1_error) + __PYX_ERR(1, 1610, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1596 + /* "dependency_injector/providers.pyx":1609 * ) * * if not isinstance(settings, pydantic.BaseSettings): # <<<<<<<<<<<<<< @@ -33662,36 +34007,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1602 + /* "dependency_injector/providers.pyx":1615 * ) * * self.from_dict(settings.dict(**kwargs), required=required) # <<<<<<<<<<<<<< * * def from_dict(self, options, required=UNDEFINED): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1602, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_settings, __pyx_n_s_dict_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1602, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_settings, __pyx_n_s_dict_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1602, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1602, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1602, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, __pyx_v_required) < 0) __PYX_ERR(1, 1602, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1602, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, __pyx_v_required) < 0) __PYX_ERR(1, 1615, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/providers.pyx":1567 + /* "dependency_injector/providers.pyx":1580 * self.override(merge_dicts(current_config, config)) * * def from_pydantic(self, settings, required=UNDEFINED, **kwargs): # <<<<<<<<<<<<<< @@ -33717,7 +34062,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1604 +/* "dependency_injector/providers.pyx":1617 * self.from_dict(settings.dict(**kwargs), required=required) * * def from_dict(self, options, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -33740,7 +34085,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_options,&__pyx_n_s_required,0}; PyObject* values[2] = {0,0}; - values[1] = __pyx_k__16; + values[1] = __pyx_k__15; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -33765,7 +34110,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_dict") < 0)) __PYX_ERR(1, 1604, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_dict") < 0)) __PYX_ERR(1, 1617, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -33781,7 +34126,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_dict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1604, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_dict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1617, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -33816,7 +34161,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_dict", 0); - /* "dependency_injector/providers.pyx":1617 + /* "dependency_injector/providers.pyx":1630 * :rtype: None * """ * if required is not False \ # <<<<<<<<<<<<<< @@ -33831,14 +34176,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption goto __pyx_L4_bool_binop_done; } - /* "dependency_injector/providers.pyx":1618 + /* "dependency_injector/providers.pyx":1631 * """ * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ # <<<<<<<<<<<<<< * and not options: * raise ValueError('Can not use empty dictionary') */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1618, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -33852,10 +34197,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __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, 1618, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1618, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1631, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_3) { } else { @@ -33870,19 +34215,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_L6_next_and:; - /* "dependency_injector/providers.pyx":1619 + /* "dependency_injector/providers.pyx":1632 * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ * and not options: # <<<<<<<<<<<<<< * raise ValueError('Can not use empty dictionary') * */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_options); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1619, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_options); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1632, __pyx_L1_error) __pyx_t_3 = ((!__pyx_t_2) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; - /* "dependency_injector/providers.pyx":1617 + /* "dependency_injector/providers.pyx":1630 * :rtype: None * """ * if required is not False \ # <<<<<<<<<<<<<< @@ -33891,20 +34236,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ if (unlikely(__pyx_t_1)) { - /* "dependency_injector/providers.pyx":1620 + /* "dependency_injector/providers.pyx":1633 * and (self._is_strict_mode_enabled() or required is True) \ * and not options: * raise ValueError('Can not use empty dictionary') # <<<<<<<<<<<<<< * * try: */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1620, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(1, 1620, __pyx_L1_error) + __PYX_ERR(1, 1633, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1617 + /* "dependency_injector/providers.pyx":1630 * :rtype: None * """ * if required is not False \ # <<<<<<<<<<<<<< @@ -33913,7 +34258,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1622 + /* "dependency_injector/providers.pyx":1635 * raise ValueError('Can not use empty dictionary') * * try: # <<<<<<<<<<<<<< @@ -33929,14 +34274,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { - /* "dependency_injector/providers.pyx":1623 + /* "dependency_injector/providers.pyx":1636 * * try: * current_config = self.__call__() # <<<<<<<<<<<<<< * except Error: * current_config = {} */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1623, __pyx_L8_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1636, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -33950,13 +34295,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __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, 1623, __pyx_L8_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1636, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_current_config = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1622 + /* "dependency_injector/providers.pyx":1635 * raise ValueError('Can not use empty dictionary') * * try: # <<<<<<<<<<<<<< @@ -33965,7 +34310,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1627 + /* "dependency_injector/providers.pyx":1640 * current_config = {} * else: * if not current_config: # <<<<<<<<<<<<<< @@ -33973,23 +34318,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * */ /*else:*/ { - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1627, __pyx_L10_except_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1640, __pyx_L10_except_error) __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { - /* "dependency_injector/providers.pyx":1628 + /* "dependency_injector/providers.pyx":1641 * else: * if not current_config: * current_config = {} # <<<<<<<<<<<<<< * * self.override(merge_dicts(current_config, options)) */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1628, __pyx_L10_except_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1641, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_current_config, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1627 + /* "dependency_injector/providers.pyx":1640 * current_config = {} * else: * if not current_config: # <<<<<<<<<<<<<< @@ -34007,7 +34352,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1624 + /* "dependency_injector/providers.pyx":1637 * try: * current_config = self.__call__() * except Error: # <<<<<<<<<<<<<< @@ -34015,7 +34360,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * else: */ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1624, __pyx_L10_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1637, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -34023,19 +34368,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; if (__pyx_t_11) { __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(1, 1624, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(1, 1637, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":1625 + /* "dependency_injector/providers.pyx":1638 * current_config = self.__call__() * except Error: * current_config = {} # <<<<<<<<<<<<<< * else: * if not current_config: */ - __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1625, __pyx_L10_except_error) + __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1638, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_current_config, __pyx_t_10); __pyx_t_10 = 0; @@ -34047,7 +34392,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption goto __pyx_L10_except_error; __pyx_L10_except_error:; - /* "dependency_injector/providers.pyx":1622 + /* "dependency_injector/providers.pyx":1635 * raise ValueError('Can not use empty dictionary') * * try: # <<<<<<<<<<<<<< @@ -34067,16 +34412,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_L13_try_end:; } - /* "dependency_injector/providers.pyx":1630 + /* "dependency_injector/providers.pyx":1643 * current_config = {} * * self.override(merge_dicts(current_config, options)) # <<<<<<<<<<<<<< * * def from_env(self, name, default=UNDEFINED, required=UNDEFINED): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1630, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1630, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = NULL; __pyx_t_11 = 0; @@ -34093,7 +34438,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_current_config, __pyx_v_options}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1630, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1643, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -34101,13 +34446,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_current_config, __pyx_v_options}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1630, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1643, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_13 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1630, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; @@ -34118,7 +34463,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(__pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_11, __pyx_v_options); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1630, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -34136,12 +34481,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_10, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __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_4)) __PYX_ERR(1, 1630, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1604 + /* "dependency_injector/providers.pyx":1617 * self.from_dict(settings.dict(**kwargs), required=required) * * def from_dict(self, options, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -34168,7 +34513,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1632 +/* "dependency_injector/providers.pyx":1645 * self.override(merge_dicts(current_config, options)) * * def from_env(self, name, default=UNDEFINED, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -34192,8 +34537,8 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,&__pyx_n_s_required,0}; PyObject* values[3] = {0,0,0}; - values[1] = __pyx_k__18; - values[2] = __pyx_k__19; + values[1] = __pyx_k__17; + values[2] = __pyx_k__18; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -34226,7 +34571,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_env") < 0)) __PYX_ERR(1, 1632, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_env") < 0)) __PYX_ERR(1, 1645, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -34245,7 +34590,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ConfigurationOption } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_env", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1632, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_env", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1645, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ConfigurationOption.from_env", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -34275,19 +34620,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_env", 0); - /* "dependency_injector/providers.pyx":1646 + /* "dependency_injector/providers.pyx":1659 * :rtype: None * """ * value = os.environ.get(name, default) # <<<<<<<<<<<<<< * * if value is UNDEFINED: */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1646, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_environ); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1646, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_environ); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1646, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -34305,7 +34650,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_name, __pyx_v_default}; - __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, 1646, __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, 1659, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -34313,13 +34658,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_name, __pyx_v_default}; - __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, 1646, __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, 1659, __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, 1646, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1659, __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; @@ -34330,7 +34675,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(__pyx_v_default); __Pyx_GIVEREF(__pyx_v_default); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_default); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1646, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -34338,21 +34683,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1648 + /* "dependency_injector/providers.pyx":1661 * value = os.environ.get(name, default) * * if value is UNDEFINED: # <<<<<<<<<<<<<< * if required is not False \ * and (self._is_strict_mode_enabled() or required is True): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1648, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = (__pyx_v_value == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":1649 + /* "dependency_injector/providers.pyx":1662 * * if value is UNDEFINED: * if required is not False \ # <<<<<<<<<<<<<< @@ -34367,14 +34712,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption goto __pyx_L5_bool_binop_done; } - /* "dependency_injector/providers.pyx":1650 + /* "dependency_injector/providers.pyx":1663 * if value is UNDEFINED: * if required is not False \ * and (self._is_strict_mode_enabled() or required is True): # <<<<<<<<<<<<<< * raise ValueError('Environment variable "{0}" is undefined'.format(name)) * value = None */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1650, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -34388,10 +34733,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1650, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 1650, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 1663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_8) { } else { @@ -34403,7 +34748,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __pyx_t_7 = __pyx_t_6; __pyx_L5_bool_binop_done:; - /* "dependency_injector/providers.pyx":1649 + /* "dependency_injector/providers.pyx":1662 * * if value is UNDEFINED: * if required is not False \ # <<<<<<<<<<<<<< @@ -34412,14 +34757,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ if (unlikely(__pyx_t_7)) { - /* "dependency_injector/providers.pyx":1651 + /* "dependency_injector/providers.pyx":1664 * if required is not False \ * and (self._is_strict_mode_enabled() or required is True): * raise ValueError('Environment variable "{0}" is undefined'.format(name)) # <<<<<<<<<<<<<< * value = None * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Environment_variable_0_is_undefi, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1651, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Environment_variable_0_is_undefi, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -34433,17 +34778,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1651, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1651, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(1, 1651, __pyx_L1_error) + __PYX_ERR(1, 1664, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1649 + /* "dependency_injector/providers.pyx":1662 * * if value is UNDEFINED: * if required is not False \ # <<<<<<<<<<<<<< @@ -34452,7 +34797,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1652 + /* "dependency_injector/providers.pyx":1665 * and (self._is_strict_mode_enabled() or required is True): * raise ValueError('Environment variable "{0}" is undefined'.format(name)) * value = None # <<<<<<<<<<<<<< @@ -34462,7 +34807,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_value, Py_None); - /* "dependency_injector/providers.pyx":1648 + /* "dependency_injector/providers.pyx":1661 * value = os.environ.get(name, default) * * if value is UNDEFINED: # <<<<<<<<<<<<<< @@ -34471,14 +34816,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption */ } - /* "dependency_injector/providers.pyx":1654 + /* "dependency_injector/providers.pyx":1667 * value = None * * self.override(value) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1654, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -34492,12 +34837,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_value); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1654, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1632 + /* "dependency_injector/providers.pyx":1645 * self.override(merge_dicts(current_config, options)) * * def from_env(self, name, default=UNDEFINED, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -34523,7 +34868,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption } static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption_7related_2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":1657 +/* "dependency_injector/providers.pyx":1670 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -34556,7 +34901,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_8___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 1657, __pyx_L1_error) + __PYX_ERR(1, 1670, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -34564,7 +34909,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_19ConfigurationOption_7related_2generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ConfigurationOption___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 1657, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_19ConfigurationOption_7related_2generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ConfigurationOption___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 1670, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -34601,18 +34946,18 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1657, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1670, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1659 + /* "dependency_injector/providers.pyx":1672 * def related(self): * """Return related providers generator.""" * yield from filter(is_provider, self.__name) # <<<<<<<<<<<<<< * yield from self.__children.values() * yield from super().related */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1659, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1659, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -34620,7 +34965,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->__pyx___name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_self->__pyx___name); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1659, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -34634,16 +34979,16 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1659, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1672, __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(1, 1659, __pyx_L1_error) + else __PYX_ERR(1, 1672, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":1660 + /* "dependency_injector/providers.pyx":1673 * """Return related providers generator.""" * yield from filter(is_provider, self.__name) * yield from self.__children.values() # <<<<<<<<<<<<<< @@ -34652,9 +34997,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption */ if (unlikely(__pyx_cur_scope->__pyx_v_self->__pyx___children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(1, 1660, __pyx_L1_error) + __PYX_ERR(1, 1673, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_v_self->__pyx___children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1660, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_v_self->__pyx___children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -34667,23 +35012,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1660, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1673, __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(1, 1660, __pyx_L1_error) + else __PYX_ERR(1, 1673, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":1661 + /* "dependency_injector/providers.pyx":1674 * yield from filter(is_provider, self.__name) * yield from self.__children.values() * yield from super().related # <<<<<<<<<<<<<< * * def _is_strict_mode_enabled(self): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1661, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption)); @@ -34691,10 +35036,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1661, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1661, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -34708,17 +35053,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L6_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1661, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1674, __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(1, 1661, __pyx_L1_error) + else __PYX_ERR(1, 1674, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":1657 + /* "dependency_injector/providers.pyx":1670 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -34744,7 +35089,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1663 +/* "dependency_injector/providers.pyx":1676 * yield from super().related * * def _is_strict_mode_enabled(self): # <<<<<<<<<<<<<< @@ -34774,7 +35119,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_strict_mode_enabled", 0); - /* "dependency_injector/providers.pyx":1664 + /* "dependency_injector/providers.pyx":1677 * * def _is_strict_mode_enabled(self): * return self.__root.__strict # <<<<<<<<<<<<<< @@ -34782,13 +35127,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___root->__pyx___strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1664, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___root->__pyx___strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1663 + /* "dependency_injector/providers.pyx":1676 * yield from super().related * * def _is_strict_mode_enabled(self): # <<<<<<<<<<<<<< @@ -35164,7 +35509,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ConfigurationOption return __pyx_r; } -/* "dependency_injector/providers.pyx":1670 +/* "dependency_injector/providers.pyx":1683 * * @property * def option(self): # <<<<<<<<<<<<<< @@ -35195,7 +35540,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_24TypedConfigurationO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1671 + /* "dependency_injector/providers.pyx":1684 * @property * def option(self): * return self.args[0] # <<<<<<<<<<<<<< @@ -35203,16 +35548,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_24TypedConfigurationO * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1671, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1671, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1670 + /* "dependency_injector/providers.pyx":1683 * * @property * def option(self): # <<<<<<<<<<<<<< @@ -35586,7 +35931,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_24TypedConfigurationO return __pyx_r; } -/* "dependency_injector/providers.pyx":1696 +/* "dependency_injector/providers.pyx":1709 * DEFAULT_NAME = 'config' * * def __init__(self, name=DEFAULT_NAME, default=None, strict=False): # <<<<<<<<<<<<<< @@ -35609,7 +35954,7 @@ static int __pyx_pw_19dependency_injector_9providers_13Configuration_1__init__(P { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,&__pyx_n_s_strict,0}; PyObject* values[3] = {0,0,0}; - values[0] = __pyx_k__20; + values[0] = __pyx_k__19; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { @@ -35646,7 +35991,7 @@ static int __pyx_pw_19dependency_injector_9providers_13Configuration_1__init__(P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1696, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1709, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -35666,7 +36011,7 @@ static int __pyx_pw_19dependency_injector_9providers_13Configuration_1__init__(P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1696, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1709, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Configuration.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -35680,27 +36025,25 @@ static int __pyx_pw_19dependency_injector_9providers_13Configuration_1__init__(P } static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default, PyObject *__pyx_v_strict) { - PyObject *__pyx_v_value = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; - int __pyx_t_3; + PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1697 + /* "dependency_injector/providers.pyx":1710 * * def __init__(self, name=DEFAULT_NAME, default=None, strict=False): * self.__name = name # <<<<<<<<<<<<<< * self.__strict = strict - * + * self.__children = {} */ - if (!(likely(PyString_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 1697, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 1710, __pyx_L1_error) __pyx_t_1 = __pyx_v_name; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -35709,103 +36052,24 @@ static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(st __pyx_v_self->__pyx___name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1698 + /* "dependency_injector/providers.pyx":1711 * def __init__(self, name=DEFAULT_NAME, default=None, strict=False): * self.__name = name * self.__strict = strict # <<<<<<<<<<<<<< + * self.__children = {} * - * value = {} */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_strict); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1698, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_strict); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1711, __pyx_L1_error) __pyx_v_self->__pyx___strict = __pyx_t_2; - /* "dependency_injector/providers.pyx":1700 + /* "dependency_injector/providers.pyx":1712 + * self.__name = name * self.__strict = strict - * - * value = {} # <<<<<<<<<<<<<< - * if default is not None: - * assert isinstance(default, dict), default - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1700, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_value = __pyx_t_1; - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":1701 - * - * value = {} - * if default is not None: # <<<<<<<<<<<<<< - * assert isinstance(default, dict), default - * value = default.copy() - */ - __pyx_t_2 = (__pyx_v_default != Py_None); - __pyx_t_3 = (__pyx_t_2 != 0); - if (__pyx_t_3) { - - /* "dependency_injector/providers.pyx":1702 - * value = {} - * if default is not None: - * assert isinstance(default, dict), default # <<<<<<<<<<<<<< - * value = default.copy() - * - */ - #ifndef CYTHON_WITHOUT_ASSERTIONS - if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_3 = PyDict_Check(__pyx_v_default); - if (unlikely(!(__pyx_t_3 != 0))) { - __pyx_t_1 = PyTuple_Pack(1, __pyx_v_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1702, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - PyErr_SetObject(PyExc_AssertionError, __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1702, __pyx_L1_error) - } - } - #endif - - /* "dependency_injector/providers.pyx":1703 - * if default is not None: - * assert isinstance(default, dict), default - * value = default.copy() # <<<<<<<<<<<<<< - * - * self.__children = {} - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_default, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1703, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1703, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":1701 - * - * value = {} - * if default is not None: # <<<<<<<<<<<<<< - * assert isinstance(default, dict), default - * value = default.copy() - */ - } - - /* "dependency_injector/providers.pyx":1705 - * value = default.copy() - * * self.__children = {} # <<<<<<<<<<<<<< * - * super().__init__(value) + * super().__init__(provides={}) */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1705, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___children); @@ -35813,45 +36077,66 @@ static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(st __pyx_v_self->__pyx___children = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1707 + /* "dependency_injector/providers.pyx":1714 * self.__children = {} * - * super().__init__(value) # <<<<<<<<<<<<<< + * super().__init__(provides={}) # <<<<<<<<<<<<<< + * self.set_default(default) + * + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); + __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_provides, __pyx_t_4) < 0) __PYX_ERR(1, 1714, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "dependency_injector/providers.pyx":1715 + * + * super().__init__(provides={}) + * self.set_default(default) # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1707, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); - __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1707, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1707, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1707, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_default) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_default); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1715, __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; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1696 + /* "dependency_injector/providers.pyx":1709 * DEFAULT_NAME = 'config' * * def __init__(self, name=DEFAULT_NAME, default=None, strict=False): # <<<<<<<<<<<<<< @@ -35864,22 +36149,21 @@ static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(st goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("dependency_injector.providers.Configuration.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_value); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":1709 - * super().__init__(value) +/* "dependency_injector/providers.pyx":1717 + * self.set_default(default) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< - * cdef Configuration copied - * + * copied = memo.get(id(self)) + * if copied is not None: */ /* Python wrapper */ @@ -35896,7 +36180,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_3__de } static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_memo) { - struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_copied = 0; + PyObject *__pyx_v_copied = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -35905,24 +36189,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; - int __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_9; + PyObject *__pyx_t_7 = NULL; + struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":1712 - * cdef Configuration copied + /* "dependency_injector/providers.pyx":1718 * + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1712, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1712, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -35937,38 +36220,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1712, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Configuration))))) __PYX_ERR(1, 1712, __pyx_L1_error) - __pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_t_1); + __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1713 - * + /* "dependency_injector/providers.pyx":1719 + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied * */ - __pyx_t_5 = (((PyObject *)__pyx_v_copied) != Py_None); + __pyx_t_5 = (__pyx_v_copied != Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":1714 + /* "dependency_injector/providers.pyx":1720 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * copied = self.__class__(self.__name, self.__provides, self.__strict) + * copied = _memorized_duplicate(self, memo) */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_copied)); - __pyx_r = ((PyObject *)__pyx_v_copied); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1713 - * + /* "dependency_injector/providers.pyx":1719 + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied @@ -35976,19 +36258,46 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de */ } - /* "dependency_injector/providers.pyx":1716 + /* "dependency_injector/providers.pyx":1722 * return copied * - * copied = self.__class__(self.__name, self.__provides, self.__strict) # <<<<<<<<<<<<<< - * memo[id(self)] = copied - * + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_name(self.get_name()) + * copied.set_default(self.get_default()) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1716, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1722, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":1723 + * + * copied = _memorized_duplicate(self, memo) + * copied.set_name(self.get_name()) # <<<<<<<<<<<<<< + * copied.set_default(self.get_default()) + * copied.set_strict(self.get_strict()) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___strict); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1716, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; - __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { @@ -35996,113 +36305,183 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_7 = 1; } } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->__pyx___name, __pyx_v_self->__pyx_base.__pyx___provides, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1716, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->__pyx___name, __pyx_v_self->__pyx_base.__pyx___provides, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1716, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1716, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; - } - __Pyx_INCREF(__pyx_v_self->__pyx___name); - __Pyx_GIVEREF(__pyx_v_self->__pyx___name); - PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->__pyx___name); - __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___provides); - __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___provides); - PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_self->__pyx_base.__pyx___provides); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1716, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Configuration))))) __PYX_ERR(1, 1716, __pyx_L1_error) - __Pyx_DECREF_SET(__pyx_v_copied, ((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":1717 - * - * copied = self.__class__(self.__name, self.__provides, self.__strict) - * memo[id(self)] = copied # <<<<<<<<<<<<<< - * - * copied.__children = deepcopy(self.__children, memo) - */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1717, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, ((PyObject *)__pyx_v_copied)) < 0)) __PYX_ERR(1, 1717, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1719 - * memo[id(self)] = copied - * - * copied.__children = deepcopy(self.__children, memo) # <<<<<<<<<<<<<< - * self._copy_overridings(copied, memo) - * + /* "dependency_injector/providers.pyx":1724 + * copied = _memorized_duplicate(self, memo) + * copied.set_name(self.get_name()) + * copied.set_default(self.get_default()) # <<<<<<<<<<<<<< + * copied.set_strict(self.get_strict()) + * copied.set_children(deepcopy(self.get_children(), memo)) */ - __pyx_t_1 = __pyx_v_self->__pyx___children; - __Pyx_INCREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1719, __pyx_L1_error) - __pyx_t_9.__pyx_n = 1; - __pyx_t_9.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1719, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1724, __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; - if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 1719, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_v_copied->__pyx___children); - __Pyx_DECREF(__pyx_v_copied->__pyx___children); - __pyx_v_copied->__pyx___children = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1720 + /* "dependency_injector/providers.pyx":1725 + * copied.set_name(self.get_name()) + * copied.set_default(self.get_default()) + * copied.set_strict(self.get_strict()) # <<<<<<<<<<<<<< + * copied.set_children(deepcopy(self.get_children(), memo)) * - * copied.__children = deepcopy(self.__children, memo) - * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< - * - * return copied */ - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1720, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_strict); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_strict); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":1726 + * copied.set_default(self.get_default()) + * copied.set_strict(self.get_strict()) + * copied.set_children(deepcopy(self.get_children(), memo)) # <<<<<<<<<<<<<< + * + * self._copy_overridings(copied, memo) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_children); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1726, __pyx_L1_error) + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.memo = ((PyObject*)__pyx_v_memo); + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1726, __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 && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_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(1, 1726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":1728 + * copied.set_children(deepcopy(self.get_children(), memo)) + * + * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< + * return copied + * + */ + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 1728, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1728, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":1722 - * self._copy_overridings(copied, memo) + /* "dependency_injector/providers.pyx":1729 * + * self._copy_overridings(copied, memo) * return copied # <<<<<<<<<<<<<< * * def __enter__(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_copied)); - __pyx_r = ((PyObject *)__pyx_v_copied); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1709 - * super().__init__(value) + /* "dependency_injector/providers.pyx":1717 + * self.set_default(default) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< - * cdef Configuration copied - * + * copied = memo.get(id(self)) + * if copied is not None: */ /* function exit code */ @@ -36111,17 +36490,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("dependency_injector.providers.Configuration.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_copied); + __Pyx_XDECREF(__pyx_v_copied); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":1724 +/* "dependency_injector/providers.pyx":1731 * return copied * * def __enter__(self): # <<<<<<<<<<<<<< @@ -36147,7 +36526,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_4__en __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "dependency_injector/providers.pyx":1725 + /* "dependency_injector/providers.pyx":1732 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -36159,7 +36538,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_4__en __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1724 + /* "dependency_injector/providers.pyx":1731 * return copied * * def __enter__(self): # <<<<<<<<<<<<<< @@ -36174,7 +36553,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_4__en return __pyx_r; } -/* "dependency_injector/providers.pyx":1727 +/* "dependency_injector/providers.pyx":1734 * return self * * def __exit__(self, *exc_info): # <<<<<<<<<<<<<< @@ -36212,7 +36591,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ex return __pyx_r; } -/* "dependency_injector/providers.pyx":1730 +/* "dependency_injector/providers.pyx":1737 * pass * * def __str__(self): # <<<<<<<<<<<<<< @@ -36243,7 +36622,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_8__st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":1731 + /* "dependency_injector/providers.pyx":1738 * * def __str__(self): * return represent_provider(provider=self, provides=self.__name) # <<<<<<<<<<<<<< @@ -36253,14 +36632,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_8__st __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->__pyx___name; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1731, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1730 + /* "dependency_injector/providers.pyx":1737 * pass * * def __str__(self): # <<<<<<<<<<<<<< @@ -36280,7 +36659,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_8__st return __pyx_r; } -/* "dependency_injector/providers.pyx":1733 +/* "dependency_injector/providers.pyx":1740 * return represent_provider(provider=self, provides=self.__name) * * def __getattr__(self, item): # <<<<<<<<<<<<<< @@ -36316,14 +36695,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":1734 + /* "dependency_injector/providers.pyx":1741 * * def __getattr__(self, item): * if item.startswith('__') and item.endswith('__'): # <<<<<<<<<<<<<< * raise AttributeError( * '\'{cls}\' object has no attribute ' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1734, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -36335,19 +36714,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__11); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1734, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1734, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1734, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -36359,72 +36738,72 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__11); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1734, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1734, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "dependency_injector/providers.pyx":1737 + /* "dependency_injector/providers.pyx":1744 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=item)) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1737, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1737, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1737, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1737, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 1737, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 1744, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1738 + /* "dependency_injector/providers.pyx":1745 * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, * attribute_name=item)) # <<<<<<<<<<<<<< * * child = self.__children.get(item) */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_item) < 0) __PYX_ERR(1, 1737, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_item) < 0) __PYX_ERR(1, 1744, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1737 + /* "dependency_injector/providers.pyx":1744 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=item)) * */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1737, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1735 + /* "dependency_injector/providers.pyx":1742 * def __getattr__(self, item): * if item.startswith('__') and item.endswith('__'): * raise AttributeError( # <<<<<<<<<<<<<< * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1735, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 1735, __pyx_L1_error) + __PYX_ERR(1, 1742, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1734 + /* "dependency_injector/providers.pyx":1741 * * def __getattr__(self, item): * if item.startswith('__') and item.endswith('__'): # <<<<<<<<<<<<<< @@ -36433,7 +36812,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g */ } - /* "dependency_injector/providers.pyx":1740 + /* "dependency_injector/providers.pyx":1747 * attribute_name=item)) * * child = self.__children.get(item) # <<<<<<<<<<<<<< @@ -36442,14 +36821,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(1, 1740, __pyx_L1_error) + __PYX_ERR(1, 1747, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_item, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1740, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_item, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_child = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1741 + /* "dependency_injector/providers.pyx":1748 * * child = self.__children.get(item) * if child is None: # <<<<<<<<<<<<<< @@ -36460,19 +36839,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pyx":1742 + /* "dependency_injector/providers.pyx":1749 * child = self.__children.get(item) * if child is None: * child = ConfigurationOption((item,), self) # <<<<<<<<<<<<<< * self.__children[item] = child * return child */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1742, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_item); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1742, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); @@ -36480,13 +36859,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_self)); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1742, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_child, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1743 + /* "dependency_injector/providers.pyx":1750 * if child is None: * child = ConfigurationOption((item,), self) * self.__children[item] = child # <<<<<<<<<<<<<< @@ -36495,11 +36874,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 1743, __pyx_L1_error) + __PYX_ERR(1, 1750, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_item, __pyx_v_child) < 0)) __PYX_ERR(1, 1743, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_item, __pyx_v_child) < 0)) __PYX_ERR(1, 1750, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1741 + /* "dependency_injector/providers.pyx":1748 * * child = self.__children.get(item) * if child is None: # <<<<<<<<<<<<<< @@ -36508,7 +36887,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g */ } - /* "dependency_injector/providers.pyx":1744 + /* "dependency_injector/providers.pyx":1751 * child = ConfigurationOption((item,), self) * self.__children[item] = child * return child # <<<<<<<<<<<<<< @@ -36520,7 +36899,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g __pyx_r = __pyx_v_child; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1733 + /* "dependency_injector/providers.pyx":1740 * return represent_provider(provider=self, provides=self.__name) * * def __getattr__(self, item): # <<<<<<<<<<<<<< @@ -36543,7 +36922,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10__g return __pyx_r; } -/* "dependency_injector/providers.pyx":1746 +/* "dependency_injector/providers.pyx":1753 * return child * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -36577,7 +36956,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12__g int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "dependency_injector/providers.pyx":1747 + /* "dependency_injector/providers.pyx":1754 * * def __getitem__(self, item): * child = self.__children.get(item) # <<<<<<<<<<<<<< @@ -36586,14 +36965,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12__g */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(1, 1747, __pyx_L1_error) + __PYX_ERR(1, 1754, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_item, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1747, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_item, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_child = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1748 + /* "dependency_injector/providers.pyx":1755 * def __getitem__(self, item): * child = self.__children.get(item) * if child is None: # <<<<<<<<<<<<<< @@ -36604,14 +36983,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12__g __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "dependency_injector/providers.pyx":1749 + /* "dependency_injector/providers.pyx":1756 * child = self.__children.get(item) * if child is None: * child = ConfigurationOption(item, self) # <<<<<<<<<<<<<< * self.__children[item] = child * return child */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1749, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); @@ -36619,13 +36998,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12__g __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1749, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ConfigurationOption), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_child, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1750 + /* "dependency_injector/providers.pyx":1757 * if child is None: * child = ConfigurationOption(item, self) * self.__children[item] = child # <<<<<<<<<<<<<< @@ -36634,11 +37013,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12__g */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 1750, __pyx_L1_error) + __PYX_ERR(1, 1757, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_item, __pyx_v_child) < 0)) __PYX_ERR(1, 1750, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_item, __pyx_v_child) < 0)) __PYX_ERR(1, 1757, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1748 + /* "dependency_injector/providers.pyx":1755 * def __getitem__(self, item): * child = self.__children.get(item) * if child is None: # <<<<<<<<<<<<<< @@ -36647,7 +37026,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12__g */ } - /* "dependency_injector/providers.pyx":1751 + /* "dependency_injector/providers.pyx":1758 * child = ConfigurationOption(item, self) * self.__children[item] = child * return child # <<<<<<<<<<<<<< @@ -36659,7 +37038,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12__g __pyx_r = __pyx_v_child; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1746 + /* "dependency_injector/providers.pyx":1753 * return child * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -36680,16 +37059,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12__g return __pyx_r; } -/* "dependency_injector/providers.pyx":1753 +/* "dependency_injector/providers.pyx":1760 * return child * * def get_name(self): # <<<<<<<<<<<<<< + * """Return name.""" * return self.__name - * */ /* Python wrapper */ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_15get_name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_14get_name[] = "Return name."; static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_15get_name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -36706,24 +37086,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_14get __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_name", 0); - /* "dependency_injector/providers.pyx":1754 - * + /* "dependency_injector/providers.pyx":1762 * def get_name(self): + * """Return name.""" * return self.__name # <<<<<<<<<<<<<< * - * def get(self, selector, required=False): + * def set_name(self, name): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->__pyx___name); __pyx_r = __pyx_v_self->__pyx___name; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1753 + /* "dependency_injector/providers.pyx":1760 * return child * * def get_name(self): # <<<<<<<<<<<<<< + * """Return name.""" * return self.__name - * */ /* function exit code */ @@ -36733,18 +37113,595 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_14get return __pyx_r; } -/* "dependency_injector/providers.pyx":1756 +/* "dependency_injector/providers.pyx":1764 * return self.__name * + * def set_name(self, name): # <<<<<<<<<<<<<< + * """Set name.""" + * self.__name = name + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_17set_name(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_16set_name[] = "Set name."; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_17set_name(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_name (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_16set_name(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_name)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16set_name(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_name", 0); + + /* "dependency_injector/providers.pyx":1766 + * def set_name(self, name): + * """Set name.""" + * self.__name = name # <<<<<<<<<<<<<< + * return self + * + */ + if (!(likely(PyString_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 1766, __pyx_L1_error) + __pyx_t_1 = __pyx_v_name; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->__pyx___name); + __Pyx_DECREF(__pyx_v_self->__pyx___name); + __pyx_v_self->__pyx___name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":1767 + * """Set name.""" + * self.__name = name + * return self # <<<<<<<<<<<<<< + * + * def get_default(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":1764 + * return self.__name + * + * def set_name(self, name): # <<<<<<<<<<<<<< + * """Set name.""" + * self.__name = name + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers.Configuration.set_name", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":1769 + * return self + * + * def get_default(self): # <<<<<<<<<<<<<< + * """Return default.""" + * return self.provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_19get_default(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_18get_default[] = "Return default."; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_19get_default(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_default (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_18get_default(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18get_default(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_default", 0); + + /* "dependency_injector/providers.pyx":1771 + * def get_default(self): + * """Return default.""" + * return self.provides # <<<<<<<<<<<<<< + * + * def set_default(self, default): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":1769 + * return self + * + * def get_default(self): # <<<<<<<<<<<<<< + * """Return default.""" + * return self.provides + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers.Configuration.get_default", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":1773 + * return self.provides + * + * def set_default(self, default): # <<<<<<<<<<<<<< + * """Set default.""" + * if not default: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_21set_default(PyObject *__pyx_v_self, PyObject *__pyx_v_default); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_20set_default[] = "Set default."; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_21set_default(PyObject *__pyx_v_self, PyObject *__pyx_v_default) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_default (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_20set_default(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_default)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20set_default(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_default) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_default", 0); + + /* "dependency_injector/providers.pyx":1775 + * def set_default(self, default): + * """Set default.""" + * if not default: # <<<<<<<<<<<<<< + * return self + * + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_default); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1775, __pyx_L1_error) + __pyx_t_2 = ((!__pyx_t_1) != 0); + if (__pyx_t_2) { + + /* "dependency_injector/providers.pyx":1776 + * """Set default.""" + * if not default: + * return self # <<<<<<<<<<<<<< + * + * assert isinstance(default, dict), default + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":1775 + * def set_default(self, default): + * """Set default.""" + * if not default: # <<<<<<<<<<<<<< + * return self + * + */ + } + + /* "dependency_injector/providers.pyx":1778 + * return self + * + * assert isinstance(default, dict), default # <<<<<<<<<<<<<< + * self.set_provides(default.copy()) + * return self + */ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(!Py_OptimizeFlag)) { + __pyx_t_2 = PyDict_Check(__pyx_v_default); + if (unlikely(!(__pyx_t_2 != 0))) { + __pyx_t_3 = PyTuple_Pack(1, __pyx_v_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + PyErr_SetObject(PyExc_AssertionError, __pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 1778, __pyx_L1_error) + } + } + #endif + + /* "dependency_injector/providers.pyx":1779 + * + * assert isinstance(default, dict), default + * self.set_provides(default.copy()) # <<<<<<<<<<<<<< + * return self + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_default, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 1779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "dependency_injector/providers.pyx":1780 + * assert isinstance(default, dict), default + * self.set_provides(default.copy()) + * return self # <<<<<<<<<<<<<< + * + * def get_strict(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":1773 + * return self.provides + * + * def set_default(self, default): # <<<<<<<<<<<<<< + * """Set default.""" + * if not default: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("dependency_injector.providers.Configuration.set_default", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":1782 + * return self + * + * def get_strict(self): # <<<<<<<<<<<<<< + * """Return strict flag.""" + * return self.__strict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_23get_strict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_22get_strict[] = "Return strict flag."; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_23get_strict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_strict (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_22get_strict(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22get_strict(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_strict", 0); + + /* "dependency_injector/providers.pyx":1784 + * def get_strict(self): + * """Return strict flag.""" + * return self.__strict # <<<<<<<<<<<<<< + * + * def set_strict(self, strict): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":1782 + * return self + * + * def get_strict(self): # <<<<<<<<<<<<<< + * """Return strict flag.""" + * return self.__strict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers.Configuration.get_strict", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":1786 + * return self.__strict + * + * def set_strict(self, strict): # <<<<<<<<<<<<<< + * """Set strict flag.""" + * self.__strict = strict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_25set_strict(PyObject *__pyx_v_self, PyObject *__pyx_v_strict); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_24set_strict[] = "Set strict flag."; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_25set_strict(PyObject *__pyx_v_self, PyObject *__pyx_v_strict) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_strict (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_24set_strict(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_strict)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24set_strict(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_strict) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_strict", 0); + + /* "dependency_injector/providers.pyx":1788 + * def set_strict(self, strict): + * """Set strict flag.""" + * self.__strict = strict # <<<<<<<<<<<<<< + * return self + * + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_strict); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1788, __pyx_L1_error) + __pyx_v_self->__pyx___strict = __pyx_t_1; + + /* "dependency_injector/providers.pyx":1789 + * """Set strict flag.""" + * self.__strict = strict + * return self # <<<<<<<<<<<<<< + * + * def get_children(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":1786 + * return self.__strict + * + * def set_strict(self, strict): # <<<<<<<<<<<<<< + * """Set strict flag.""" + * self.__strict = strict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("dependency_injector.providers.Configuration.set_strict", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":1791 + * return self + * + * def get_children(self): # <<<<<<<<<<<<<< + * """Return children options.""" + * return self.__children + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_27get_children(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_26get_children[] = "Return children options."; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_27get_children(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_children (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_26get_children(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26get_children(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_children", 0); + + /* "dependency_injector/providers.pyx":1793 + * def get_children(self): + * """Return children options.""" + * return self.__children # <<<<<<<<<<<<<< + * + * def set_children(self, children): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->__pyx___children); + __pyx_r = __pyx_v_self->__pyx___children; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":1791 + * return self + * + * def get_children(self): # <<<<<<<<<<<<<< + * """Return children options.""" + * return self.__children + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":1795 + * return self.__children + * + * def set_children(self, children): # <<<<<<<<<<<<<< + * """Set children options.""" + * self.__children = children + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_29set_children(PyObject *__pyx_v_self, PyObject *__pyx_v_children); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_28set_children[] = "Set children options."; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_29set_children(PyObject *__pyx_v_self, PyObject *__pyx_v_children) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_children (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_28set_children(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_children)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_28set_children(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_children) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_children", 0); + + /* "dependency_injector/providers.pyx":1797 + * def set_children(self, children): + * """Set children options.""" + * self.__children = children # <<<<<<<<<<<<<< + * return self + * + */ + if (!(likely(PyDict_CheckExact(__pyx_v_children))||((__pyx_v_children) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_children)->tp_name), 0))) __PYX_ERR(1, 1797, __pyx_L1_error) + __pyx_t_1 = __pyx_v_children; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->__pyx___children); + __Pyx_DECREF(__pyx_v_self->__pyx___children); + __pyx_v_self->__pyx___children = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":1798 + * """Set children options.""" + * self.__children = children + * return self # <<<<<<<<<<<<<< + * + * def get(self, selector, required=False): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":1795 + * return self.__children + * + * def set_children(self, children): # <<<<<<<<<<<<<< + * """Set children options.""" + * self.__children = children + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers.Configuration.set_children", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":1800 + * return self + * * def get(self, selector, required=False): # <<<<<<<<<<<<<< * """Return configuration option. * */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_17get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_16get[] = "Return configuration option.\n\n :param selector: Selector string, e.g. \"option1.option2\"\n :type selector: str\n\n :param required: Required flag, raise error if required option is missing\n :type required: bool\n\n :return: Option value.\n :rtype: Any\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_17get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_31get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_30get[] = "Return configuration option.\n\n :param selector: Selector string, e.g. \"option1.option2\"\n :type selector: str\n\n :param required: Required flag, raise error if required option is missing\n :type required: bool\n\n :return: Option value.\n :rtype: Any\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_31get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_selector = 0; PyObject *__pyx_v_required = 0; int __pyx_lineno = 0; @@ -36781,7 +37738,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_17get } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(1, 1756, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(1, 1800, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -36797,20 +37754,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_17get } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1756, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1800, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Configuration.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_16get(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_selector, __pyx_v_required); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_30get(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_selector, __pyx_v_required); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_selector, PyObject *__pyx_v_required) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30get(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_selector, PyObject *__pyx_v_required) { PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_keys = NULL; PyObject *__pyx_v_key = NULL; @@ -36831,14 +37788,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get", 0); - /* "dependency_injector/providers.pyx":1768 + /* "dependency_injector/providers.pyx":1812 * :rtype: Any * """ * value = self.__call__() # <<<<<<<<<<<<<< * * if value is None: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1768, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -36852,13 +37809,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1768, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1770 + /* "dependency_injector/providers.pyx":1814 * value = self.__call__() * * if value is None: # <<<<<<<<<<<<<< @@ -36869,14 +37826,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pyx":1771 + /* "dependency_injector/providers.pyx":1815 * * if value is None: * if self._is_strict_mode_enabled() or required: # <<<<<<<<<<<<<< * raise Error('Undefined configuration option "{0}.{1}"'.format(self.__name, selector)) * return None */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1771, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -36890,31 +37847,31 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1771, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1771, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1815, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_required); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1771, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_required); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1815, __pyx_L1_error) __pyx_t_5 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_5)) { - /* "dependency_injector/providers.pyx":1772 + /* "dependency_injector/providers.pyx":1816 * if value is None: * if self._is_strict_mode_enabled() or required: * raise Error('Undefined configuration option "{0}.{1}"'.format(self.__name, selector)) # <<<<<<<<<<<<<< * return None * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1772, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Undefined_configuration_option_0, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1772, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Undefined_configuration_option_0, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -36931,7 +37888,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_self->__pyx___name, __pyx_v_selector}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1772, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1816, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -36939,13 +37896,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_self->__pyx___name, __pyx_v_selector}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1772, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1816, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1772, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -36956,7 +37913,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __Pyx_INCREF(__pyx_v_selector); __Pyx_GIVEREF(__pyx_v_selector); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_selector); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1772, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -36974,14 +37931,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1772, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1772, __pyx_L1_error) + __PYX_ERR(1, 1816, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1771 + /* "dependency_injector/providers.pyx":1815 * * if value is None: * if self._is_strict_mode_enabled() or required: # <<<<<<<<<<<<<< @@ -36990,7 +37947,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get */ } - /* "dependency_injector/providers.pyx":1773 + /* "dependency_injector/providers.pyx":1817 * if self._is_strict_mode_enabled() or required: * raise Error('Undefined configuration option "{0}.{1}"'.format(self.__name, selector)) * return None # <<<<<<<<<<<<<< @@ -37001,7 +37958,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1770 + /* "dependency_injector/providers.pyx":1814 * value = self.__call__() * * if value is None: # <<<<<<<<<<<<<< @@ -37010,14 +37967,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get */ } - /* "dependency_injector/providers.pyx":1775 + /* "dependency_injector/providers.pyx":1819 * return None * * keys = selector.split('.') # <<<<<<<<<<<<<< * while len(keys) > 0: * key = keys.pop(0) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_selector, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1775, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_selector, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -37029,15 +37986,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s__7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s__7); + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s__6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s__6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1775, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_keys = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1776 + /* "dependency_injector/providers.pyx":1820 * * keys = selector.split('.') * while len(keys) > 0: # <<<<<<<<<<<<<< @@ -37045,32 +38002,32 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get * value = value.get(key, UNDEFINED) */ while (1) { - __pyx_t_10 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1776, __pyx_L1_error) + __pyx_t_10 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1820, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_10 > 0) != 0); if (!__pyx_t_5) break; - /* "dependency_injector/providers.pyx":1777 + /* "dependency_injector/providers.pyx":1821 * keys = selector.split('.') * while len(keys) > 0: * key = keys.pop(0) # <<<<<<<<<<<<<< * value = value.get(key, UNDEFINED) * */ - __pyx_t_1 = __Pyx_PyObject_PopIndex(__pyx_v_keys, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1777, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_PopIndex(__pyx_v_keys, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1778 + /* "dependency_injector/providers.pyx":1822 * while len(keys) > 0: * key = keys.pop(0) * value = value.get(key, UNDEFINED) # <<<<<<<<<<<<<< * * if value is UNDEFINED: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1778, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1778, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_8 = 0; @@ -37087,7 +38044,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_key, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1778, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -37096,14 +38053,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_key, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1778, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1778, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -37114,7 +38071,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1778, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -37122,28 +38079,28 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1780 + /* "dependency_injector/providers.pyx":1824 * value = value.get(key, UNDEFINED) * * if value is UNDEFINED: # <<<<<<<<<<<<<< * if self._is_strict_mode_enabled() or required: * raise Error('Undefined configuration option "{0}.{1}"'.format(self.__name, selector)) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1780, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = (__pyx_v_value == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "dependency_injector/providers.pyx":1781 + /* "dependency_injector/providers.pyx":1825 * * if value is UNDEFINED: * if self._is_strict_mode_enabled() or required: # <<<<<<<<<<<<<< * raise Error('Undefined configuration option "{0}.{1}"'.format(self.__name, selector)) * return None */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1781, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -37157,31 +38114,31 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1781, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1781, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1825, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L11_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_required); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1781, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_required); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1825, __pyx_L1_error) __pyx_t_4 = __pyx_t_5; __pyx_L11_bool_binop_done:; if (unlikely(__pyx_t_4)) { - /* "dependency_injector/providers.pyx":1782 + /* "dependency_injector/providers.pyx":1826 * if value is UNDEFINED: * if self._is_strict_mode_enabled() or required: * raise Error('Undefined configuration option "{0}.{1}"'.format(self.__name, selector)) # <<<<<<<<<<<<<< * return None * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1782, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Undefined_configuration_option_0, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1782, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Undefined_configuration_option_0, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_8 = 0; @@ -37198,7 +38155,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self->__pyx___name, __pyx_v_selector}; - __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1782, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1826, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_9); } else @@ -37206,13 +38163,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self->__pyx___name, __pyx_v_selector}; - __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1782, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1826, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1782, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -37223,7 +38180,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __Pyx_INCREF(__pyx_v_selector); __Pyx_GIVEREF(__pyx_v_selector); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_selector); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1782, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -37241,14 +38198,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1782, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1782, __pyx_L1_error) + __PYX_ERR(1, 1826, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1781 + /* "dependency_injector/providers.pyx":1825 * * if value is UNDEFINED: * if self._is_strict_mode_enabled() or required: # <<<<<<<<<<<<<< @@ -37257,7 +38214,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get */ } - /* "dependency_injector/providers.pyx":1783 + /* "dependency_injector/providers.pyx":1827 * if self._is_strict_mode_enabled() or required: * raise Error('Undefined configuration option "{0}.{1}"'.format(self.__name, selector)) * return None # <<<<<<<<<<<<<< @@ -37268,7 +38225,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1780 + /* "dependency_injector/providers.pyx":1824 * value = value.get(key, UNDEFINED) * * if value is UNDEFINED: # <<<<<<<<<<<<<< @@ -37278,7 +38235,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get } } - /* "dependency_injector/providers.pyx":1785 + /* "dependency_injector/providers.pyx":1829 * return None * * return value # <<<<<<<<<<<<<< @@ -37290,8 +38247,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get __pyx_r = __pyx_v_value; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1756 - * return self.__name + /* "dependency_injector/providers.pyx":1800 + * return self * * def get(self, selector, required=False): # <<<<<<<<<<<<<< * """Return configuration option. @@ -37317,7 +38274,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get return __pyx_r; } -/* "dependency_injector/providers.pyx":1787 +/* "dependency_injector/providers.pyx":1831 * return value * * def set(self, selector, value): # <<<<<<<<<<<<<< @@ -37326,9 +38283,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16get */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_19set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_18set[] = "Override configuration option.\n\n :param selector: Selector string, e.g. \"option1.option2\"\n :type selector: str\n\n :param value: Overriding value\n :type value: Any\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_19set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_33set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_32set[] = "Override configuration option.\n\n :param selector: Selector string, e.g. \"option1.option2\"\n :type selector: str\n\n :param value: Overriding value\n :type value: Any\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_33set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_selector = 0; PyObject *__pyx_v_value = 0; int __pyx_lineno = 0; @@ -37360,11 +38317,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_19set case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(1, 1787, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(1, 1831, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(1, 1787, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(1, 1831, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -37377,20 +38334,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_19set } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1787, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1831, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Configuration.set", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_18set(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_selector, __pyx_v_value); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_32set(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_selector, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_selector, PyObject *__pyx_v_value) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32set(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_selector, PyObject *__pyx_v_value) { PyObject *__pyx_v_original_value = NULL; PyObject *__pyx_v_current_value = NULL; PyObject *__pyx_v_keys = NULL; @@ -37411,14 +38368,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set", 0); - /* "dependency_injector/providers.pyx":1799 + /* "dependency_injector/providers.pyx":1843 * :rtype: :py:class:`OverridingContext` * """ * original_value = current_value = deepcopy(self.__call__()) # <<<<<<<<<<<<<< * * keys = selector.split('.') */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1799, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -37432,10 +38389,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1799, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1799, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_t_2); @@ -37444,14 +38401,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set __pyx_v_current_value = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1801 + /* "dependency_injector/providers.pyx":1845 * original_value = current_value = deepcopy(self.__call__()) * * keys = selector.split('.') # <<<<<<<<<<<<<< * while len(keys) > 0: * key = keys.pop(0) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_selector, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1801, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_selector, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -37463,15 +38420,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_kp_s__7) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s__7); + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_kp_s__6) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s__6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1801, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_keys = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1802 + /* "dependency_injector/providers.pyx":1846 * * keys = selector.split('.') * while len(keys) > 0: # <<<<<<<<<<<<<< @@ -37479,43 +38436,43 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set * if len(keys) == 0: */ while (1) { - __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1802, __pyx_L1_error) + __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1846, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 > 0) != 0); if (!__pyx_t_5) break; - /* "dependency_injector/providers.pyx":1803 + /* "dependency_injector/providers.pyx":1847 * keys = selector.split('.') * while len(keys) > 0: * key = keys.pop(0) # <<<<<<<<<<<<<< * if len(keys) == 0: * current_value[key] = value */ - __pyx_t_2 = __Pyx_PyObject_PopIndex(__pyx_v_keys, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1803, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_PopIndex(__pyx_v_keys, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1804 + /* "dependency_injector/providers.pyx":1848 * while len(keys) > 0: * key = keys.pop(0) * if len(keys) == 0: # <<<<<<<<<<<<<< * current_value[key] = value * break */ - __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1804, __pyx_L1_error) + __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1848, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 == 0) != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pyx":1805 + /* "dependency_injector/providers.pyx":1849 * key = keys.pop(0) * if len(keys) == 0: * current_value[key] = value # <<<<<<<<<<<<<< * break * temp_value = current_value.get(key, {}) */ - if (unlikely(PyObject_SetItem(__pyx_v_current_value, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(1, 1805, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_current_value, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(1, 1849, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1806 + /* "dependency_injector/providers.pyx":1850 * if len(keys) == 0: * current_value[key] = value * break # <<<<<<<<<<<<<< @@ -37524,7 +38481,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set */ goto __pyx_L4_break; - /* "dependency_injector/providers.pyx":1804 + /* "dependency_injector/providers.pyx":1848 * while len(keys) > 0: * key = keys.pop(0) * if len(keys) == 0: # <<<<<<<<<<<<<< @@ -37533,16 +38490,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set */ } - /* "dependency_injector/providers.pyx":1807 + /* "dependency_injector/providers.pyx":1851 * current_value[key] = value * break * temp_value = current_value.get(key, {}) # <<<<<<<<<<<<<< * current_value[key] = temp_value * current_value = temp_value */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_value, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1807, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_value, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1807, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -37559,7 +38516,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_key, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1807, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1851, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -37568,14 +38525,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_key, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1807, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1851, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1807, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1851, __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; @@ -37586,7 +38543,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1807, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -37594,16 +38551,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set __Pyx_XDECREF_SET(__pyx_v_temp_value, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1808 + /* "dependency_injector/providers.pyx":1852 * break * temp_value = current_value.get(key, {}) * current_value[key] = temp_value # <<<<<<<<<<<<<< * current_value = temp_value * */ - if (unlikely(PyObject_SetItem(__pyx_v_current_value, __pyx_v_key, __pyx_v_temp_value) < 0)) __PYX_ERR(1, 1808, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_current_value, __pyx_v_key, __pyx_v_temp_value) < 0)) __PYX_ERR(1, 1852, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1809 + /* "dependency_injector/providers.pyx":1853 * temp_value = current_value.get(key, {}) * current_value[key] = temp_value * current_value = temp_value # <<<<<<<<<<<<<< @@ -37615,7 +38572,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set } __pyx_L4_break:; - /* "dependency_injector/providers.pyx":1811 + /* "dependency_injector/providers.pyx":1855 * current_value = temp_value * * return self.override(original_value) # <<<<<<<<<<<<<< @@ -37623,7 +38580,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set * def override(self, provider): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1811, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -37637,14 +38594,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set } __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_v_original_value) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_original_value); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1811, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1787 + /* "dependency_injector/providers.pyx":1831 * return value * * def set(self, selector, value): # <<<<<<<<<<<<<< @@ -37672,7 +38629,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set return __pyx_r; } -/* "dependency_injector/providers.pyx":1813 +/* "dependency_injector/providers.pyx":1857 * return self.override(original_value) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -37681,20 +38638,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18set */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_21override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_20override[] = "Override provider with another provider.\n\n :param provider: Overriding provider.\n :type provider: :py:class:`Provider`\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_21override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_35override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_34override[] = "Override provider with another provider.\n\n :param provider: Overriding provider.\n :type provider: :py:class:`Provider`\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_35override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("override (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_20override(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_provider)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_34override(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_provider)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_provider) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_provider) { PyObject *__pyx_v_context = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -37706,14 +38663,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20ove int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":1824 + /* "dependency_injector/providers.pyx":1868 * :rtype: :py:class:`OverridingContext` * """ * context = super().override(provider) # <<<<<<<<<<<<<< * self.reset_cache() * return context */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1824, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); @@ -37721,10 +38678,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20ove __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1824, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1824, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -37739,20 +38696,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20ove } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provider); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1824, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_context = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1825 + /* "dependency_injector/providers.pyx":1869 * """ * context = super().override(provider) * self.reset_cache() # <<<<<<<<<<<<<< * return context * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1825, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -37766,12 +38723,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20ove } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1825, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1826 + /* "dependency_injector/providers.pyx":1870 * context = super().override(provider) * self.reset_cache() * return context # <<<<<<<<<<<<<< @@ -37783,7 +38740,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20ove __pyx_r = __pyx_v_context; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1813 + /* "dependency_injector/providers.pyx":1857 * return self.override(original_value) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -37805,7 +38762,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20ove return __pyx_r; } -/* "dependency_injector/providers.pyx":1828 +/* "dependency_injector/providers.pyx":1872 * return context * * def reset_last_overriding(self): # <<<<<<<<<<<<<< @@ -37814,20 +38771,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20ove */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_23reset_last_overriding(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_22reset_last_overriding[] = "Reset last overriding provider.\n\n :raise: :py:exc:`dependency_injector.errors.Error` if provider is not\n overridden.\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_23reset_last_overriding(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_37reset_last_overriding(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_36reset_last_overriding[] = "Reset last overriding provider.\n\n :raise: :py:exc:`dependency_injector.errors.Error` if provider is not\n overridden.\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_37reset_last_overriding(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset_last_overriding (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_22reset_last_overriding(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_36reset_last_overriding(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22reset_last_overriding(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36reset_last_overriding(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -37838,14 +38795,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22res int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_last_overriding", 0); - /* "dependency_injector/providers.pyx":1836 + /* "dependency_injector/providers.pyx":1880 * :rtype: None * """ * super().reset_last_overriding() # <<<<<<<<<<<<<< * self.reset_cache() * */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1836, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); @@ -37853,10 +38810,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22res __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1836, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1836, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -37871,19 +38828,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22res } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1836, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1837 + /* "dependency_injector/providers.pyx":1881 * """ * super().reset_last_overriding() * self.reset_cache() # <<<<<<<<<<<<<< * * def reset_override(self): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1837, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -37897,12 +38854,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22res } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1837, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1828 + /* "dependency_injector/providers.pyx":1872 * return context * * def reset_last_overriding(self): # <<<<<<<<<<<<<< @@ -37925,7 +38882,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22res return __pyx_r; } -/* "dependency_injector/providers.pyx":1839 +/* "dependency_injector/providers.pyx":1883 * self.reset_cache() * * def reset_override(self): # <<<<<<<<<<<<<< @@ -37934,20 +38891,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22res */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_25reset_override(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_24reset_override[] = "Reset all overriding providers.\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_25reset_override(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_39reset_override(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_38reset_override[] = "Reset all overriding providers.\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_39reset_override(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset_override (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_24reset_override(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_38reset_override(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24reset_override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38reset_override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -37958,14 +38915,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24res int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_override", 0); - /* "dependency_injector/providers.pyx":1844 + /* "dependency_injector/providers.pyx":1888 * :rtype: None * """ * super().reset_override() # <<<<<<<<<<<<<< * self.reset_cache() * */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1844, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); @@ -37973,10 +38930,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24res __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1844, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1844, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -37991,19 +38948,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24res } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1844, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1845 + /* "dependency_injector/providers.pyx":1889 * """ * super().reset_override() * self.reset_cache() # <<<<<<<<<<<<<< * * def reset_cache(self): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1845, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset_cache); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -38017,12 +38974,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24res } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1845, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1839 + /* "dependency_injector/providers.pyx":1883 * self.reset_cache() * * def reset_override(self): # <<<<<<<<<<<<<< @@ -38045,7 +39002,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24res return __pyx_r; } -/* "dependency_injector/providers.pyx":1847 +/* "dependency_injector/providers.pyx":1891 * self.reset_cache() * * def reset_cache(self): # <<<<<<<<<<<<<< @@ -38054,20 +39011,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24res */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_27reset_cache(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_26reset_cache[] = "Reset children providers cache.\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_27reset_cache(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_41reset_cache(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_40reset_cache[] = "Reset children providers cache.\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_41reset_cache(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset_cache (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_26reset_cache(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_40reset_cache(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26reset_cache(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_40reset_cache(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { PyObject *__pyx_v_child = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -38082,7 +39039,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26res int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_cache", 0); - /* "dependency_injector/providers.pyx":1852 + /* "dependency_injector/providers.pyx":1896 * :rtype: None * """ * for child in self.__children.values(): # <<<<<<<<<<<<<< @@ -38091,17 +39048,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26res */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(1, 1852, __pyx_L1_error) + __PYX_ERR(1, 1896, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1852, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1896, __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, 1852, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1896, __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, 1852, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1896, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -38109,17 +39066,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26res 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, 1852, __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, 1896, __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, 1852, __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, 1896, __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, 1852, __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, 1896, __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, 1852, __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, 1896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -38129,7 +39086,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26res PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 1852, __pyx_L1_error) + else __PYX_ERR(1, 1896, __pyx_L1_error) } break; } @@ -38138,14 +39095,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26res __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1853 + /* "dependency_injector/providers.pyx":1897 * """ * for child in self.__children.values(): * child.reset_cache() # <<<<<<<<<<<<<< * * def update(self, value): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_cache); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1853, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_cache); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -38159,12 +39116,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26res } __pyx_t_1 = (__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_1)) __PYX_ERR(1, 1853, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1852 + /* "dependency_injector/providers.pyx":1896 * :rtype: None * """ * for child in self.__children.values(): # <<<<<<<<<<<<<< @@ -38174,7 +39131,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26res } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1847 + /* "dependency_injector/providers.pyx":1891 * self.reset_cache() * * def reset_cache(self): # <<<<<<<<<<<<<< @@ -38199,7 +39156,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26res return __pyx_r; } -/* "dependency_injector/providers.pyx":1855 +/* "dependency_injector/providers.pyx":1899 * child.reset_cache() * * def update(self, value): # <<<<<<<<<<<<<< @@ -38208,20 +39165,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_26res */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_29update(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_28update[] = "Set configuration options.\n\n .. deprecated:: 3.11\n\n Use :py:meth:`Configuration.override` instead.\n\n :param value: Value of configuration option.\n :type value: object | dict\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_29update(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_43update(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_42update[] = "Set configuration options.\n\n .. deprecated:: 3.11\n\n Use :py:meth:`Configuration.override` instead.\n\n :param value: Value of configuration option.\n :type value: object | dict\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_43update(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_28update(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_42update(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_28update(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_value) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_42update(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_value) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -38232,14 +39189,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_28upd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update", 0); - /* "dependency_injector/providers.pyx":1867 + /* "dependency_injector/providers.pyx":1911 * :rtype: None * """ * self.override(value) # <<<<<<<<<<<<<< * * def from_ini(self, filepath, required=UNDEFINED): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1867, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -38253,12 +39210,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_28upd } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1867, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1855 + /* "dependency_injector/providers.pyx":1899 * child.reset_cache() * * def update(self, value): # <<<<<<<<<<<<<< @@ -38281,7 +39238,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_28upd return __pyx_r; } -/* "dependency_injector/providers.pyx":1869 +/* "dependency_injector/providers.pyx":1913 * self.override(value) * * def from_ini(self, filepath, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -38290,9 +39247,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_28upd */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_31from_ini(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_30from_ini[] = "Load configuration from the ini file.\n\n Loaded configuration is merged recursively over existing configuration.\n\n :param filepath: Path to the configuration file.\n :type filepath: str\n\n :param required: When required is True, raise an exception if file does not exist.\n :type required: bool\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_31from_ini(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_45from_ini(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_44from_ini[] = "Load configuration from the ini file.\n\n Loaded configuration is merged recursively over existing configuration.\n\n :param filepath: Path to the configuration file.\n :type filepath: str\n\n :param required: When required is True, raise an exception if file does not exist.\n :type required: bool\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_45from_ini(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filepath = 0; PyObject *__pyx_v_required = 0; int __pyx_lineno = 0; @@ -38304,7 +39261,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_31fro { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filepath,&__pyx_n_s_required,0}; PyObject* values[2] = {0,0}; - values[1] = __pyx_k__21; + values[1] = __pyx_k__20; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -38329,7 +39286,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_31fro } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_ini") < 0)) __PYX_ERR(1, 1869, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_ini") < 0)) __PYX_ERR(1, 1913, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -38345,20 +39302,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_31fro } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_ini", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1869, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_ini", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1913, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Configuration.from_ini", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_30from_ini(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_filepath, __pyx_v_required); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_44from_ini(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_filepath, __pyx_v_required); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30from_ini(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_filepath, PyObject *__pyx_v_required) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_44from_ini(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_filepath, PyObject *__pyx_v_required) { PyObject *__pyx_v_parser = NULL; PyObject *__pyx_v_exception = NULL; PyObject *__pyx_v_config = NULL; @@ -38387,7 +39344,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_ini", 0); - /* "dependency_injector/providers.pyx":1882 + /* "dependency_injector/providers.pyx":1926 * :rtype: None * """ * try: # <<<<<<<<<<<<<< @@ -38403,14 +39360,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":1883 + /* "dependency_injector/providers.pyx":1927 * """ * try: * parser = _parse_ini_file(filepath) # <<<<<<<<<<<<<< * except IOError as exception: * if required is not False \ */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_parse_ini_file); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1883, __pyx_L3_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_parse_ini_file); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1927, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -38424,13 +39381,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_filepath) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filepath); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1883, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1927, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_parser = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1882 + /* "dependency_injector/providers.pyx":1926 * :rtype: None * """ * try: # <<<<<<<<<<<<<< @@ -38447,7 +39404,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1884 + /* "dependency_injector/providers.pyx":1928 * try: * parser = _parse_ini_file(filepath) * except IOError as exception: # <<<<<<<<<<<<<< @@ -38457,14 +39414,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IOError); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.Configuration.from_ini", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 1884, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 1928, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_exception = __pyx_t_5; - /* "dependency_injector/providers.pyx":1885 + /* "dependency_injector/providers.pyx":1929 * parser = _parse_ini_file(filepath) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -38479,14 +39436,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro goto __pyx_L12_bool_binop_done; } - /* "dependency_injector/providers.pyx":1886 + /* "dependency_injector/providers.pyx":1930 * except IOError as exception: * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ # <<<<<<<<<<<<<< * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1886, __pyx_L5_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1930, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -38500,10 +39457,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro } __pyx_t_11 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1886, __pyx_L5_except_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1930, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1886, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1930, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (!__pyx_t_10) { } else { @@ -38518,37 +39475,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro } __pyx_L14_next_and:; - /* "dependency_injector/providers.pyx":1887 + /* "dependency_injector/providers.pyx":1931 * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ * and exception.errno in (errno.ENOENT, errno.EISDIR): # <<<<<<<<<<<<<< * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_errno); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1887, __pyx_L5_except_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_errno); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1931, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_errno); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1887, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_errno); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1931, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_ENOENT); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1887, __pyx_L5_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_ENOENT); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1931, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1887, __pyx_L5_except_error) + __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1931, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1887, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1931, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L16_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_errno); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1887, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_errno); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1931, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_EISDIR); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1887, __pyx_L5_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_EISDIR); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1931, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1887, __pyx_L5_except_error) + __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1931, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1887, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 1931, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_9 = __pyx_t_10; __pyx_L16_bool_binop_done:; @@ -38557,7 +39514,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro __pyx_t_8 = __pyx_t_10; __pyx_L12_bool_binop_done:; - /* "dependency_injector/providers.pyx":1885 + /* "dependency_injector/providers.pyx":1929 * parser = _parse_ini_file(filepath) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -38566,16 +39523,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro */ if (unlikely(__pyx_t_8)) { - /* "dependency_injector/providers.pyx":1888 + /* "dependency_injector/providers.pyx":1932 * and (self._is_strict_mode_enabled() or required is True) \ * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) # <<<<<<<<<<<<<< * raise * return */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_load_configuration_fil, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1888, __pyx_L5_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_load_configuration_fil, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1932, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_strerror); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1888, __pyx_L5_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_strerror); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1932, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -38590,13 +39547,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro __pyx_t_11 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1888, __pyx_L5_except_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1932, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_exception, __pyx_n_s_strerror, __pyx_t_11) < 0) __PYX_ERR(1, 1888, __pyx_L5_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_exception, __pyx_n_s_strerror, __pyx_t_11) < 0) __PYX_ERR(1, 1932, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "dependency_injector/providers.pyx":1889 + /* "dependency_injector/providers.pyx":1933 * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise # <<<<<<<<<<<<<< @@ -38608,9 +39565,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - __PYX_ERR(1, 1889, __pyx_L5_except_error) + __PYX_ERR(1, 1933, __pyx_L5_except_error) - /* "dependency_injector/providers.pyx":1885 + /* "dependency_injector/providers.pyx":1929 * parser = _parse_ini_file(filepath) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -38619,7 +39576,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro */ } - /* "dependency_injector/providers.pyx":1890 + /* "dependency_injector/providers.pyx":1934 * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise * return # <<<<<<<<<<<<<< @@ -38636,7 +39593,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":1882 + /* "dependency_injector/providers.pyx":1926 * :rtype: None * """ * try: # <<<<<<<<<<<<<< @@ -38657,26 +39614,26 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro __pyx_L8_try_end:; } - /* "dependency_injector/providers.pyx":1892 + /* "dependency_injector/providers.pyx":1936 * return * * config = {} # <<<<<<<<<<<<<< * for section in parser.sections(): * config[section] = dict(parser.items(section)) */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1892, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_config = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1893 + /* "dependency_injector/providers.pyx":1937 * * config = {} * for section in parser.sections(): # <<<<<<<<<<<<<< * config[section] = dict(parser.items(section)) * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_sections); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1893, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_sections); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -38690,16 +39647,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro } __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1893, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_15 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1893, __pyx_L1_error) + __pyx_t_15 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_16 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 1893, __pyx_L1_error) + __pyx_t_16 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 1937, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -38707,17 +39664,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(1, 1893, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(1, 1937, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1893, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(1, 1893, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_6); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(1, 1937, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1893, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -38727,7 +39684,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 1893, __pyx_L1_error) + else __PYX_ERR(1, 1937, __pyx_L1_error) } break; } @@ -38736,14 +39693,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro __Pyx_XDECREF_SET(__pyx_v_section, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1894 + /* "dependency_injector/providers.pyx":1938 * config = {} * for section in parser.sections(): * config[section] = dict(parser.items(section)) # <<<<<<<<<<<<<< * * current_config = self.__call__() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1894, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -38757,16 +39714,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro } __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_v_section) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_section); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1894, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1894, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_config, __pyx_v_section, __pyx_t_4) < 0)) __PYX_ERR(1, 1894, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_config, __pyx_v_section, __pyx_t_4) < 0)) __PYX_ERR(1, 1938, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1893 + /* "dependency_injector/providers.pyx":1937 * * config = {} * for section in parser.sections(): # <<<<<<<<<<<<<< @@ -38776,14 +39733,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1896 + /* "dependency_injector/providers.pyx":1940 * config[section] = dict(parser.items(section)) * * current_config = self.__call__() # <<<<<<<<<<<<<< * if not current_config: * current_config = {} */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1896, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -38797,36 +39754,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1896, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_current_config = __pyx_t_5; __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1897 + /* "dependency_injector/providers.pyx":1941 * * current_config = self.__call__() * if not current_config: # <<<<<<<<<<<<<< * current_config = {} * self.override(merge_dicts(current_config, config)) */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 1897, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 1941, __pyx_L1_error) __pyx_t_10 = ((!__pyx_t_8) != 0); if (__pyx_t_10) { - /* "dependency_injector/providers.pyx":1898 + /* "dependency_injector/providers.pyx":1942 * current_config = self.__call__() * if not current_config: * current_config = {} # <<<<<<<<<<<<<< * self.override(merge_dicts(current_config, config)) * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1898, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_current_config, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1897 + /* "dependency_injector/providers.pyx":1941 * * current_config = self.__call__() * if not current_config: # <<<<<<<<<<<<<< @@ -38835,16 +39792,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro */ } - /* "dependency_injector/providers.pyx":1899 + /* "dependency_injector/providers.pyx":1943 * if not current_config: * current_config = {} * self.override(merge_dicts(current_config, config)) # <<<<<<<<<<<<<< * * def from_yaml(self, filepath, required=UNDEFINED, loader=None): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1899, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1899, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; __pyx_t_7 = 0; @@ -38861,7 +39818,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_current_config, __pyx_v_config}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1899, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1943, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -38869,13 +39826,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_current_config, __pyx_v_config}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1899, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1943, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_13 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1899, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; @@ -38886,7 +39843,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro __Pyx_INCREF(__pyx_v_config); __Pyx_GIVEREF(__pyx_v_config); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_v_config); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1899, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -38904,12 +39861,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro __pyx_t_5 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1899, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1869 + /* "dependency_injector/providers.pyx":1913 * self.override(value) * * def from_ini(self, filepath, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -38941,7 +39898,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro return __pyx_r; } -/* "dependency_injector/providers.pyx":1901 +/* "dependency_injector/providers.pyx":1945 * self.override(merge_dicts(current_config, config)) * * def from_yaml(self, filepath, required=UNDEFINED, loader=None): # <<<<<<<<<<<<<< @@ -38950,9 +39907,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_30fro */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_33from_yaml(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_32from_yaml[] = "Load configuration from the yaml file.\n\n Loaded configuration is merged recursively over existing configuration.\n\n :param filepath: Path to the configuration file.\n :type filepath: str\n\n :param required: When required is True, raise an exception if file does not exist.\n :type required: bool\n\n :param loader: YAML loader, :py:class:`YamlLoader` is used if not specified.\n :type loader: ``yaml.Loader``\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_33from_yaml(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_47from_yaml(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_46from_yaml[] = "Load configuration from the yaml file.\n\n Loaded configuration is merged recursively over existing configuration.\n\n :param filepath: Path to the configuration file.\n :type filepath: str\n\n :param required: When required is True, raise an exception if file does not exist.\n :type required: bool\n\n :param loader: YAML loader, :py:class:`YamlLoader` is used if not specified.\n :type loader: ``yaml.Loader``\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_47from_yaml(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filepath = 0; PyObject *__pyx_v_required = 0; PyObject *__pyx_v_loader = 0; @@ -38965,7 +39922,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_33fro { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filepath,&__pyx_n_s_required,&__pyx_n_s_loader,0}; PyObject* values[3] = {0,0,0}; - values[1] = __pyx_k__22; + values[1] = __pyx_k__21; values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -38999,7 +39956,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_33fro } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_yaml") < 0)) __PYX_ERR(1, 1901, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_yaml") < 0)) __PYX_ERR(1, 1945, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -39018,20 +39975,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_33fro } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_yaml", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1901, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_yaml", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1945, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Configuration.from_yaml", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_32from_yaml(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_filepath, __pyx_v_required, __pyx_v_loader); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_46from_yaml(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_filepath, __pyx_v_required, __pyx_v_loader); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32from_yaml(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_filepath, PyObject *__pyx_v_required, PyObject *__pyx_v_loader) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_46from_yaml(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_filepath, PyObject *__pyx_v_required, PyObject *__pyx_v_loader) { PyObject *__pyx_v_opened_file = NULL; PyObject *__pyx_v_config = NULL; PyObject *__pyx_v_exception = NULL; @@ -39063,28 +40020,28 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __Pyx_RefNannySetupContext("from_yaml", 0); __Pyx_INCREF(__pyx_v_loader); - /* "dependency_injector/providers.pyx":1917 + /* "dependency_injector/providers.pyx":1961 * :rtype: None * """ * if yaml is None: # <<<<<<<<<<<<<< * raise Error( * 'Unable to load yaml configuration - PyYAML is not installed. ' */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_yaml); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1917, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_yaml); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":1918 + /* "dependency_injector/providers.pyx":1962 * """ * if yaml is None: * raise Error( # <<<<<<<<<<<<<< * 'Unable to load yaml configuration - PyYAML is not installed. ' * 'Install PyYAML or install Dependency Injector with yaml extras: ' */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1918, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -39098,14 +40055,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Unable_to_load_yaml_configuratio) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Unable_to_load_yaml_configuratio); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1918, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1918, __pyx_L1_error) + __PYX_ERR(1, 1962, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1917 + /* "dependency_injector/providers.pyx":1961 * :rtype: None * """ * if yaml is None: # <<<<<<<<<<<<<< @@ -39114,7 +40071,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro */ } - /* "dependency_injector/providers.pyx":1924 + /* "dependency_injector/providers.pyx":1968 * ) * * if loader is None: # <<<<<<<<<<<<<< @@ -39125,19 +40082,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":1925 + /* "dependency_injector/providers.pyx":1969 * * if loader is None: * loader = YamlLoader # <<<<<<<<<<<<<< * * try: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_YamlLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1925, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_YamlLoader); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_loader, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1924 + /* "dependency_injector/providers.pyx":1968 * ) * * if loader is None: # <<<<<<<<<<<<<< @@ -39146,7 +40103,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro */ } - /* "dependency_injector/providers.pyx":1927 + /* "dependency_injector/providers.pyx":1971 * loader = YamlLoader * * try: # <<<<<<<<<<<<<< @@ -39162,7 +40119,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "dependency_injector/providers.pyx":1928 + /* "dependency_injector/providers.pyx":1972 * * try: * with open(filepath) as opened_file: # <<<<<<<<<<<<<< @@ -39170,11 +40127,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro * except IOError as exception: */ /*with:*/ { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_v_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1928, __pyx_L5_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_v_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1972, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1928, __pyx_L5_error) + __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1972, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1928, __pyx_L11_error) + __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1972, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -39188,7 +40145,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro } __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1928, __pyx_L11_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1972, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_4; @@ -39206,16 +40163,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __pyx_v_opened_file = __pyx_t_5; __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1929 + /* "dependency_injector/providers.pyx":1973 * try: * with open(filepath) as opened_file: * config = yaml.load(opened_file, loader) # <<<<<<<<<<<<<< * except IOError as exception: * if required is not False \ */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_yaml); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1929, __pyx_L15_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_yaml); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1973, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1929, __pyx_L15_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1973, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -39233,7 +40190,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_opened_file, __pyx_v_loader}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1929, __pyx_L15_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1973, __pyx_L15_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -39241,13 +40198,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_opened_file, __pyx_v_loader}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1929, __pyx_L15_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1973, __pyx_L15_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1929, __pyx_L15_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1973, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -39258,7 +40215,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __Pyx_INCREF(__pyx_v_loader); __Pyx_GIVEREF(__pyx_v_loader); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_14, __pyx_v_loader); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1929, __pyx_L15_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1973, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -39266,7 +40223,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __pyx_v_config = __pyx_t_5; __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1928 + /* "dependency_injector/providers.pyx":1972 * * try: * with open(filepath) as opened_file: # <<<<<<<<<<<<<< @@ -39285,20 +40242,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /*except:*/ { __Pyx_AddTraceback("dependency_injector.providers.Configuration.from_yaml", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_10) < 0) __PYX_ERR(1, 1928, __pyx_L17_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_10) < 0) __PYX_ERR(1, 1972, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_10); - __pyx_t_1 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1928, __pyx_L17_except_error) + __pyx_t_1 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1972, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 1928, __pyx_L17_except_error) + if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 1972, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_15); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (__pyx_t_2 < 0) __PYX_ERR(1, 1928, __pyx_L17_except_error) + if (__pyx_t_2 < 0) __PYX_ERR(1, 1972, __pyx_L17_except_error) __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_5); @@ -39306,7 +40263,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_4, __pyx_t_10); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_10 = 0; - __PYX_ERR(1, 1928, __pyx_L17_except_error) + __PYX_ERR(1, 1972, __pyx_L17_except_error) } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -39332,7 +40289,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro if (__pyx_t_9) { __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple_, NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1928, __pyx_L5_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1972, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -39347,7 +40304,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __pyx_L24:; } - /* "dependency_injector/providers.pyx":1927 + /* "dependency_injector/providers.pyx":1971 * loader = YamlLoader * * try: # <<<<<<<<<<<<<< @@ -39365,7 +40322,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1930 + /* "dependency_injector/providers.pyx":1974 * with open(filepath) as opened_file: * config = yaml.load(opened_file, loader) * except IOError as exception: # <<<<<<<<<<<<<< @@ -39375,14 +40332,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IOError); if (__pyx_t_14) { __Pyx_AddTraceback("dependency_injector.providers.Configuration.from_yaml", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(1, 1930, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(1, 1974, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_v_exception = __pyx_t_4; - /* "dependency_injector/providers.pyx":1931 + /* "dependency_injector/providers.pyx":1975 * config = yaml.load(opened_file, loader) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -39397,14 +40354,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro goto __pyx_L28_bool_binop_done; } - /* "dependency_injector/providers.pyx":1932 + /* "dependency_injector/providers.pyx":1976 * except IOError as exception: * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ # <<<<<<<<<<<<<< * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) */ - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1932, __pyx_L7_except_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1976, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) { @@ -39418,10 +40375,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro } __pyx_t_1 = (__pyx_t_18) ? __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_18) : __Pyx_PyObject_CallNoArg(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1932, __pyx_L7_except_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1976, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1932, __pyx_L7_except_error) + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1976, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_16) { } else { @@ -39436,37 +40393,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro } __pyx_L30_next_and:; - /* "dependency_injector/providers.pyx":1933 + /* "dependency_injector/providers.pyx":1977 * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ * and exception.errno in (errno.ENOENT, errno.EISDIR): # <<<<<<<<<<<<<< * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1933, __pyx_L7_except_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1977, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_errno); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1933, __pyx_L7_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_errno); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1977, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_ENOENT); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1933, __pyx_L7_except_error) + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_ENOENT); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1977, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = PyObject_RichCompare(__pyx_t_1, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1933, __pyx_L7_except_error) + __pyx_t_17 = PyObject_RichCompare(__pyx_t_1, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1977, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1933, __pyx_L7_except_error) + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1977, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (!__pyx_t_16) { } else { __pyx_t_2 = __pyx_t_16; goto __pyx_L32_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_errno); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1933, __pyx_L7_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_errno); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1977, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_EISDIR); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1933, __pyx_L7_except_error) + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_EISDIR); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1977, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = PyObject_RichCompare(__pyx_t_1, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1933, __pyx_L7_except_error) + __pyx_t_17 = PyObject_RichCompare(__pyx_t_1, __pyx_t_18, Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1977, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1933, __pyx_L7_except_error) + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(1, 1977, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_2 = __pyx_t_16; __pyx_L32_bool_binop_done:; @@ -39475,7 +40432,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __pyx_t_3 = __pyx_t_16; __pyx_L28_bool_binop_done:; - /* "dependency_injector/providers.pyx":1931 + /* "dependency_injector/providers.pyx":1975 * config = yaml.load(opened_file, loader) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -39484,16 +40441,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro */ if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":1934 + /* "dependency_injector/providers.pyx":1978 * and (self._is_strict_mode_enabled() or required is True) \ * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) # <<<<<<<<<<<<<< * raise * return */ - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_load_configuration_fil, __pyx_n_s_format); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1934, __pyx_L7_except_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_load_configuration_fil, __pyx_n_s_format); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1978, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_strerror); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1934, __pyx_L7_except_error) + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_strerror); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1978, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) { @@ -39508,13 +40465,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __pyx_t_1 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_19, __pyx_t_18) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1934, __pyx_L7_except_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1978, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_exception, __pyx_n_s_strerror, __pyx_t_1) < 0) __PYX_ERR(1, 1934, __pyx_L7_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_exception, __pyx_n_s_strerror, __pyx_t_1) < 0) __PYX_ERR(1, 1978, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1935 + /* "dependency_injector/providers.pyx":1979 * and exception.errno in (errno.ENOENT, errno.EISDIR): * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise # <<<<<<<<<<<<<< @@ -39526,9 +40483,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_10, __pyx_t_4, __pyx_t_5); __pyx_t_10 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __PYX_ERR(1, 1935, __pyx_L7_except_error) + __PYX_ERR(1, 1979, __pyx_L7_except_error) - /* "dependency_injector/providers.pyx":1931 + /* "dependency_injector/providers.pyx":1975 * config = yaml.load(opened_file, loader) * except IOError as exception: * if required is not False \ # <<<<<<<<<<<<<< @@ -39537,7 +40494,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro */ } - /* "dependency_injector/providers.pyx":1936 + /* "dependency_injector/providers.pyx":1980 * exception.strerror = 'Unable to load configuration file {0}'.format(exception.strerror) * raise * return # <<<<<<<<<<<<<< @@ -39554,7 +40511,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "dependency_injector/providers.pyx":1927 + /* "dependency_injector/providers.pyx":1971 * loader = YamlLoader * * try: # <<<<<<<<<<<<<< @@ -39575,14 +40532,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __pyx_L10_try_end:; } - /* "dependency_injector/providers.pyx":1938 + /* "dependency_injector/providers.pyx":1982 * return * * current_config = self.__call__() # <<<<<<<<<<<<<< * if not current_config: * current_config = {} */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1938, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -39596,36 +40553,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro } __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1938, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_current_config = __pyx_t_5; __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1939 + /* "dependency_injector/providers.pyx":1983 * * current_config = self.__call__() * if not current_config: # <<<<<<<<<<<<<< * current_config = {} * self.override(merge_dicts(current_config, config)) */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1939, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1983, __pyx_L1_error) __pyx_t_16 = ((!__pyx_t_3) != 0); if (__pyx_t_16) { - /* "dependency_injector/providers.pyx":1940 + /* "dependency_injector/providers.pyx":1984 * current_config = self.__call__() * if not current_config: * current_config = {} # <<<<<<<<<<<<<< * self.override(merge_dicts(current_config, config)) * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1940, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_current_config, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1939 + /* "dependency_injector/providers.pyx":1983 * * current_config = self.__call__() * if not current_config: # <<<<<<<<<<<<<< @@ -39634,18 +40591,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro */ } - /* "dependency_injector/providers.pyx":1941 + /* "dependency_injector/providers.pyx":1985 * if not current_config: * current_config = {} * self.override(merge_dicts(current_config, config)) # <<<<<<<<<<<<<< * * def from_pydantic(self, settings, required=UNDEFINED, **kwargs): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1941, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1941, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_v_config)) { __Pyx_RaiseUnboundLocalError("config"); __PYX_ERR(1, 1941, __pyx_L1_error) } + if (unlikely(!__pyx_v_config)) { __Pyx_RaiseUnboundLocalError("config"); __PYX_ERR(1, 1985, __pyx_L1_error) } __pyx_t_17 = NULL; __pyx_t_14 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -39661,7 +40618,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_current_config, __pyx_v_config}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1941, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1985, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_10); } else @@ -39669,13 +40626,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_current_config, __pyx_v_config}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1941, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1985, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_10); } else #endif { - __pyx_t_18 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1941, __pyx_L1_error) + __pyx_t_18 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_17) { __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17); __pyx_t_17 = NULL; @@ -39686,7 +40643,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __Pyx_INCREF(__pyx_v_config); __Pyx_GIVEREF(__pyx_v_config); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_14, __pyx_v_config); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1941, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } @@ -39704,12 +40661,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1941, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1901 + /* "dependency_injector/providers.pyx":1945 * self.override(merge_dicts(current_config, config)) * * def from_yaml(self, filepath, required=UNDEFINED, loader=None): # <<<<<<<<<<<<<< @@ -39741,7 +40698,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro return __pyx_r; } -/* "dependency_injector/providers.pyx":1943 +/* "dependency_injector/providers.pyx":1987 * self.override(merge_dicts(current_config, config)) * * def from_pydantic(self, settings, required=UNDEFINED, **kwargs): # <<<<<<<<<<<<<< @@ -39750,9 +40707,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_32fro */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_35from_pydantic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_34from_pydantic[] = "Load configuration from pydantic settings.\n\n Loaded configuration is merged recursively over existing configuration.\n\n :param settings: Pydantic settings instances.\n :type settings: :py:class:`pydantic.BaseSettings`\n\n :param required: When required is True, raise an exception if settings dict is empty.\n :type required: bool\n\n :param kwargs: Keyword arguments forwarded to ``pydantic.BaseSettings.dict()`` call.\n :type kwargs: Dict[Any, Any]\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_35from_pydantic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_49from_pydantic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_48from_pydantic[] = "Load configuration from pydantic settings.\n\n Loaded configuration is merged recursively over existing configuration.\n\n :param settings: Pydantic settings instances.\n :type settings: :py:class:`pydantic.BaseSettings`\n\n :param required: When required is True, raise an exception if settings dict is empty.\n :type required: bool\n\n :param kwargs: Keyword arguments forwarded to ``pydantic.BaseSettings.dict()`` call.\n :type kwargs: Dict[Any, Any]\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_49from_pydantic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_settings = 0; PyObject *__pyx_v_required = 0; PyObject *__pyx_v_kwargs = 0; @@ -39767,7 +40724,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_35fro { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_settings,&__pyx_n_s_required,0}; PyObject* values[2] = {0,0}; - values[1] = __pyx_k__23; + values[1] = __pyx_k__22; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -39792,7 +40749,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_35fro } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "from_pydantic") < 0)) __PYX_ERR(1, 1943, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "from_pydantic") < 0)) __PYX_ERR(1, 1987, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -39808,14 +40765,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_35fro } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_pydantic", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1943, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pydantic", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1987, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("dependency_injector.providers.Configuration.from_pydantic", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_34from_pydantic(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_settings, __pyx_v_required, __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_48from_pydantic(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_settings, __pyx_v_required, __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -39823,7 +40780,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_35fro return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34from_pydantic(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_settings, PyObject *__pyx_v_required, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_48from_pydantic(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_settings, PyObject *__pyx_v_required, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -39840,28 +40797,28 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_pydantic", 0); - /* "dependency_injector/providers.pyx":1959 + /* "dependency_injector/providers.pyx":2003 * :rtype: None * """ * if pydantic is None: # <<<<<<<<<<<<<< * raise Error( * 'Unable to load pydantic configuration - pydantic is not installed. ' */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1959, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":1960 + /* "dependency_injector/providers.pyx":2004 * """ * if pydantic is None: * raise Error( # <<<<<<<<<<<<<< * 'Unable to load pydantic configuration - pydantic is not installed. ' * 'Install pydantic or install Dependency Injector with pydantic extras: ' */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1960, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -39875,14 +40832,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Unable_to_load_pydantic_configur) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Unable_to_load_pydantic_configur); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1960, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1960, __pyx_L1_error) + __PYX_ERR(1, 2004, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1959 + /* "dependency_injector/providers.pyx":2003 * :rtype: None * """ * if pydantic is None: # <<<<<<<<<<<<<< @@ -39891,7 +40848,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro */ } - /* "dependency_injector/providers.pyx":1966 + /* "dependency_injector/providers.pyx":2010 * ) * * if isinstance(settings, CLASS_TYPES) and issubclass(settings, pydantic.BaseSettings): # <<<<<<<<<<<<<< @@ -39900,7 +40857,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro */ __pyx_t_1 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_settings, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1966, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v_settings, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 2010, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_2 != 0); if (__pyx_t_6) { @@ -39908,38 +40865,38 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro __pyx_t_3 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1966, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BaseSettings); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1966, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BaseSettings); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = PyObject_IsSubclass(__pyx_v_settings, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1966, __pyx_L1_error) + __pyx_t_6 = PyObject_IsSubclass(__pyx_v_settings, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 2010, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = (__pyx_t_6 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_3)) { - /* "dependency_injector/providers.pyx":1967 + /* "dependency_injector/providers.pyx":2011 * * if isinstance(settings, CLASS_TYPES) and issubclass(settings, pydantic.BaseSettings): * raise Error( # <<<<<<<<<<<<<< * 'Got settings class, but expect instance: ' * 'instead "{0}" use "{0}()"'.format(settings.__name__) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1967, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1969 + /* "dependency_injector/providers.pyx":2013 * raise Error( * 'Got settings class, but expect instance: ' * 'instead "{0}" use "{0}()"'.format(settings.__name__) # <<<<<<<<<<<<<< * ) * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Got_settings_class_but_expect_in, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1969, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Got_settings_class_but_expect_in, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_settings, __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1969, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_settings, __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -39954,7 +40911,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1969, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -39970,14 +40927,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1967, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(1, 1967, __pyx_L1_error) + __PYX_ERR(1, 2011, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1966 + /* "dependency_injector/providers.pyx":2010 * ) * * if isinstance(settings, CLASS_TYPES) and issubclass(settings, pydantic.BaseSettings): # <<<<<<<<<<<<<< @@ -39986,41 +40943,41 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro */ } - /* "dependency_injector/providers.pyx":1972 + /* "dependency_injector/providers.pyx":2016 * ) * * if not isinstance(settings, pydantic.BaseSettings): # <<<<<<<<<<<<<< * raise Error( * 'Unable to recognize settings instance, expect "pydantic.BaseSettings", ' */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1972, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pydantic); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_BaseSettings); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1972, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_BaseSettings); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = PyObject_IsInstance(__pyx_v_settings, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1972, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_settings, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 2016, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":1973 + /* "dependency_injector/providers.pyx":2017 * * if not isinstance(settings, pydantic.BaseSettings): * raise Error( # <<<<<<<<<<<<<< * 'Unable to recognize settings instance, expect "pydantic.BaseSettings", ' * 'got {0} instead'.format(settings) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1973, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":1975 + /* "dependency_injector/providers.pyx":2019 * raise Error( * 'Unable to recognize settings instance, expect "pydantic.BaseSettings", ' * 'got {0} instead'.format(settings) # <<<<<<<<<<<<<< * ) * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_recognize_settings_ins, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1975, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_recognize_settings_ins, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -40034,7 +40991,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_settings) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_settings); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1975, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -40050,14 +41007,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1973, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1973, __pyx_L1_error) + __PYX_ERR(1, 2017, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1972 + /* "dependency_injector/providers.pyx":2016 * ) * * if not isinstance(settings, pydantic.BaseSettings): # <<<<<<<<<<<<<< @@ -40066,36 +41023,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro */ } - /* "dependency_injector/providers.pyx":1978 + /* "dependency_injector/providers.pyx":2022 * ) * * self.from_dict(settings.dict(**kwargs), required=required) # <<<<<<<<<<<<<< * * def from_dict(self, options, required=UNDEFINED): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1978, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_settings, __pyx_n_s_dict_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1978, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_settings, __pyx_n_s_dict_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1978, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1978, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1978, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, __pyx_v_required) < 0) __PYX_ERR(1, 1978, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1978, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, __pyx_v_required) < 0) __PYX_ERR(1, 2022, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/providers.pyx":1943 + /* "dependency_injector/providers.pyx":1987 * self.override(merge_dicts(current_config, config)) * * def from_pydantic(self, settings, required=UNDEFINED, **kwargs): # <<<<<<<<<<<<<< @@ -40121,7 +41078,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro return __pyx_r; } -/* "dependency_injector/providers.pyx":1980 +/* "dependency_injector/providers.pyx":2024 * self.from_dict(settings.dict(**kwargs), required=required) * * def from_dict(self, options, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -40130,9 +41087,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_34fro */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_37from_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_36from_dict[] = "Load configuration from the dictionary.\n\n Loaded configuration is merged recursively over existing configuration.\n\n :param options: Configuration options.\n :type options: dict\n\n :param required: When required is True, raise an exception if dictionary is empty.\n :type required: bool\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_37from_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_51from_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_50from_dict[] = "Load configuration from the dictionary.\n\n Loaded configuration is merged recursively over existing configuration.\n\n :param options: Configuration options.\n :type options: dict\n\n :param required: When required is True, raise an exception if dictionary is empty.\n :type required: bool\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_51from_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_options = 0; PyObject *__pyx_v_required = 0; int __pyx_lineno = 0; @@ -40144,7 +41101,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_37fro { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_options,&__pyx_n_s_required,0}; PyObject* values[2] = {0,0}; - values[1] = __pyx_k__24; + values[1] = __pyx_k__23; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -40169,7 +41126,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_37fro } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_dict") < 0)) __PYX_ERR(1, 1980, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_dict") < 0)) __PYX_ERR(1, 2024, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -40185,20 +41142,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_37fro } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_dict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1980, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_dict", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2024, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Configuration.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_36from_dict(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_options, __pyx_v_required); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_50from_dict(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_options, __pyx_v_required); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36from_dict(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_required) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_50from_dict(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_options, PyObject *__pyx_v_required) { PyObject *__pyx_v_current_config = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -40217,7 +41174,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_dict", 0); - /* "dependency_injector/providers.pyx":1993 + /* "dependency_injector/providers.pyx":2037 * :rtype: None * """ * if required is not False \ # <<<<<<<<<<<<<< @@ -40232,14 +41189,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro goto __pyx_L4_bool_binop_done; } - /* "dependency_injector/providers.pyx":1994 + /* "dependency_injector/providers.pyx":2038 * """ * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ # <<<<<<<<<<<<<< * and not options: * raise ValueError('Can not use empty dictionary') */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1994, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -40253,10 +41210,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro } __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, 1994, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1994, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 2038, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_3) { } else { @@ -40271,19 +41228,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro } __pyx_L6_next_and:; - /* "dependency_injector/providers.pyx":1995 + /* "dependency_injector/providers.pyx":2039 * if required is not False \ * and (self._is_strict_mode_enabled() or required is True) \ * and not options: # <<<<<<<<<<<<<< * raise ValueError('Can not use empty dictionary') * */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_options); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1995, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_options); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2039, __pyx_L1_error) __pyx_t_3 = ((!__pyx_t_2) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; - /* "dependency_injector/providers.pyx":1993 + /* "dependency_injector/providers.pyx":2037 * :rtype: None * """ * if required is not False \ # <<<<<<<<<<<<<< @@ -40292,20 +41249,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro */ if (unlikely(__pyx_t_1)) { - /* "dependency_injector/providers.pyx":1996 + /* "dependency_injector/providers.pyx":2040 * and (self._is_strict_mode_enabled() or required is True) \ * and not options: * raise ValueError('Can not use empty dictionary') # <<<<<<<<<<<<<< * * current_config = self.__call__() */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1996, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(1, 1996, __pyx_L1_error) + __PYX_ERR(1, 2040, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1993 + /* "dependency_injector/providers.pyx":2037 * :rtype: None * """ * if required is not False \ # <<<<<<<<<<<<<< @@ -40314,14 +41271,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro */ } - /* "dependency_injector/providers.pyx":1998 + /* "dependency_injector/providers.pyx":2042 * raise ValueError('Can not use empty dictionary') * * current_config = self.__call__() # <<<<<<<<<<<<<< * if not current_config: * current_config = {} */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1998, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -40335,36 +41292,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro } __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, 1998, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_current_config = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1999 + /* "dependency_injector/providers.pyx":2043 * * current_config = self.__call__() * if not current_config: # <<<<<<<<<<<<<< * current_config = {} * self.override(merge_dicts(current_config, options)) */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1999, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_current_config); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2043, __pyx_L1_error) __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { - /* "dependency_injector/providers.pyx":2000 + /* "dependency_injector/providers.pyx":2044 * current_config = self.__call__() * if not current_config: * current_config = {} # <<<<<<<<<<<<<< * self.override(merge_dicts(current_config, options)) * */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2000, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_current_config, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1999 + /* "dependency_injector/providers.pyx":2043 * * current_config = self.__call__() * if not current_config: # <<<<<<<<<<<<<< @@ -40373,16 +41330,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro */ } - /* "dependency_injector/providers.pyx":2001 + /* "dependency_injector/providers.pyx":2045 * if not current_config: * current_config = {} * self.override(merge_dicts(current_config, options)) # <<<<<<<<<<<<<< * * def from_env(self, name, default=UNDEFINED, required=UNDEFINED): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2001, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2001, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -40399,7 +41356,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_current_config, __pyx_v_options}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2001, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2045, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -40407,13 +41364,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_current_config, __pyx_v_options}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2001, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2045, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2001, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -40424,7 +41381,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro __Pyx_INCREF(__pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_options); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2001, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -40442,12 +41399,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2001, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1980 + /* "dependency_injector/providers.pyx":2024 * self.from_dict(settings.dict(**kwargs), required=required) * * def from_dict(self, options, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -40474,7 +41431,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro return __pyx_r; } -/* "dependency_injector/providers.pyx":2003 +/* "dependency_injector/providers.pyx":2047 * self.override(merge_dicts(current_config, options)) * * def from_env(self, name, default=UNDEFINED, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -40483,9 +41440,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_36fro */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_39from_env(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration_38from_env[] = "Load configuration value from the environment variable.\n\n :param name: Name of the environment variable.\n :type name: str\n\n :param default: Default value that is used if environment variable does not exist.\n :type default: object\n\n :param required: When required is True, raise an exception if environment variable is undefined.\n :type required: bool\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_39from_env(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_53from_env(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13Configuration_52from_env[] = "Load configuration value from the environment variable.\n\n :param name: Name of the environment variable.\n :type name: str\n\n :param default: Default value that is used if environment variable does not exist.\n :type default: object\n\n :param required: When required is True, raise an exception if environment variable is undefined.\n :type required: bool\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_53from_env(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_v_required = 0; @@ -40498,8 +41455,8 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_39fro { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,&__pyx_n_s_required,0}; PyObject* values[3] = {0,0,0}; - values[1] = __pyx_k__25; - values[2] = __pyx_k__26; + values[1] = __pyx_k__24; + values[2] = __pyx_k__25; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -40532,7 +41489,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_39fro } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_env") < 0)) __PYX_ERR(1, 2003, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_env") < 0)) __PYX_ERR(1, 2047, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -40551,20 +41508,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_39fro } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_env", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2003, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_env", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2047, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Configuration.from_env", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_38from_env(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_name, __pyx_v_default, __pyx_v_required); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_52from_env(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_name, __pyx_v_default, __pyx_v_required); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38from_env(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default, PyObject *__pyx_v_required) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_52from_env(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default, PyObject *__pyx_v_required) { PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -40581,19 +41538,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_env", 0); - /* "dependency_injector/providers.pyx":2017 + /* "dependency_injector/providers.pyx":2061 * :rtype: None * """ * value = os.environ.get(name, default) # <<<<<<<<<<<<<< * * if value is UNDEFINED: */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2017, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_environ); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2017, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_environ); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2017, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -40611,7 +41568,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_name, __pyx_v_default}; - __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, 2017, __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, 2061, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -40619,13 +41576,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_name, __pyx_v_default}; - __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, 2017, __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, 2061, __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, 2017, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2061, __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; @@ -40636,7 +41593,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro __Pyx_INCREF(__pyx_v_default); __Pyx_GIVEREF(__pyx_v_default); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_default); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2017, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -40644,21 +41601,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro __pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2019 + /* "dependency_injector/providers.pyx":2063 * value = os.environ.get(name, default) * * if value is UNDEFINED: # <<<<<<<<<<<<<< * if required is not False \ * and (self._is_strict_mode_enabled() or required is True): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2019, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = (__pyx_v_value == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":2020 + /* "dependency_injector/providers.pyx":2064 * * if value is UNDEFINED: * if required is not False \ # <<<<<<<<<<<<<< @@ -40673,14 +41630,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro goto __pyx_L5_bool_binop_done; } - /* "dependency_injector/providers.pyx":2021 + /* "dependency_injector/providers.pyx":2065 * if value is UNDEFINED: * if required is not False \ * and (self._is_strict_mode_enabled() or required is True): # <<<<<<<<<<<<<< * raise ValueError('Environment variable "{0}" is undefined'.format(name)) * value = None */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2021, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_strict_mode_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -40694,10 +41651,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2021, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 2021, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 2065, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_8) { } else { @@ -40709,7 +41666,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro __pyx_t_7 = __pyx_t_6; __pyx_L5_bool_binop_done:; - /* "dependency_injector/providers.pyx":2020 + /* "dependency_injector/providers.pyx":2064 * * if value is UNDEFINED: * if required is not False \ # <<<<<<<<<<<<<< @@ -40718,14 +41675,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro */ if (unlikely(__pyx_t_7)) { - /* "dependency_injector/providers.pyx":2022 + /* "dependency_injector/providers.pyx":2066 * if required is not False \ * and (self._is_strict_mode_enabled() or required is True): * raise ValueError('Environment variable "{0}" is undefined'.format(name)) # <<<<<<<<<<<<<< * value = None * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Environment_variable_0_is_undefi, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2022, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Environment_variable_0_is_undefi, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -40739,17 +41696,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2022, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2022, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(1, 2022, __pyx_L1_error) + __PYX_ERR(1, 2066, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2020 + /* "dependency_injector/providers.pyx":2064 * * if value is UNDEFINED: * if required is not False \ # <<<<<<<<<<<<<< @@ -40758,7 +41715,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro */ } - /* "dependency_injector/providers.pyx":2023 + /* "dependency_injector/providers.pyx":2067 * and (self._is_strict_mode_enabled() or required is True): * raise ValueError('Environment variable "{0}" is undefined'.format(name)) * value = None # <<<<<<<<<<<<<< @@ -40768,7 +41725,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_value, Py_None); - /* "dependency_injector/providers.pyx":2019 + /* "dependency_injector/providers.pyx":2063 * value = os.environ.get(name, default) * * if value is UNDEFINED: # <<<<<<<<<<<<<< @@ -40777,14 +41734,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro */ } - /* "dependency_injector/providers.pyx":2025 + /* "dependency_injector/providers.pyx":2069 * value = None * * self.override(value) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2025, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -40798,12 +41755,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_value); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2025, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2003 + /* "dependency_injector/providers.pyx":2047 * self.override(merge_dicts(current_config, options)) * * def from_env(self, name, default=UNDEFINED, required=UNDEFINED): # <<<<<<<<<<<<<< @@ -40829,7 +41786,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_38fro } static PyObject *__pyx_gb_19dependency_injector_9providers_13Configuration_7related_2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":2028 +/* "dependency_injector/providers.pyx":2072 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -40862,7 +41819,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_7rela if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_9___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 2028, __pyx_L1_error) + __PYX_ERR(1, 2072, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -40870,7 +41827,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_7rela __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_13Configuration_7related_2generator7, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Configuration___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 2028, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_13Configuration_7related_2generator7, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Configuration___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 2072, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -40906,9 +41863,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13Configuration_7rela return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2028, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2072, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2030 + /* "dependency_injector/providers.pyx":2074 * def related(self): * """Return related providers generator.""" * yield from self.__children.values() # <<<<<<<<<<<<<< @@ -40917,9 +41874,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13Configuration_7rela */ if (unlikely(__pyx_cur_scope->__pyx_v_self->__pyx___children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(1, 2030, __pyx_L1_error) + __PYX_ERR(1, 2074, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_v_self->__pyx___children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2030, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_v_self->__pyx___children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -40932,23 +41889,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13Configuration_7rela __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2030, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2074, __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(1, 2030, __pyx_L1_error) + else __PYX_ERR(1, 2074, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":2031 + /* "dependency_injector/providers.pyx":2075 * """Return related providers generator.""" * yield from self.__children.values() * yield from super().related # <<<<<<<<<<<<<< * * def _is_strict_mode_enabled(self): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2031, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); @@ -40956,10 +41913,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13Configuration_7rela __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2031, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2031, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -40973,17 +41930,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13Configuration_7rela __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2031, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2075, __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(1, 2031, __pyx_L1_error) + else __PYX_ERR(1, 2075, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":2028 + /* "dependency_injector/providers.pyx":2072 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -41009,7 +41966,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13Configuration_7rela return __pyx_r; } -/* "dependency_injector/providers.pyx":2033 +/* "dependency_injector/providers.pyx":2077 * yield from super().related * * def _is_strict_mode_enabled(self): # <<<<<<<<<<<<<< @@ -41018,19 +41975,19 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13Configuration_7rela */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_41_is_strict_mode_enabled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_41_is_strict_mode_enabled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_55_is_strict_mode_enabled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_55_is_strict_mode_enabled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_strict_mode_enabled (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_40_is_strict_mode_enabled(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_54_is_strict_mode_enabled(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_40_is_strict_mode_enabled(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_54_is_strict_mode_enabled(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -41039,7 +41996,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_40_is int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_strict_mode_enabled", 0); - /* "dependency_injector/providers.pyx":2034 + /* "dependency_injector/providers.pyx":2078 * * def _is_strict_mode_enabled(self): * return self.__strict # <<<<<<<<<<<<<< @@ -41047,13 +42004,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_40_is * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2034, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2033 + /* "dependency_injector/providers.pyx":2077 * yield from super().related * * def _is_strict_mode_enabled(self): # <<<<<<<<<<<<<< @@ -41079,19 +42036,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_40_is */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_57__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_57__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_42__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_56__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_42__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_56__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -41368,19 +42325,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_42__r */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_59__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_59__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_44__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_58__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_44__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_58__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -41419,17 +42376,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_44__s return __pyx_r; } -/* "dependency_injector/providers.pyx":2090 +/* "dependency_injector/providers.pyx":2134 * provided_type = None * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< - * """Initializer. - * + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< + * """Initialize provider.""" + * self.__instantiator = Callable() */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_7Factory_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory___init__[] = "Initializer.\n\n :param provides: Provided type.\n :type provides: type\n "; +static char __pyx_doc_19dependency_injector_9providers_7Factory___init__[] = "Initialize provider."; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_7Factory___init__; #endif @@ -41459,6 +42416,7 @@ static int __pyx_pw_19dependency_injector_9providers_7Factory_1__init__(PyObject { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -41471,23 +42429,26 @@ static int __pyx_pw_19dependency_injector_9providers_7Factory_1__init__(PyObject kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 2090, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 2134, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } } __pyx_v_provides = values[0]; } goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2090, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -41507,214 +42468,99 @@ static int __pyx_pw_19dependency_injector_9providers_7Factory_1__init__(PyObject static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { int __pyx_r; __Pyx_RefNannyDeclarations - int __pyx_t_1; + PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - int __pyx_t_11; - PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":2096 - * :type provides: type - * """ - * if (self.__class__.provided_type and # <<<<<<<<<<<<<< - * not issubclass(provides, self.__class__.provided_type)): - * raise Error('{0} can provide only {1} instances'.format( + /* "dependency_injector/providers.pyx":2136 + * def __init__(self, provides=None, *args, **kwargs): + * """Initialize provider.""" + * self.__instantiator = Callable() # <<<<<<<<<<<<<< + * self.set_provides(provides) + * self.set_args(*args) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2096, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->__pyx___instantiator); + __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___instantiator)); + __pyx_v_self->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":2137 + * """Initialize provider.""" + * self.__instantiator = Callable() + * self.set_provides(provides) # <<<<<<<<<<<<<< + * self.set_args(*args) + * self.set_kwargs(**kwargs) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2096, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 2096, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_4) { - } else { - __pyx_t_1 = __pyx_t_4; - goto __pyx_L4_bool_binop_done; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2097 - * """ - * if (self.__class__.provided_type and - * not issubclass(provides, self.__class__.provided_type)): # <<<<<<<<<<<<<< - * raise Error('{0} can provide only {1} instances'.format( - * self.__class__, self.__class__.provided_type)) + /* "dependency_injector/providers.pyx":2138 + * self.__instantiator = Callable() + * self.set_provides(provides) + * self.set_args(*args) # <<<<<<<<<<<<<< + * self.set_kwargs(**kwargs) + * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2097, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2097, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 2097, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0); - __pyx_t_1 = __pyx_t_5; - __pyx_L4_bool_binop_done:; - /* "dependency_injector/providers.pyx":2096 - * :type provides: type - * """ - * if (self.__class__.provided_type and # <<<<<<<<<<<<<< - * not issubclass(provides, self.__class__.provided_type)): - * raise Error('{0} can provide only {1} instances'.format( - */ - if (unlikely(__pyx_t_1)) { - - /* "dependency_injector/providers.pyx":2098 - * if (self.__class__.provided_type and - * not issubclass(provides, self.__class__.provided_type)): - * raise Error('{0} can provide only {1} instances'.format( # <<<<<<<<<<<<<< - * self.__class__, self.__class__.provided_type)) - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2098, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_provide_only_1_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2098, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - - /* "dependency_injector/providers.pyx":2099 - * not issubclass(provides, self.__class__.provided_type)): - * raise Error('{0} can provide only {1} instances'.format( - * self.__class__, self.__class__.provided_type)) # <<<<<<<<<<<<<< - * - * self.__instantiator = Callable(provides, *args, **kwargs) - */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2099, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2099, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2099, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_9)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_9); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_11 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2098, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2098, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else - #endif - { - __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2098, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - if (__pyx_t_9) { - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; - } - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8); - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_10); - __pyx_t_8 = 0; - __pyx_t_10 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2098, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - } - } - __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2098, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(1, 2098, __pyx_L1_error) - - /* "dependency_injector/providers.pyx":2096 - * :type provides: type - * """ - * if (self.__class__.provided_type and # <<<<<<<<<<<<<< - * not issubclass(provides, self.__class__.provided_type)): - * raise Error('{0} can provide only {1} instances'.format( - */ - } - - /* "dependency_injector/providers.pyx":2101 - * self.__class__, self.__class__.provided_type)) - * - * self.__instantiator = Callable(provides, *args, **kwargs) # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":2139 + * self.set_provides(provides) + * self.set_args(*args) + * self.set_kwargs(**kwargs) # <<<<<<<<<<<<<< * * self.__attributes = tuple() */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_provides); - __Pyx_GIVEREF(__pyx_v_provides); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_provides); - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_v_self->__pyx___instantiator); - __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___instantiator)); - __pyx_v_self->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_2); - __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2103 - * self.__instantiator = Callable(provides, *args, **kwargs) + /* "dependency_injector/providers.pyx":2141 + * self.set_kwargs(**kwargs) * * self.__attributes = tuple() # <<<<<<<<<<<<<< * self.__attributes_len = 0 * */ - __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___attributes); __Pyx_DECREF(__pyx_v_self->__pyx___attributes); - __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2104 + /* "dependency_injector/providers.pyx":2142 * * self.__attributes = tuple() * self.__attributes_len = 0 # <<<<<<<<<<<<<< @@ -41723,64 +42569,59 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ */ __pyx_v_self->__pyx___attributes_len = 0; - /* "dependency_injector/providers.pyx":2106 + /* "dependency_injector/providers.pyx":2144 * self.__attributes_len = 0 * * super(Factory, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2106, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - } - } - __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2106, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2090 + /* "dependency_injector/providers.pyx":2134 * provided_type = None * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< - * """Initializer. - * + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< + * """Initialize provider.""" + * self.__instantiator = Callable() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("dependency_injector.providers.Factory.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -41788,7 +42629,7 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ return __pyx_r; } -/* "dependency_injector/providers.pyx":2108 +/* "dependency_injector/providers.pyx":2146 * super(Factory, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -41812,7 +42653,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_3__deepcopy_ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_memo) { PyObject *__pyx_v_copied = NULL; - PyObject *__pyx_v_cls = NULL; + PyObject *__pyx_v_provides = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -41822,22 +42663,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ int __pyx_t_5; int __pyx_t_6; struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7; - PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":2110 + /* "dependency_injector/providers.pyx":2148 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2110, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2110, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -41852,13 +42692,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2110, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2111 + /* "dependency_injector/providers.pyx":2149 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -41869,19 +42709,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":2112 + /* "dependency_injector/providers.pyx":2150 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * cls = self.cls + * provides = self.provides */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_copied); __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2111 + /* "dependency_injector/providers.pyx":2149 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -41890,191 +42730,202 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ */ } - /* "dependency_injector/providers.pyx":2114 + /* "dependency_injector/providers.pyx":2152 * return copied * - * cls = self.cls # <<<<<<<<<<<<<< - * if isinstance(cls, Provider): - * cls = deepcopy(cls, memo) + * provides = self.provides # <<<<<<<<<<<<<< + * if isinstance(provides, Provider): + * provides = deepcopy(provides, memo) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2114, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_v_cls = __pyx_t_1; + __pyx_v_provides = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2115 + /* "dependency_injector/providers.pyx":2153 * - * cls = self.cls - * if isinstance(cls, Provider): # <<<<<<<<<<<<<< - * cls = deepcopy(cls, memo) + * provides = self.provides + * if isinstance(provides, Provider): # <<<<<<<<<<<<<< + * provides = deepcopy(provides, memo) * */ - __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_cls, __pyx_ptype_19dependency_injector_9providers_Provider); + __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_provides, __pyx_ptype_19dependency_injector_9providers_Provider); __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pyx":2116 - * cls = self.cls - * if isinstance(cls, Provider): - * cls = deepcopy(cls, memo) # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":2154 + * provides = self.provides + * if isinstance(provides, Provider): + * provides = deepcopy(provides, memo) # <<<<<<<<<<<<<< * - * copied = self.__class__(cls, + * copied = _memorized_duplicate(self, memo) */ - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2116, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2154, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_cls, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2116, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_provides, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_cls, __pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_provides, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2115 + /* "dependency_injector/providers.pyx":2153 * - * cls = self.cls - * if isinstance(cls, Provider): # <<<<<<<<<<<<<< - * cls = deepcopy(cls, memo) + * provides = self.provides + * if isinstance(provides, Provider): # <<<<<<<<<<<<<< + * provides = deepcopy(provides, memo) * */ } - /* "dependency_injector/providers.pyx":2118 - * cls = deepcopy(cls, memo) + /* "dependency_injector/providers.pyx":2156 + * provides = deepcopy(provides, memo) * - * copied = self.__class__(cls, # <<<<<<<<<<<<<< - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_provides(provides) + * copied.set_args(*deepcopy(self.args, memo)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2118, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2156, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2118, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":2157 + * + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(provides) # <<<<<<<<<<<<<< + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_cls); - __Pyx_GIVEREF(__pyx_v_cls); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls); - - /* "dependency_injector/providers.pyx":2119 - * - * copied = self.__class__(cls, - * *deepcopy(self.args, memo), # <<<<<<<<<<<<<< - * **deepcopy(self.kwargs, memo)) - * copied.set_attributes(**deepcopy(self.attributes, memo)) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2119, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2119, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2119, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "dependency_injector/providers.pyx":2118 - * cls = deepcopy(cls, memo) - * - * copied = self.__class__(cls, # <<<<<<<<<<<<<< - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) - */ - __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2118, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2118, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "dependency_injector/providers.pyx":2120 - * copied = self.__class__(cls, - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< - * copied.set_attributes(**deepcopy(self.attributes, memo)) - * - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2120, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2120, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2120, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__pyx_t_8 == Py_None)) { - PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 2120, __pyx_L1_error) + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } } - if (likely(PyDict_CheckExact(__pyx_t_8))) { - __pyx_t_3 = PyDict_Copy(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2120, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2118, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - - /* "dependency_injector/providers.pyx":2118 - * cls = deepcopy(cls, memo) - * - * copied = self.__class__(cls, # <<<<<<<<<<<<<< - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) - */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2118, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2157, __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; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_8); - __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":2121 - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) + /* "dependency_injector/providers.pyx":2158 + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(provides) + * copied.set_args(*deepcopy(self.args, memo)) # <<<<<<<<<<<<<< + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) + * copied.set_attributes(**deepcopy(self.attributes, memo)) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2158, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "dependency_injector/providers.pyx":2159 + * copied.set_provides(provides) + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< + * copied.set_attributes(**deepcopy(self.attributes, memo)) + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2159, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_4 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(1, 2159, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_t_4))) { + __pyx_t_2 = PyDict_Copy(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "dependency_injector/providers.pyx":2160 + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) * copied.set_attributes(**deepcopy(self.attributes, memo)) # <<<<<<<<<<<<<< * * self._copy_overridings(copied, memo) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2121, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2121, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2121, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2160, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2121, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 2121, __pyx_L1_error) + __PYX_ERR(1, 2160, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_t_1))) { - __pyx_t_3 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2121, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2121, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2160, __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_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2121, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2123 + /* "dependency_injector/providers.pyx":2162 * copied.set_attributes(**deepcopy(self.attributes, memo)) * * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 2123, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2123, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 2162, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2162, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_Factory *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":2125 + /* "dependency_injector/providers.pyx":2164 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -42086,7 +42937,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2108 + /* "dependency_injector/providers.pyx":2146 * super(Factory, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -42100,18 +42951,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("dependency_injector.providers.Factory.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_copied); - __Pyx_XDECREF(__pyx_v_cls); + __Pyx_XDECREF(__pyx_v_provides); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":2127 +/* "dependency_injector/providers.pyx":2166 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -42146,7 +42996,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4__str__(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":2132 + /* "dependency_injector/providers.pyx":2171 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< @@ -42155,31 +43005,31 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4__str__(str */ __Pyx_XDECREF(__pyx_r); - /* "dependency_injector/providers.pyx":2133 + /* "dependency_injector/providers.pyx":2172 * """ * return represent_provider(provider=self, * provides=self.__instantiator.provides) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2133, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":2132 + /* "dependency_injector/providers.pyx":2171 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< * provides=self.__instantiator.provides) * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2132, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2127 + /* "dependency_injector/providers.pyx":2166 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -42199,7 +43049,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4__str__(str return __pyx_r; } -/* "dependency_injector/providers.pyx":2136 +/* "dependency_injector/providers.pyx":2175 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -42229,7 +43079,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_3cls___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2138 + /* "dependency_injector/providers.pyx":2177 * def cls(self): * """Return provided type.""" * return self.provides # <<<<<<<<<<<<<< @@ -42237,13 +43087,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_3cls___get__ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2138, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2136 + /* "dependency_injector/providers.pyx":2175 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -42262,11 +43112,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_3cls___get__ return __pyx_r; } -/* "dependency_injector/providers.pyx":2141 +/* "dependency_injector/providers.pyx":2180 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return provided type.""" + * """Return provider's provides.""" * return self.__instantiator.provides */ @@ -42292,25 +43142,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8provides___ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2143 + /* "dependency_injector/providers.pyx":2182 * def provides(self): - * """Return provided type.""" + * """Return provider's provides.""" * return self.__instantiator.provides # <<<<<<<<<<<<<< * - * @property + * def set_provides(self, provides): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2143, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2141 + /* "dependency_injector/providers.pyx":2180 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return provided type.""" + * """Return provider's provides.""" * return self.__instantiator.provides */ @@ -42325,7 +43175,294 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8provides___ return __pyx_r; } -/* "dependency_injector/providers.pyx":2146 +/* "dependency_injector/providers.pyx":2184 + * return self.__instantiator.provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * if (provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_7set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_6set_provides[] = "Set provider's provides."; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_7set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_6set_provides(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), ((PyObject *)__pyx_v_provides)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6set_provides(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_provides", 0); + + /* "dependency_injector/providers.pyx":2186 + * def set_provides(self, provides): + * """Set provider's provides.""" + * if (provides # <<<<<<<<<<<<<< + * and self.__class__.provided_type and + * not issubclass(provides, self.__class__.provided_type)): + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_provides); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2186, __pyx_L1_error) + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + + /* "dependency_injector/providers.pyx":2187 + * """Set provider's provides.""" + * if (provides + * and self.__class__.provided_type and # <<<<<<<<<<<<<< + * not issubclass(provides, self.__class__.provided_type)): + * raise Error( + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + + /* "dependency_injector/providers.pyx":2188 + * if (provides + * and self.__class__.provided_type and + * not issubclass(provides, self.__class__.provided_type)): # <<<<<<<<<<<<<< + * raise Error( + * '{0} can provide only {1} instances'.format( + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 2188, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = ((!(__pyx_t_2 != 0)) != 0); + __pyx_t_1 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + + /* "dependency_injector/providers.pyx":2186 + * def set_provides(self, provides): + * """Set provider's provides.""" + * if (provides # <<<<<<<<<<<<<< + * and self.__class__.provided_type and + * not issubclass(provides, self.__class__.provided_type)): + */ + if (unlikely(__pyx_t_1)) { + + /* "dependency_injector/providers.pyx":2189 + * and self.__class__.provided_type and + * not issubclass(provides, self.__class__.provided_type)): + * raise Error( # <<<<<<<<<<<<<< + * '{0} can provide only {1} instances'.format( + * _class_qualname(self), + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "dependency_injector/providers.pyx":2190 + * not issubclass(provides, self.__class__.provided_type)): + * raise Error( + * '{0} can provide only {1} instances'.format( # <<<<<<<<<<<<<< + * _class_qualname(self), + * self.__class__.provided_type, + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_provide_only_1_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "dependency_injector/providers.pyx":2191 + * raise Error( + * '{0} can provide only {1} instances'.format( + * _class_qualname(self), # <<<<<<<<<<<<<< + * self.__class__.provided_type, + * ), + */ + __pyx_t_8 = __pyx_f_19dependency_injector_9providers__class_qualname(((PyObject *)__pyx_v_self), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "dependency_injector/providers.pyx":2192 + * '{0} can provide only {1} instances'.format( + * _class_qualname(self), + * self.__class__.provided_type, # <<<<<<<<<<<<<< + * ), + * ) + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + __pyx_t_11 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_11 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2190, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2190, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else + #endif + { + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_10); + __pyx_t_8 = 0; + __pyx_t_10 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 2189, __pyx_L1_error) + + /* "dependency_injector/providers.pyx":2186 + * def set_provides(self, provides): + * """Set provider's provides.""" + * if (provides # <<<<<<<<<<<<<< + * and self.__class__.provided_type and + * not issubclass(provides, self.__class__.provided_type)): + */ + } + + /* "dependency_injector/providers.pyx":2195 + * ), + * ) + * self.__instantiator.set_provides(provides) # <<<<<<<<<<<<<< + * return self + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "dependency_injector/providers.pyx":2196 + * ) + * self.__instantiator.set_provides(provides) + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":2184 + * return self.__instantiator.provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * if (provides + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("dependency_injector.providers.Factory.set_provides", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":2199 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -42355,7 +43492,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4args___get_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2148 + /* "dependency_injector/providers.pyx":2201 * def args(self): * """Return positional argument injections.""" * return self.__instantiator.args # <<<<<<<<<<<<<< @@ -42363,13 +43500,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4args___get_ * def add_args(self, *args): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2148, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2146 + /* "dependency_injector/providers.pyx":2199 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -42388,7 +43525,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4args___get_ return __pyx_r; } -/* "dependency_injector/providers.pyx":2150 +/* "dependency_injector/providers.pyx":2203 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -42397,9 +43534,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4args___get_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory_6add_args[] = "Add __init__ positional argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_9add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_8add_args[] = "Add __init__ positional argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_9add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -42407,7 +43544,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_7add_args(Py if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_args", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_6add_args(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_args); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_8add_args(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -42415,7 +43552,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_7add_args(Py return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8add_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -42425,21 +43562,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_args", 0); - /* "dependency_injector/providers.pyx":2155 + /* "dependency_injector/providers.pyx":2208 * :return: Reference ``self`` * """ * self.__instantiator.add_args(*args) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2155, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2155, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2156 + /* "dependency_injector/providers.pyx":2209 * """ * self.__instantiator.add_args(*args) * return self # <<<<<<<<<<<<<< @@ -42451,7 +43588,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(st __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2150 + /* "dependency_injector/providers.pyx":2203 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -42471,7 +43608,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(st return __pyx_r; } -/* "dependency_injector/providers.pyx":2158 +/* "dependency_injector/providers.pyx":2211 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -42480,9 +43617,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(st */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory_8set_args[] = "Set __init__ positional argument injections.\n\n Existing __init__ positional argument injections are dropped.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_11set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_10set_args[] = "Set __init__ positional argument injections.\n\n Existing __init__ positional argument injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_11set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -42490,7 +43627,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_9set_args(Py if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_args", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_8set_args(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_args); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_10set_args(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -42498,7 +43635,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_9set_args(Py return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10set_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -42508,21 +43645,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_args", 0); - /* "dependency_injector/providers.pyx":2165 + /* "dependency_injector/providers.pyx":2218 * :return: Reference ``self`` * """ * self.__instantiator.set_args(*args) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2165, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2165, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2166 + /* "dependency_injector/providers.pyx":2219 * """ * self.__instantiator.set_args(*args) * return self # <<<<<<<<<<<<<< @@ -42534,7 +43671,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(st __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2158 + /* "dependency_injector/providers.pyx":2211 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -42554,7 +43691,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(st return __pyx_r; } -/* "dependency_injector/providers.pyx":2168 +/* "dependency_injector/providers.pyx":2221 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -42563,20 +43700,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(st */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory_10clear_args[] = "Drop __init__ positional argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_13clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_12clear_args[] = "Drop __init__ positional argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_13clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_args (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_10clear_args(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_12clear_args(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12clear_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -42587,14 +43724,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_args", 0); - /* "dependency_injector/providers.pyx":2173 + /* "dependency_injector/providers.pyx":2226 * :return: Reference ``self`` * """ * self.__instantiator.clear_args() # <<<<<<<<<<<<<< * return self * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2173, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -42608,12 +43745,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2173, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2174 + /* "dependency_injector/providers.pyx":2227 * """ * self.__instantiator.clear_args() * return self # <<<<<<<<<<<<<< @@ -42625,7 +43762,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2168 + /* "dependency_injector/providers.pyx":2221 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -42646,7 +43783,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args return __pyx_r; } -/* "dependency_injector/providers.pyx":2177 +/* "dependency_injector/providers.pyx":2230 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -42676,7 +43813,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___ge int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2179 + /* "dependency_injector/providers.pyx":2232 * def kwargs(self): * """Return keyword argument injections.""" * return self.__instantiator.kwargs # <<<<<<<<<<<<<< @@ -42684,13 +43821,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___ge * def add_kwargs(self, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2179, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2177 + /* "dependency_injector/providers.pyx":2230 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -42709,7 +43846,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___ge return __pyx_r; } -/* "dependency_injector/providers.pyx":2181 +/* "dependency_injector/providers.pyx":2234 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -42718,9 +43855,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___ge */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory_12add_kwargs[] = "Add __init__ keyword argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_15add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_14add_kwargs[] = "Add __init__ keyword argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_15add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -42734,7 +43871,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_13add_kwargs } else { __pyx_v_kwargs = NULL; } - __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_14add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -42742,7 +43879,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_13add_kwargs return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -42752,21 +43889,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_kwargs", 0); - /* "dependency_injector/providers.pyx":2186 + /* "dependency_injector/providers.pyx":2239 * :return: Reference ``self`` * """ * self.__instantiator.add_kwargs(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2186, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2186, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2187 + /* "dependency_injector/providers.pyx":2240 * """ * self.__instantiator.add_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -42778,7 +43915,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2181 + /* "dependency_injector/providers.pyx":2234 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -42798,7 +43935,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs return __pyx_r; } -/* "dependency_injector/providers.pyx":2189 +/* "dependency_injector/providers.pyx":2242 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -42807,9 +43944,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory_14set_kwargs[] = "Set __init__ keyword argument injections.\n\n Existing __init__ keyword argument injections are dropped.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_17set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_16set_kwargs[] = "Set __init__ keyword argument injections.\n\n Existing __init__ keyword argument injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_17set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -42823,7 +43960,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_15set_kwargs } else { __pyx_v_kwargs = NULL; } - __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_16set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -42831,7 +43968,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_15set_kwargs return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -42841,21 +43978,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_kwargs", 0); - /* "dependency_injector/providers.pyx":2196 + /* "dependency_injector/providers.pyx":2249 * :return: Reference ``self`` * """ * self.__instantiator.set_kwargs(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2196, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2197 + /* "dependency_injector/providers.pyx":2250 * """ * self.__instantiator.set_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -42867,7 +44004,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2189 + /* "dependency_injector/providers.pyx":2242 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -42887,7 +44024,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs return __pyx_r; } -/* "dependency_injector/providers.pyx":2199 +/* "dependency_injector/providers.pyx":2252 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -42896,20 +44033,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory_16clear_kwargs[] = "Drop __init__ keyword argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_19clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_18clear_kwargs[] = "Drop __init__ keyword argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_19clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_kwargs (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_18clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -42920,14 +44057,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwar int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_kwargs", 0); - /* "dependency_injector/providers.pyx":2204 + /* "dependency_injector/providers.pyx":2257 * :return: Reference ``self`` * """ * self.__instantiator.clear_kwargs() # <<<<<<<<<<<<<< * return self * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2204, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -42941,12 +44078,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwar } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2204, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2205 + /* "dependency_injector/providers.pyx":2258 * """ * self.__instantiator.clear_kwargs() * return self # <<<<<<<<<<<<<< @@ -42958,7 +44095,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwar __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2199 + /* "dependency_injector/providers.pyx":2252 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -42979,7 +44116,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwar return __pyx_r; } -/* "dependency_injector/providers.pyx":2208 +/* "dependency_injector/providers.pyx":2261 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -43015,19 +44152,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2214 + /* "dependency_injector/providers.pyx":2267 * cdef dict attributes * * attributes = dict() # <<<<<<<<<<<<<< * for index in range(self.__attributes_len): * attribute = self.__attributes[index] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2214, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2215 + /* "dependency_injector/providers.pyx":2268 * * attributes = dict() * for index in range(self.__attributes_len): # <<<<<<<<<<<<<< @@ -43039,7 +44176,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pyx":2216 + /* "dependency_injector/providers.pyx":2269 * attributes = dict() * for index in range(self.__attributes_len): * attribute = self.__attributes[index] # <<<<<<<<<<<<<< @@ -43048,15 +44185,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes */ if (unlikely(__pyx_v_self->__pyx___attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 2216, __pyx_L1_error) + __PYX_ERR(1, 2269, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___attributes, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2216, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___attributes, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 2216, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 2269, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_attribute, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2217 + /* "dependency_injector/providers.pyx":2270 * for index in range(self.__attributes_len): * attribute = self.__attributes[index] * attributes[attribute.__name] = attribute.__value # <<<<<<<<<<<<<< @@ -43065,11 +44202,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes */ __pyx_t_1 = __pyx_v_attribute->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_1); - if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_v_attribute->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 2217, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_v_attribute->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 2270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":2218 + /* "dependency_injector/providers.pyx":2271 * attribute = self.__attributes[index] * attributes[attribute.__name] = attribute.__value * return attributes # <<<<<<<<<<<<<< @@ -43081,7 +44218,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes __pyx_r = __pyx_v_attributes; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2208 + /* "dependency_injector/providers.pyx":2261 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -43102,7 +44239,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes return __pyx_r; } -/* "dependency_injector/providers.pyx":2220 +/* "dependency_injector/providers.pyx":2273 * return attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -43111,9 +44248,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_19add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory_18add_attributes[] = "Add attribute injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_19add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_21add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_20add_attributes[] = "Add attribute injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_21add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -43123,7 +44260,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_19add_attrib if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_attributes", 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_r = __pyx_pf_19dependency_injector_9providers_7Factory_18add_attributes(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_20add_attributes(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -43131,7 +44268,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_19add_attrib return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20add_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -43142,16 +44279,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_attributes", 0); - /* "dependency_injector/providers.pyx":2225 + /* "dependency_injector/providers.pyx":2278 * :return: Reference ``self`` * """ * self.__attributes += parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__attributes_len = len(self.__attributes) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2225, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___attributes, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2225, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___attributes, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -43160,7 +44297,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2226 + /* "dependency_injector/providers.pyx":2279 * """ * self.__attributes += parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -43171,13 +44308,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 2226, __pyx_L1_error) + __PYX_ERR(1, 2279, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2226, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx___attributes_len = __pyx_t_3; - /* "dependency_injector/providers.pyx":2227 + /* "dependency_injector/providers.pyx":2280 * self.__attributes += parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -43189,7 +44326,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2220 + /* "dependency_injector/providers.pyx":2273 * return attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -43209,7 +44346,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib return __pyx_r; } -/* "dependency_injector/providers.pyx":2229 +/* "dependency_injector/providers.pyx":2282 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -43218,9 +44355,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_21set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory_20set_attributes[] = "Set attribute injections.\n\n Existing attribute injections are dropped.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_21set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_23set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_22set_attributes[] = "Set attribute injections.\n\n Existing attribute injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_23set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -43230,7 +44367,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_21set_attrib if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_attributes", 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_r = __pyx_pf_19dependency_injector_9providers_7Factory_20set_attributes(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_22set_attributes(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -43238,7 +44375,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_21set_attrib return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22set_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -43248,14 +44385,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_attributes", 0); - /* "dependency_injector/providers.pyx":2236 + /* "dependency_injector/providers.pyx":2289 * :return: Reference ``self`` * """ * self.__attributes = parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__attributes_len = len(self.__attributes) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2236, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___attributes); @@ -43263,7 +44400,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2237 + /* "dependency_injector/providers.pyx":2290 * """ * self.__attributes = parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -43274,13 +44411,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 2237, __pyx_L1_error) + __PYX_ERR(1, 2290, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2237, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2290, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___attributes_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":2238 + /* "dependency_injector/providers.pyx":2291 * self.__attributes = parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -43292,7 +44429,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2229 + /* "dependency_injector/providers.pyx":2282 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -43311,7 +44448,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib return __pyx_r; } -/* "dependency_injector/providers.pyx":2240 +/* "dependency_injector/providers.pyx":2293 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -43320,20 +44457,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_23clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory_22clear_attributes[] = "Drop attribute injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_23clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_24clear_attributes[] = "Drop attribute injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_attributes (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_22clear_attributes(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_24clear_attributes(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24clear_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -43343,14 +44480,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_attributes", 0); - /* "dependency_injector/providers.pyx":2245 + /* "dependency_injector/providers.pyx":2298 * :return: Reference ``self`` * """ * self.__attributes = tuple() # <<<<<<<<<<<<<< * self.__attributes_len = len(self.__attributes) * return self */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2245, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___attributes); @@ -43358,7 +44495,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attr __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2246 + /* "dependency_injector/providers.pyx":2299 * """ * self.__attributes = tuple() * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -43369,13 +44506,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attr __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 2246, __pyx_L1_error) + __PYX_ERR(1, 2299, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2246, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___attributes_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":2247 + /* "dependency_injector/providers.pyx":2300 * self.__attributes = tuple() * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -43387,7 +44524,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attr __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2240 + /* "dependency_injector/providers.pyx":2293 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -43407,7 +44544,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attr } static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":2250 +/* "dependency_injector/providers.pyx":2303 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -43440,7 +44577,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_7related___g if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_10___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 2250, __pyx_L1_error) + __PYX_ERR(1, 2303, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -43448,7 +44585,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_7related___g __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_7Factory_7related_2generator8, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Factory___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 2250, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_7Factory_7related_2generator8, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Factory___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 2303, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -43489,25 +44626,25 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2250, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2303, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2252 + /* "dependency_injector/providers.pyx":2305 * def related(self): * """Return related providers generator.""" * yield from filter(is_provider, [self.provides]) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2252, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2252, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2252, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2252, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -43515,7 +44652,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2252, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_3); @@ -43529,27 +44666,27 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2252, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2305, __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(1, 2252, __pyx_L1_error) + else __PYX_ERR(1, 2305, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":2253 + /* "dependency_injector/providers.pyx":2306 * """Return related providers generator.""" * yield from filter(is_provider, [self.provides]) * yield from filter(is_provider, self.args) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.kwargs.values()) * yield from filter(is_provider, self.attributes.values()) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2253, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2253, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2253, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -43557,7 +44694,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2253, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); @@ -43571,27 +44708,27 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2253, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2306, __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(1, 2253, __pyx_L1_error) + else __PYX_ERR(1, 2306, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":2254 + /* "dependency_injector/providers.pyx":2307 * yield from filter(is_provider, [self.provides]) * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.attributes.values()) * yield from super().related */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2254, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2254, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2254, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -43606,10 +44743,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2254, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2254, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -43617,7 +44754,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2254, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -43631,27 +44768,27 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L6_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2254, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2307, __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(1, 2254, __pyx_L1_error) + else __PYX_ERR(1, 2307, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":2255 + /* "dependency_injector/providers.pyx":2308 * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) * yield from filter(is_provider, self.attributes.values()) # <<<<<<<<<<<<<< * yield from super().related * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2255, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2255, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2255, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -43666,10 +44803,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge } __pyx_t_4 = (__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_4)) __PYX_ERR(1, 2255, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2255, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -43677,7 +44814,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2255, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_4); @@ -43691,23 +44828,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge __pyx_generator->resume_label = 4; return __pyx_r; __pyx_L7_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2255, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2308, __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(1, 2255, __pyx_L1_error) + else __PYX_ERR(1, 2308, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":2256 + /* "dependency_injector/providers.pyx":2309 * yield from filter(is_provider, self.kwargs.values()) * yield from filter(is_provider, self.attributes.values()) * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2256, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); @@ -43715,10 +44852,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2256, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2256, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_4); @@ -43732,17 +44869,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge __pyx_generator->resume_label = 5; return __pyx_r; __pyx_L8_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2256, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2309, __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(1, 2256, __pyx_L1_error) + else __PYX_ERR(1, 2309, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":2250 + /* "dependency_injector/providers.pyx":2303 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -43770,7 +44907,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge return __pyx_r; } -/* "dependency_injector/providers.pyx":2258 +/* "dependency_injector/providers.pyx":2311 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -43778,7 +44915,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_7Factory_7related_2ge * return __factory_call(self, args, kwargs) */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_27_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -43801,9 +44938,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2258, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_7Factory_25_provide)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_7Factory_27_provide)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -43821,7 +44958,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2258, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2311, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -43829,13 +44966,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2258, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2311, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2258, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -43846,7 +44983,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2258, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -43869,7 +45006,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru #endif } - /* "dependency_injector/providers.pyx":2260 + /* "dependency_injector/providers.pyx":2313 * cpdef object _provide(self, tuple args, dict kwargs): * """Return new instance.""" * return __factory_call(self, args, kwargs) # <<<<<<<<<<<<<< @@ -43877,13 +45014,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___factory_call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2260, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___factory_call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2258 + /* "dependency_injector/providers.pyx":2311 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -43907,9 +45044,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru } /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_7Factory_24_provide[] = "Return new instance."; -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_27_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_7Factory_26_provide[] = "Return new instance."; +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_27_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -43941,11 +45078,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2258, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2311, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2258, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2311, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -43958,15 +45095,15 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2258, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2311, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Factory._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2258, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2258, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_24_provide(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2311, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2311, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_26_provide(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; @@ -43977,7 +45114,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(P return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24_provide(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_26_provide(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -43986,7 +45123,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24_provide(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_7Factory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2258, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_7Factory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44010,19 +45147,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24_provide(s */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_27__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_27__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_26__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_28__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_26__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_28__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -44289,19 +45426,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_26__reduce_c */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_29__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_29__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_28__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_30__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_28__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_30__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -44677,7 +45814,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16DelegatedFactory_2_ return __pyx_r; } -/* "dependency_injector/providers.pyx":2295 +/* "dependency_injector/providers.pyx":2348 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -44730,7 +45867,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "dependency_injector/providers.pyx":2300 + /* "dependency_injector/providers.pyx":2353 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -44741,16 +45878,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":2301 + /* "dependency_injector/providers.pyx":2354 * """ * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<< * return super().__call__(*args, **kwargs) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2301, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2301, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -44764,7 +45901,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2301, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -44780,14 +45917,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 2301, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 2301, __pyx_L1_error) + __PYX_ERR(1, 2354, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2300 + /* "dependency_injector/providers.pyx":2353 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -44796,7 +45933,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c */ } - /* "dependency_injector/providers.pyx":2302 + /* "dependency_injector/providers.pyx":2355 * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) * return super().__call__(*args, **kwargs) # <<<<<<<<<<<<<< @@ -44804,7 +45941,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c * def override(self, provider): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2302, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractFactory)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractFactory)); @@ -44812,20 +45949,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2302, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_call); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2302, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_call); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2302, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2295 + /* "dependency_injector/providers.pyx":2348 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -44848,7 +45985,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c return __pyx_r; } -/* "dependency_injector/providers.pyx":2304 +/* "dependency_injector/providers.pyx":2357 * return super().__call__(*args, **kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -44887,7 +46024,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":2315 + /* "dependency_injector/providers.pyx":2368 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, Factory): # <<<<<<<<<<<<<< @@ -44898,24 +46035,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":2316 + /* "dependency_injector/providers.pyx":2369 * """ * if not isinstance(provider, Factory): * raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<< * '{1} providers'.format(self, Factory)) * return super(AbstractFactory, self).override(provider) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2316, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":2317 + /* "dependency_injector/providers.pyx":2370 * if not isinstance(provider, Factory): * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, Factory)) # <<<<<<<<<<<<<< * return super(AbstractFactory, self).override(provider) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2317, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -44932,7 +46069,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2317, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2370, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -44940,13 +46077,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2317, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2370, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2317, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -44957,7 +46094,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2317, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -44975,14 +46112,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 2316, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 2316, __pyx_L1_error) + __PYX_ERR(1, 2369, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2315 + /* "dependency_injector/providers.pyx":2368 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, Factory): # <<<<<<<<<<<<<< @@ -44991,7 +46128,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov */ } - /* "dependency_injector/providers.pyx":2318 + /* "dependency_injector/providers.pyx":2371 * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, Factory)) * return super(AbstractFactory, self).override(provider) # <<<<<<<<<<<<<< @@ -44999,7 +46136,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov * cpdef object _provide(self, tuple args, dict kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2318, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractFactory)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractFactory)); @@ -45007,10 +46144,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2318, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2318, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -45025,14 +46162,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2318, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2304 + /* "dependency_injector/providers.pyx":2357 * return super().__call__(*args, **kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -45056,7 +46193,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov return __pyx_r; } -/* "dependency_injector/providers.pyx":2320 +/* "dependency_injector/providers.pyx":2373 * return super(AbstractFactory, self).override(provider) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -45087,7 +46224,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__pro if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2320, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_15AbstractFactory_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -45107,7 +46244,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__pro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2320, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2373, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -45115,13 +46252,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__pro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2320, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2373, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2320, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -45132,7 +46269,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__pro __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2320, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -45155,20 +46292,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__pro #endif } - /* "dependency_injector/providers.pyx":2322 + /* "dependency_injector/providers.pyx":2375 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" * raise NotImplementedError('Abstract provider forward providing logic ' # <<<<<<<<<<<<<< * 'to overriding provider') * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 2322, __pyx_L1_error) + __PYX_ERR(1, 2375, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2320 + /* "dependency_injector/providers.pyx":2373 * return super(AbstractFactory, self).override(provider) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -45226,11 +46363,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_5_p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2320, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2373, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2320, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2373, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -45243,14 +46380,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_5_p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2320, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2373, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.AbstractFactory._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2320, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2320, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2373, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2373, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_15AbstractFactory_4_provide(((struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -45271,7 +46408,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_4_p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_15AbstractFactory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2320, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_15AbstractFactory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -45625,7 +46762,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_8__ return __pyx_r; } -/* "dependency_injector/providers.pyx":2336 +/* "dependency_injector/providers.pyx":2389 * """ * * def __init__(self, factory): # <<<<<<<<<<<<<< @@ -45666,7 +46803,7 @@ static int __pyx_pw_19dependency_injector_9providers_15FactoryDelegate_1__init__ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 2336, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 2389, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -45677,7 +46814,7 @@ static int __pyx_pw_19dependency_injector_9providers_15FactoryDelegate_1__init__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2336, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2389, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.FactoryDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -45708,7 +46845,7 @@ static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":2342 + /* "dependency_injector/providers.pyx":2395 * :type factory: object * """ * if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<< @@ -45719,26 +46856,26 @@ static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__( __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":2343 + /* "dependency_injector/providers.pyx":2396 * """ * if isinstance(factory, Factory) is False: * raise Error('{0} can wrap only {1} providers'.format( # <<<<<<<<<<<<<< * self.__class__, Factory)) * super(FactoryDelegate, self).__init__(factory) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2343, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2343, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "dependency_injector/providers.pyx":2344 + /* "dependency_injector/providers.pyx":2397 * if isinstance(factory, Factory) is False: * raise Error('{0} can wrap only {1} providers'.format( * self.__class__, Factory)) # <<<<<<<<<<<<<< * super(FactoryDelegate, self).__init__(factory) * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2344, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -45755,7 +46892,7 @@ static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__( #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2343, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2396, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -45764,14 +46901,14 @@ static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__( #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2343, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2396, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2343, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -45782,7 +46919,7 @@ static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__( __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); __pyx_t_7 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2343, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -45800,14 +46937,14 @@ static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__( __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 2343, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 2343, __pyx_L1_error) + __PYX_ERR(1, 2396, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2342 + /* "dependency_injector/providers.pyx":2395 * :type factory: object * """ * if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<< @@ -45816,14 +46953,14 @@ static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__( */ } - /* "dependency_injector/providers.pyx":2345 + /* "dependency_injector/providers.pyx":2398 * raise Error('{0} can wrap only {1} providers'.format( * self.__class__, Factory)) * super(FactoryDelegate, self).__init__(factory) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2345, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryDelegate)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryDelegate)); @@ -45831,10 +46968,10 @@ static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__( __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2345, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2345, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -45849,12 +46986,12 @@ static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__( } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_factory) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_factory); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2345, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":2336 + /* "dependency_injector/providers.pyx":2389 * """ * * def __init__(self, factory): # <<<<<<<<<<<<<< @@ -46202,17 +47339,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15FactoryDelegate_4__ return __pyx_r; } -/* "dependency_injector/providers.pyx":2364 +/* "dependency_injector/providers.pyx":2417 * __IS_DELEGATED__ = True * * def __init__(self, **factories): # <<<<<<<<<<<<<< - * """Initializer. - * + * """Initialize provider.""" + * self.__factories = {} */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_16FactoryAggregate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate___init__[] = "Initializer.\n\n :param factories: Dictionary of aggregate factories.\n :type factories: dict[str, :py:class:`Factory`]\n "; +static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate___init__[] = "Initialize provider."; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate___init__; #endif @@ -46224,8 +47361,12 @@ static int __pyx_pw_19dependency_injector_9providers_16FactoryAggregate_1__init_ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1; - __pyx_v_factories = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_factories)) return -1; - __Pyx_GOTREF(__pyx_v_factories); + if (__pyx_kwds) { + __pyx_v_factories = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_factories)) return -1; + __Pyx_GOTREF(__pyx_v_factories); + } else { + __pyx_v_factories = NULL; + } __pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate___init__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), __pyx_v_factories); /* function exit code */ @@ -46235,221 +47376,53 @@ static int __pyx_pw_19dependency_injector_9providers_16FactoryAggregate_1__init_ } static int __pyx_pf_19dependency_injector_9providers_16FactoryAggregate___init__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factories) { - PyObject *__pyx_v_factory = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - Py_ssize_t __pyx_t_3; - PyObject *(*__pyx_t_4)(PyObject *); - int __pyx_t_5; - int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; - PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":2370 - * :type factories: dict[str, :py:class:`Factory`] - * """ - * for factory in factories.values(): # <<<<<<<<<<<<<< - * if isinstance(factory, Factory) is False: - * raise Error( - */ - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_factories); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2370, __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, 2370, __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, 2370, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - for (;;) { - if (likely(!__pyx_t_4)) { - if (likely(PyList_CheckExact(__pyx_t_2))) { - if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 2370, __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, 2370, __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, 2370, __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, 2370, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } - } else { - __pyx_t_1 = __pyx_t_4(__pyx_t_2); - if (unlikely(!__pyx_t_1)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 2370, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_1); - } - __Pyx_XDECREF_SET(__pyx_v_factory, __pyx_t_1); - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":2371 - * """ - * for factory in factories.values(): - * if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<< - * raise Error( - * '{0} can aggregate only instances of {1}, given - {2}' - */ - __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_factory, __pyx_ptype_19dependency_injector_9providers_Factory); - __pyx_t_6 = ((__pyx_t_5 == 0) != 0); - if (unlikely(__pyx_t_6)) { - - /* "dependency_injector/providers.pyx":2372 - * for factory in factories.values(): - * if isinstance(factory, Factory) is False: - * raise Error( # <<<<<<<<<<<<<< - * '{0} can aggregate only instances of {1}, given - {2}' - * .format(self.__class__, Factory, factory)) - */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2372, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - - /* "dependency_injector/providers.pyx":2374 - * raise Error( - * '{0} can aggregate only instances of {1}, given - {2}' - * .format(self.__class__, Factory, factory)) # <<<<<<<<<<<<<< - * self.__factories = factories + /* "dependency_injector/providers.pyx":2419 + * def __init__(self, **factories): + * """Initialize provider.""" + * self.__factories = {} # <<<<<<<<<<<<<< + * self.set_factories(**factories) * super(FactoryAggregate, self).__init__() */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_aggregate_only_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2374, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2374, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = NULL; - __pyx_t_12 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); - if (likely(__pyx_t_11)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); - __Pyx_INCREF(__pyx_t_11); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_9, function); - __pyx_t_12 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_9)) { - PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_10, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_v_factory}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2374, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { - PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_10, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_v_factory}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2374, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else - #endif - { - __pyx_t_13 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 2374, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (__pyx_t_11) { - __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL; - } - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_t_10); - __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); - __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); - PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); - __Pyx_INCREF(__pyx_v_factory); - __Pyx_GIVEREF(__pyx_v_factory); - PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_12, __pyx_v_factory); - __pyx_t_10 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2374, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - } - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_9)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_9); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - } - } - __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2372, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 2372, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->__pyx___factories); + __Pyx_DECREF(__pyx_v_self->__pyx___factories); + __pyx_v_self->__pyx___factories = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2371 - * """ - * for factory in factories.values(): - * if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<< - * raise Error( - * '{0} can aggregate only instances of {1}, given - {2}' - */ - } - - /* "dependency_injector/providers.pyx":2370 - * :type factories: dict[str, :py:class:`Factory`] - * """ - * for factory in factories.values(): # <<<<<<<<<<<<<< - * if isinstance(factory, Factory) is False: - * raise Error( - */ - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "dependency_injector/providers.pyx":2375 - * '{0} can aggregate only instances of {1}, given - {2}' - * .format(self.__class__, Factory, factory)) - * self.__factories = factories # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":2420 + * """Initialize provider.""" + * self.__factories = {} + * self.set_factories(**factories) # <<<<<<<<<<<<<< * super(FactoryAggregate, self).__init__() * */ - __Pyx_INCREF(__pyx_v_factories); - __Pyx_GIVEREF(__pyx_v_factories); - __Pyx_GOTREF(__pyx_v_self->__pyx___factories); - __Pyx_DECREF(__pyx_v_self->__pyx___factories); - __pyx_v_self->__pyx___factories = __pyx_v_factories; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_factories); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_factories); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2376 - * .format(self.__class__, Factory, factory)) - * self.__factories = factories + /* "dependency_injector/providers.pyx":2421 + * self.__factories = {} + * self.set_factories(**factories) * super(FactoryAggregate, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2376, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate)); @@ -46457,35 +47430,35 @@ static int __pyx_pf_19dependency_injector_9providers_16FactoryAggregate___init__ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2376, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2376, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; + __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_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { + __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_7); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2376, __pyx_L1_error) + __pyx_t_2 = (__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_2)) __PYX_ERR(1, 2421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2364 + /* "dependency_injector/providers.pyx":2417 * __IS_DELEGATED__ = True * * def __init__(self, **factories): # <<<<<<<<<<<<<< - * """Initializer. - * + * """Initialize provider.""" + * self.__factories = {} */ /* function exit code */ @@ -46494,26 +47467,20 @@ static int __pyx_pf_19dependency_injector_9providers_16FactoryAggregate___init__ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_factory); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":2378 +/* "dependency_injector/providers.pyx":2423 * super(FactoryAggregate, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * """Create and return full copy of provider.""" - * cdef FactoryAggregate copied + * copied = memo.get(id(self)) */ /* Python wrapper */ @@ -46531,7 +47498,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_3_ } static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_memo) { - struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_copied = 0; + PyObject *__pyx_v_copied = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -46546,16 +47513,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_2_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":2382 - * cdef FactoryAggregate copied - * + /* "dependency_injector/providers.pyx":2425 + * def __deepcopy__(self, memo): + * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2382, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2382, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -46570,38 +47537,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_2_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2382, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_FactoryAggregate))))) __PYX_ERR(1, 2382, __pyx_L1_error) - __pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_t_1); + __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2383 - * + /* "dependency_injector/providers.pyx":2426 + * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied * */ - __pyx_t_5 = (((PyObject *)__pyx_v_copied) != Py_None); + __pyx_t_5 = (__pyx_v_copied != Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":2384 + /* "dependency_injector/providers.pyx":2427 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * copied = self.__class__() + * copied = _memorized_duplicate(self, memo) */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_copied)); - __pyx_r = ((PyObject *)__pyx_v_copied); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2383 - * + /* "dependency_injector/providers.pyx":2426 + * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied @@ -46609,67 +47575,67 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_2_ */ } - /* "dependency_injector/providers.pyx":2386 + /* "dependency_injector/providers.pyx":2429 * return copied * - * copied = self.__class__() # <<<<<<<<<<<<<< - * copied.__factories = deepcopy(self.__factories, memo) + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_factories(**deepcopy(self.factories, memo)) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2386, __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_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2386, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2429, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_FactoryAggregate))))) __PYX_ERR(1, 2386, __pyx_L1_error) - __Pyx_DECREF_SET(__pyx_v_copied, ((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_t_1)); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2387 + /* "dependency_injector/providers.pyx":2430 * - * copied = self.__class__() - * copied.__factories = deepcopy(self.__factories, memo) # <<<<<<<<<<<<<< + * copied = _memorized_duplicate(self, memo) + * copied.set_factories(**deepcopy(self.factories, memo)) # <<<<<<<<<<<<<< * * self._copy_overridings(copied, memo) */ - __pyx_t_1 = __pyx_v_self->__pyx___factories; - __Pyx_INCREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2387, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_factories); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_factories); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2430, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2387, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(__pyx_t_4 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(1, 2430, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_t_4))) { + __pyx_t_2 = PyDict_Copy(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 2387, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_v_copied->__pyx___factories); - __Pyx_DECREF(__pyx_v_copied->__pyx___factories); - __pyx_v_copied->__pyx___factories = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":2389 - * copied.__factories = deepcopy(self.__factories, memo) + /* "dependency_injector/providers.pyx":2432 + * copied.set_factories(**deepcopy(self.factories, memo)) * * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2389, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 2432, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2432, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":2391 + /* "dependency_injector/providers.pyx":2434 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -46677,16 +47643,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_2_ * def __getattr__(self, factory_name): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_copied)); - __pyx_r = ((PyObject *)__pyx_v_copied); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2378 + /* "dependency_injector/providers.pyx":2423 * super(FactoryAggregate, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * """Create and return full copy of provider.""" - * cdef FactoryAggregate copied + * copied = memo.get(id(self)) */ /* function exit code */ @@ -46698,13 +47664,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_2_ __Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_copied); + __Pyx_XDECREF(__pyx_v_copied); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":2393 +/* "dependency_injector/providers.pyx":2436 * return copied * * def __getattr__(self, factory_name): # <<<<<<<<<<<<<< @@ -46738,7 +47704,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_4_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":2395 + /* "dependency_injector/providers.pyx":2438 * def __getattr__(self, factory_name): * """Return aggregated factory.""" * return self.__get_factory(factory_name) # <<<<<<<<<<<<<< @@ -46746,14 +47712,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_4_ * def __str__(self): */ __Pyx_XDECREF(__pyx_r); - if (!(likely(PyString_CheckExact(__pyx_v_factory_name))||((__pyx_v_factory_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_factory_name)->tp_name), 0))) __PYX_ERR(1, 2395, __pyx_L1_error) - __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx___get_factory(__pyx_v_self, ((PyObject*)__pyx_v_factory_name))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2395, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_factory_name))||((__pyx_v_factory_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_factory_name)->tp_name), 0))) __PYX_ERR(1, 2438, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx___get_factory(__pyx_v_self, ((PyObject*)__pyx_v_factory_name))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2393 + /* "dependency_injector/providers.pyx":2436 * return copied * * def __getattr__(self, factory_name): # <<<<<<<<<<<<<< @@ -46772,7 +47738,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_4_ return __pyx_r; } -/* "dependency_injector/providers.pyx":2397 +/* "dependency_injector/providers.pyx":2440 * return self.__get_factory(factory_name) * * def __str__(self): # <<<<<<<<<<<<<< @@ -46807,7 +47773,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_6_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":2402 + /* "dependency_injector/providers.pyx":2445 * :rtype: str * """ * return represent_provider(provider=self, provides=self.factories) # <<<<<<<<<<<<<< @@ -46815,16 +47781,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_6_ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_factories); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2402, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_factories); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2402, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2397 + /* "dependency_injector/providers.pyx":2440 * return self.__get_factory(factory_name) * * def __str__(self): # <<<<<<<<<<<<<< @@ -46844,7 +47810,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_6_ return __pyx_r; } -/* "dependency_injector/providers.pyx":2405 +/* "dependency_injector/providers.pyx":2448 * * @property * def factories(self): # <<<<<<<<<<<<<< @@ -46870,19 +47836,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_9f __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2407 + /* "dependency_injector/providers.pyx":2450 * def factories(self): * """Return dictionary of factories, read-only.""" * return self.__factories # <<<<<<<<<<<<<< * - * def override(self, _): + * def set_factories(self, **factories): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->__pyx___factories); __pyx_r = __pyx_v_self->__pyx___factories; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2405 + /* "dependency_injector/providers.pyx":2448 * * @property * def factories(self): # <<<<<<<<<<<<<< @@ -46897,29 +47863,305 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_9f return __pyx_r; } -/* "dependency_injector/providers.pyx":2409 +/* "dependency_injector/providers.pyx":2452 * return self.__factories * + * def set_factories(self, **factories): # <<<<<<<<<<<<<< + * """Set factories.""" + * for factory in factories.values(): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9set_factories(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_8set_factories[] = "Set factories."; +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9set_factories(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_factories = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_factories (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("set_factories", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} + if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_factories", 1))) return NULL; + __pyx_v_factories = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_factories)) return NULL; + __Pyx_GOTREF(__pyx_v_factories); + __pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8set_factories(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), __pyx_v_factories); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_factories); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8set_factories(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factories) { + PyObject *__pyx_v_factory = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + int __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_factories", 0); + + /* "dependency_injector/providers.pyx":2454 + * def set_factories(self, **factories): + * """Set factories.""" + * for factory in factories.values(): # <<<<<<<<<<<<<< + * if isinstance(factory, Factory) is False: + * raise Error( + */ + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_factories); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2454, __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, 2454, __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, 2454, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 2454, __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, 2454, __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, 2454, __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, 2454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 2454, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_factory, __pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":2455 + * """Set factories.""" + * for factory in factories.values(): + * if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<< + * raise Error( + * '{0} can aggregate only instances of {1}, given - {2}' + */ + __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_factory, __pyx_ptype_19dependency_injector_9providers_Factory); + __pyx_t_6 = ((__pyx_t_5 == 0) != 0); + if (unlikely(__pyx_t_6)) { + + /* "dependency_injector/providers.pyx":2456 + * for factory in factories.values(): + * if isinstance(factory, Factory) is False: + * raise Error( # <<<<<<<<<<<<<< + * '{0} can aggregate only instances of {1}, given - {2}' + * .format(self.__class__, Factory, factory)) + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "dependency_injector/providers.pyx":2458 + * raise Error( + * '{0} can aggregate only instances of {1}, given - {2}' + * .format(self.__class__, Factory, factory)) # <<<<<<<<<<<<<< + * self.__factories = factories + * return self + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_aggregate_only_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_10, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_v_factory}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2458, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_10, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_v_factory}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2458, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else + #endif + { + __pyx_t_13 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 2458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_t_10); + __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); + __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); + PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); + __Pyx_INCREF(__pyx_v_factory); + __Pyx_GIVEREF(__pyx_v_factory); + PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_12, __pyx_v_factory); + __pyx_t_10 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2456, __pyx_L1_error) + + /* "dependency_injector/providers.pyx":2455 + * """Set factories.""" + * for factory in factories.values(): + * if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<< + * raise Error( + * '{0} can aggregate only instances of {1}, given - {2}' + */ + } + + /* "dependency_injector/providers.pyx":2454 + * def set_factories(self, **factories): + * """Set factories.""" + * for factory in factories.values(): # <<<<<<<<<<<<<< + * if isinstance(factory, Factory) is False: + * raise Error( + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "dependency_injector/providers.pyx":2459 + * '{0} can aggregate only instances of {1}, given - {2}' + * .format(self.__class__, Factory, factory)) + * self.__factories = factories # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_factories); + __Pyx_GIVEREF(__pyx_v_factories); + __Pyx_GOTREF(__pyx_v_self->__pyx___factories); + __Pyx_DECREF(__pyx_v_self->__pyx___factories); + __pyx_v_self->__pyx___factories = __pyx_v_factories; + + /* "dependency_injector/providers.pyx":2460 + * .format(self.__class__, Factory, factory)) + * self.__factories = factories + * return self # <<<<<<<<<<<<<< + * + * def override(self, _): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":2452 + * return self.__factories + * + * def set_factories(self, **factories): # <<<<<<<<<<<<<< + * """Set factories.""" + * for factory in factories.values(): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.set_factories", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_factory); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":2462 + * return self + * * def override(self, _): # <<<<<<<<<<<<<< * """Override provider with another provider. * */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9override(PyObject *__pyx_v_self, PyObject *__pyx_v__); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_8override[] = "Override provider with another provider.\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9override(PyObject *__pyx_v_self, PyObject *__pyx_v__) { +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11override(PyObject *__pyx_v_self, PyObject *__pyx_v__); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_10override[] = "Override provider with another provider.\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11override(PyObject *__pyx_v_self, PyObject *__pyx_v__) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("override (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8override(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), ((PyObject *)__pyx_v__)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10override(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), ((PyObject *)__pyx_v__)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8override(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__) { +static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10override(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -46933,26 +48175,26 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":2417 + /* "dependency_injector/providers.pyx":2470 * :rtype: :py:class:`OverridingContext` * """ * raise Error( # <<<<<<<<<<<<<< * '{0} providers could not be overridden'.format(self.__class__)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2417, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "dependency_injector/providers.pyx":2418 + /* "dependency_injector/providers.pyx":2471 * """ * raise Error( * '{0} providers could not be overridden'.format(self.__class__)) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_providers_could_not_be_overri, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2418, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_providers_could_not_be_overri, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2418, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -46967,7 +48209,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8o __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 2418, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -46983,15 +48225,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8o __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2417, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 2417, __pyx_L1_error) + __PYX_ERR(1, 2470, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2409 - * return self.__factories + /* "dependency_injector/providers.pyx":2462 + * return self * * def override(self, _): # <<<<<<<<<<<<<< * """Override provider with another provider. @@ -47014,7 +48256,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8o } static PyObject *__pyx_gb_19dependency_injector_9providers_16FactoryAggregate_7related_2generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":2421 +/* "dependency_injector/providers.pyx":2474 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -47047,7 +48289,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_7r if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_11___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 2421, __pyx_L1_error) + __PYX_ERR(1, 2474, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -47055,7 +48297,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_7r __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_16FactoryAggregate_7related_2generator9, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_FactoryAggregate___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 2421, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_16FactoryAggregate_7related_2generator9, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_FactoryAggregate___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 2474, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -47091,9 +48333,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16FactoryAggregate_7r return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2421, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2474, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2423 + /* "dependency_injector/providers.pyx":2476 * def related(self): * """Return related providers generator.""" * yield from self.__factories.values() # <<<<<<<<<<<<<< @@ -47102,9 +48344,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16FactoryAggregate_7r */ if (unlikely(__pyx_cur_scope->__pyx_v_self->__pyx___factories == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(1, 2423, __pyx_L1_error) + __PYX_ERR(1, 2476, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_v_self->__pyx___factories); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2423, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_cur_scope->__pyx_v_self->__pyx___factories); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -47117,23 +48359,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16FactoryAggregate_7r __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2423, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2476, __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(1, 2423, __pyx_L1_error) + else __PYX_ERR(1, 2476, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":2424 + /* "dependency_injector/providers.pyx":2477 * """Return related providers generator.""" * yield from self.__factories.values() * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2424, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate)); @@ -47141,10 +48383,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16FactoryAggregate_7r __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2424, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -47158,17 +48400,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16FactoryAggregate_7r __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2424, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2477, __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(1, 2424, __pyx_L1_error) + else __PYX_ERR(1, 2477, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":2421 + /* "dependency_injector/providers.pyx":2474 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -47194,7 +48436,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16FactoryAggregate_7r return __pyx_r; } -/* "dependency_injector/providers.pyx":2426 +/* "dependency_injector/providers.pyx":2479 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -47202,7 +48444,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16FactoryAggregate_7r * factory_name = args[0] */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__provide(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) { PyObject *__pyx_v_factory_name = NULL; PyObject *__pyx_r = NULL; @@ -47235,9 +48477,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2426, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11_provide)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13_provide)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -47255,7 +48497,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2426, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2479, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -47263,13 +48505,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2426, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2479, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2426, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -47280,7 +48522,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2426, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -47303,7 +48545,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr #endif } - /* "dependency_injector/providers.pyx":2427 + /* "dependency_injector/providers.pyx":2480 * * cpdef object _provide(self, tuple args, dict kwargs): * try: # <<<<<<<<<<<<<< @@ -47319,7 +48561,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { - /* "dependency_injector/providers.pyx":2428 + /* "dependency_injector/providers.pyx":2481 * cpdef object _provide(self, tuple args, dict kwargs): * try: * factory_name = args[0] # <<<<<<<<<<<<<< @@ -47328,14 +48570,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr */ if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 2428, __pyx_L3_error) + __PYX_ERR(1, 2481, __pyx_L3_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2428, __pyx_L3_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2481, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_factory_name = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2427 + /* "dependency_injector/providers.pyx":2480 * * cpdef object _provide(self, tuple args, dict kwargs): * try: # <<<<<<<<<<<<<< @@ -47344,7 +48586,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr */ } - /* "dependency_injector/providers.pyx":2435 + /* "dependency_injector/providers.pyx":2488 * raise TypeError('Factory missing 1 required positional argument: \'factory_name\'') * else: * args = args[1:] # <<<<<<<<<<<<<< @@ -47354,9 +48596,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr /*else:*/ { if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 2435, __pyx_L5_except_error) + __PYX_ERR(1, 2488, __pyx_L5_except_error) } - __pyx_t_1 = __Pyx_PyTuple_GetSlice(__pyx_v_args, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2435, __pyx_L5_except_error) + __pyx_t_1 = __Pyx_PyTuple_GetSlice(__pyx_v_args, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2488, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; @@ -47372,7 +48614,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":2429 + /* "dependency_injector/providers.pyx":2482 * try: * factory_name = args[0] * except IndexError: # <<<<<<<<<<<<<< @@ -47382,12 +48624,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError); if (__pyx_t_5) { __Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 2429, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 2482, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":2430 + /* "dependency_injector/providers.pyx":2483 * factory_name = args[0] * except IndexError: * try: # <<<<<<<<<<<<<< @@ -47403,7 +48645,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "dependency_injector/providers.pyx":2431 + /* "dependency_injector/providers.pyx":2484 * except IndexError: * try: * factory_name = kwargs.pop('factory_name') # <<<<<<<<<<<<<< @@ -47412,14 +48654,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr */ if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); - __PYX_ERR(1, 2431, __pyx_L11_error) + __PYX_ERR(1, 2484, __pyx_L11_error) } - __pyx_t_6 = __Pyx_PyDict_Pop(__pyx_v_kwargs, __pyx_n_s_factory_name, ((PyObject *)NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2431, __pyx_L11_error) + __pyx_t_6 = __Pyx_PyDict_Pop(__pyx_v_kwargs, __pyx_n_s_factory_name, ((PyObject *)NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2484, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_factory_name, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":2430 + /* "dependency_injector/providers.pyx":2483 * factory_name = args[0] * except IndexError: * try: # <<<<<<<<<<<<<< @@ -47435,7 +48677,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":2432 + /* "dependency_injector/providers.pyx":2485 * try: * factory_name = kwargs.pop('factory_name') * except KeyError: # <<<<<<<<<<<<<< @@ -47445,28 +48687,28 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_5) { __Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(1, 2432, __pyx_L13_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(1, 2485, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_13); - /* "dependency_injector/providers.pyx":2433 + /* "dependency_injector/providers.pyx":2486 * factory_name = kwargs.pop('factory_name') * except KeyError: * raise TypeError('Factory missing 1 required positional argument: \'factory_name\'') # <<<<<<<<<<<<<< * else: * args = args[1:] */ - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 2433, __pyx_L13_except_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 2486, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_Raise(__pyx_t_14, 0, 0, 0); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __PYX_ERR(1, 2433, __pyx_L13_except_error) + __PYX_ERR(1, 2486, __pyx_L13_except_error) } goto __pyx_L13_except_error; __pyx_L13_except_error:; - /* "dependency_injector/providers.pyx":2430 + /* "dependency_injector/providers.pyx":2483 * factory_name = args[0] * except IndexError: * try: # <<<<<<<<<<<<<< @@ -47488,7 +48730,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":2427 + /* "dependency_injector/providers.pyx":2480 * * cpdef object _provide(self, tuple args, dict kwargs): * try: # <<<<<<<<<<<<<< @@ -47508,7 +48750,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr __pyx_L8_try_end:; } - /* "dependency_injector/providers.pyx":2437 + /* "dependency_injector/providers.pyx":2490 * args = args[1:] * * return self.__get_factory(factory_name)(*args, **kwargs) # <<<<<<<<<<<<<< @@ -47516,25 +48758,25 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr * cdef Factory __get_factory(self, str factory_name): */ __Pyx_XDECREF(__pyx_r); - if (!(likely(PyString_CheckExact(__pyx_v_factory_name))||((__pyx_v_factory_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_factory_name)->tp_name), 0))) __PYX_ERR(1, 2437, __pyx_L1_error) - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx___get_factory(__pyx_v_self, ((PyObject*)__pyx_v_factory_name))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2437, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_factory_name))||((__pyx_v_factory_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_factory_name)->tp_name), 0))) __PYX_ERR(1, 2490, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx___get_factory(__pyx_v_self, ((PyObject*)__pyx_v_factory_name))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 2437, __pyx_L1_error) + __PYX_ERR(1, 2490, __pyx_L1_error) } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 2437, __pyx_L1_error) + __PYX_ERR(1, 2490, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2437, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2426 + /* "dependency_injector/providers.pyx":2479 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -47562,8 +48804,8 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16FactoryAggregate__pr } /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -47595,11 +48837,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11 case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2426, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2479, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2426, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2479, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -47612,15 +48854,15 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11 } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2426, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2479, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2426, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2426, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10_provide(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2479, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2479, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_12_provide(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; @@ -47631,7 +48873,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11 return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10_provide(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_12_provide(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -47640,7 +48882,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_16FactoryAggregate__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2426, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_16FactoryAggregate__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -47657,7 +48899,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10 return __pyx_r; } -/* "dependency_injector/providers.pyx":2439 +/* "dependency_injector/providers.pyx":2492 * return self.__get_factory(factory_name)(*args, **kwargs) * * cdef Factory __get_factory(self, str factory_name): # <<<<<<<<<<<<<< @@ -47682,7 +48924,7 @@ static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19depe int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get_factory", 0); - /* "dependency_injector/providers.pyx":2440 + /* "dependency_injector/providers.pyx":2493 * * cdef Factory __get_factory(self, str factory_name): * if factory_name not in self.__factories: # <<<<<<<<<<<<<< @@ -47691,33 +48933,33 @@ static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19depe */ if (unlikely(__pyx_v_self->__pyx___factories == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 2440, __pyx_L1_error) + __PYX_ERR(1, 2493, __pyx_L1_error) } - __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_factory_name, __pyx_v_self->__pyx___factories, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2440, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_factory_name, __pyx_v_self->__pyx___factories, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2493, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":2441 + /* "dependency_injector/providers.pyx":2494 * cdef Factory __get_factory(self, str factory_name): * if factory_name not in self.__factories: * raise NoSuchProviderError( # <<<<<<<<<<<<<< * '{0} does not contain factory with name {1}'.format( * self, factory_name)) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NoSuchProviderError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2441, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NoSuchProviderError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":2442 + /* "dependency_injector/providers.pyx":2495 * if factory_name not in self.__factories: * raise NoSuchProviderError( * '{0} does not contain factory with name {1}'.format( # <<<<<<<<<<<<<< * self, factory_name)) * return self.__factories[factory_name] */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_does_not_contain_factory_with, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2442, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_does_not_contain_factory_with, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "dependency_injector/providers.pyx":2443 + /* "dependency_injector/providers.pyx":2496 * raise NoSuchProviderError( * '{0} does not contain factory with name {1}'.format( * self, factory_name)) # <<<<<<<<<<<<<< @@ -47739,7 +48981,7 @@ static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19depe #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_v_factory_name}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2442, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -47747,13 +48989,13 @@ static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19depe #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_v_factory_name}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2442, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2442, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -47764,7 +49006,7 @@ static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19depe __Pyx_INCREF(__pyx_v_factory_name); __Pyx_GIVEREF(__pyx_v_factory_name); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_factory_name); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2442, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -47782,14 +49024,14 @@ static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19depe __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 2441, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 2441, __pyx_L1_error) + __PYX_ERR(1, 2494, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2440 + /* "dependency_injector/providers.pyx":2493 * * cdef Factory __get_factory(self, str factory_name): * if factory_name not in self.__factories: # <<<<<<<<<<<<<< @@ -47798,7 +49040,7 @@ static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19depe */ } - /* "dependency_injector/providers.pyx":2444 + /* "dependency_injector/providers.pyx":2497 * '{0} does not contain factory with name {1}'.format( * self, factory_name)) * return self.__factories[factory_name] # <<<<<<<<<<<<<< @@ -47808,16 +49050,16 @@ static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19depe __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(__pyx_v_self->__pyx___factories == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 2444, __pyx_L1_error) + __PYX_ERR(1, 2497, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx___factories, __pyx_v_factory_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2444, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx___factories, __pyx_v_factory_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_3))); __pyx_r = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2439 + /* "dependency_injector/providers.pyx":2492 * return self.__get_factory(factory_name)(*args, **kwargs) * * cdef Factory __get_factory(self, str factory_name): # <<<<<<<<<<<<<< @@ -47848,19 +49090,19 @@ static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19depe */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_12__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_14__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_12__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -48112,19 +49354,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_12 */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_14__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_16__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_14__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -48163,17 +49405,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_14 return __pyx_r; } -/* "dependency_injector/providers.pyx":2452 +/* "dependency_injector/providers.pyx":2505 * provided_type = None * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< - * """Initializer. - * + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< + * """Initialize provider.""" + * self.__instantiator = Factory() */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton___init__[] = "Initializer.\n\n :param provides: Provided type.\n :type provides: type\n "; +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton___init__[] = "Initialize provider."; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__; #endif @@ -48203,6 +49445,7 @@ static int __pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__(P { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -48215,23 +49458,26 @@ static int __pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__(P kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 2452, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 2505, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } } __pyx_v_provides = values[0]; } goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2452, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -48251,256 +49497,136 @@ static int __pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__(P static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { int __pyx_r; __Pyx_RefNannyDeclarations - int __pyx_t_1; + PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - int __pyx_t_11; - PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":2458 - * :type provides: type - * """ - * if (self.__class__.provided_type and # <<<<<<<<<<<<<< - * not issubclass(provides, self.__class__.provided_type)): - * raise Error('{0} can provide only {1} instances'.format( + /* "dependency_injector/providers.pyx":2507 + * def __init__(self, provides=None, *args, **kwargs): + * """Initialize provider.""" + * self.__instantiator = Factory() # <<<<<<<<<<<<<< + * self.set_provides(provides) + * self.set_args(*args) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2458, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2458, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 2458, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_4) { - } else { - __pyx_t_1 = __pyx_t_4; - goto __pyx_L4_bool_binop_done; - } - - /* "dependency_injector/providers.pyx":2459 - * """ - * if (self.__class__.provided_type and - * not issubclass(provides, self.__class__.provided_type)): # <<<<<<<<<<<<<< - * raise Error('{0} can provide only {1} instances'.format( - * self.__class__, self.__class__.provided_type)) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2459, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2459, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 2459, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0); - __pyx_t_1 = __pyx_t_5; - __pyx_L4_bool_binop_done:; - - /* "dependency_injector/providers.pyx":2458 - * :type provides: type - * """ - * if (self.__class__.provided_type and # <<<<<<<<<<<<<< - * not issubclass(provides, self.__class__.provided_type)): - * raise Error('{0} can provide only {1} instances'.format( - */ - if (unlikely(__pyx_t_1)) { - - /* "dependency_injector/providers.pyx":2460 - * if (self.__class__.provided_type and - * not issubclass(provides, self.__class__.provided_type)): - * raise Error('{0} can provide only {1} instances'.format( # <<<<<<<<<<<<<< - * self.__class__, self.__class__.provided_type)) - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_provide_only_1_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - - /* "dependency_injector/providers.pyx":2461 - * not issubclass(provides, self.__class__.provided_type)): - * raise Error('{0} can provide only {1} instances'.format( - * self.__class__, self.__class__.provided_type)) # <<<<<<<<<<<<<< - * - * self.__instantiator = Factory(provides, *args, **kwargs) - */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_9)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_9); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_11 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2460, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2460, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else - #endif - { - __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - if (__pyx_t_9) { - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; - } - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8); - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_10); - __pyx_t_8 = 0; - __pyx_t_10 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - } - } - __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(1, 2460, __pyx_L1_error) - - /* "dependency_injector/providers.pyx":2458 - * :type provides: type - * """ - * if (self.__class__.provided_type and # <<<<<<<<<<<<<< - * not issubclass(provides, self.__class__.provided_type)): - * raise Error('{0} can provide only {1} instances'.format( - */ - } - - /* "dependency_injector/providers.pyx":2463 - * self.__class__, self.__class__.provided_type)) - * - * self.__instantiator = Factory(provides, *args, **kwargs) # <<<<<<<<<<<<<< - * - * super(BaseSingleton, self).__init__() - */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_provides); - __Pyx_GIVEREF(__pyx_v_provides); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_provides); - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___instantiator); __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___instantiator)); - __pyx_v_self->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_v_self->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1); + __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2465 - * self.__instantiator = Factory(provides, *args, **kwargs) + /* "dependency_injector/providers.pyx":2508 + * """Initialize provider.""" + * self.__instantiator = Factory() + * self.set_provides(provides) # <<<<<<<<<<<<<< + * self.set_args(*args) + * self.set_kwargs(**kwargs) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2508, __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_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_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":2509 + * self.__instantiator = Factory() + * self.set_provides(provides) + * self.set_args(*args) # <<<<<<<<<<<<<< + * self.set_kwargs(**kwargs) + * super(BaseSingleton, self).__init__() + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "dependency_injector/providers.pyx":2510 + * self.set_provides(provides) + * self.set_args(*args) + * self.set_kwargs(**kwargs) # <<<<<<<<<<<<<< + * super(BaseSingleton, self).__init__() * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":2511 + * self.set_args(*args) + * self.set_kwargs(**kwargs) * super(BaseSingleton, self).__init__() # <<<<<<<<<<<<<< * * def __str__(self): */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2465, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2465, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2465, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - } - } - __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2465, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2452 + /* "dependency_injector/providers.pyx":2505 * provided_type = None * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< - * """Initializer. - * + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< + * """Initialize provider.""" + * self.__instantiator = Factory() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -48508,7 +49634,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st return __pyx_r; } -/* "dependency_injector/providers.pyx":2467 +/* "dependency_injector/providers.pyx":2513 * super(BaseSingleton, self).__init__() * * def __str__(self): # <<<<<<<<<<<<<< @@ -48543,7 +49669,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":2472 + /* "dependency_injector/providers.pyx":2518 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< @@ -48552,31 +49678,31 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__st */ __Pyx_XDECREF(__pyx_r); - /* "dependency_injector/providers.pyx":2473 + /* "dependency_injector/providers.pyx":2519 * """ * return represent_provider(provider=self, * provides=self.__instantiator.cls) # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2473, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":2472 + /* "dependency_injector/providers.pyx":2518 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< * provides=self.__instantiator.cls) * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2472, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2467 + /* "dependency_injector/providers.pyx":2513 * super(BaseSingleton, self).__init__() * * def __str__(self): # <<<<<<<<<<<<<< @@ -48596,7 +49722,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__st return __pyx_r; } -/* "dependency_injector/providers.pyx":2475 +/* "dependency_injector/providers.pyx":2521 * provides=self.__instantiator.cls) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -48620,7 +49746,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_5__de static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_memo) { PyObject *__pyx_v_copied = NULL; - PyObject *__pyx_v_cls = NULL; + PyObject *__pyx_v_provides = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -48630,22 +49756,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de int __pyx_t_5; int __pyx_t_6; struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7; - PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":2477 + /* "dependency_injector/providers.pyx":2523 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2477, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2477, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -48660,13 +49785,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2477, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2478 + /* "dependency_injector/providers.pyx":2524 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -48677,19 +49802,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":2479 + /* "dependency_injector/providers.pyx":2525 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * cls = self.cls + * provides = self.provides */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_copied); __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2478 + /* "dependency_injector/providers.pyx":2524 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -48698,191 +49823,202 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de */ } - /* "dependency_injector/providers.pyx":2481 + /* "dependency_injector/providers.pyx":2527 * return copied * - * cls = self.cls # <<<<<<<<<<<<<< - * if isinstance(cls, Provider): - * cls = deepcopy(cls, memo) + * provides = self.provides # <<<<<<<<<<<<<< + * if isinstance(provides, Provider): + * provides = deepcopy(provides, memo) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2481, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_v_cls = __pyx_t_1; + __pyx_v_provides = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2482 + /* "dependency_injector/providers.pyx":2528 * - * cls = self.cls - * if isinstance(cls, Provider): # <<<<<<<<<<<<<< - * cls = deepcopy(cls, memo) + * provides = self.provides + * if isinstance(provides, Provider): # <<<<<<<<<<<<<< + * provides = deepcopy(provides, memo) * */ - __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_cls, __pyx_ptype_19dependency_injector_9providers_Provider); + __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_provides, __pyx_ptype_19dependency_injector_9providers_Provider); __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pyx":2483 - * cls = self.cls - * if isinstance(cls, Provider): - * cls = deepcopy(cls, memo) # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":2529 + * provides = self.provides + * if isinstance(provides, Provider): + * provides = deepcopy(provides, memo) # <<<<<<<<<<<<<< * - * copied = self.__class__(cls, + * copied = _memorized_duplicate(self, memo) */ - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2483, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2529, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_cls, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2483, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_provides, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_cls, __pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_provides, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2482 + /* "dependency_injector/providers.pyx":2528 * - * cls = self.cls - * if isinstance(cls, Provider): # <<<<<<<<<<<<<< - * cls = deepcopy(cls, memo) + * provides = self.provides + * if isinstance(provides, Provider): # <<<<<<<<<<<<<< + * provides = deepcopy(provides, memo) * */ } - /* "dependency_injector/providers.pyx":2485 - * cls = deepcopy(cls, memo) + /* "dependency_injector/providers.pyx":2531 + * provides = deepcopy(provides, memo) * - * copied = self.__class__(cls, # <<<<<<<<<<<<<< - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_provides(provides) + * copied.set_args(*deepcopy(self.args, memo)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2485, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2531, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2485, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":2532 + * + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(provides) # <<<<<<<<<<<<<< + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_cls); - __Pyx_GIVEREF(__pyx_v_cls); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls); - - /* "dependency_injector/providers.pyx":2486 - * - * copied = self.__class__(cls, - * *deepcopy(self.args, memo), # <<<<<<<<<<<<<< - * **deepcopy(self.kwargs, memo)) - * copied.set_attributes(**deepcopy(self.attributes, memo)) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2486, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2486, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2486, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "dependency_injector/providers.pyx":2485 - * cls = deepcopy(cls, memo) - * - * copied = self.__class__(cls, # <<<<<<<<<<<<<< - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) - */ - __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2485, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2485, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "dependency_injector/providers.pyx":2487 - * copied = self.__class__(cls, - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< - * copied.set_attributes(**deepcopy(self.attributes, memo)) - * - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2487, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2487, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2487, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__pyx_t_8 == Py_None)) { - PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 2487, __pyx_L1_error) + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } } - if (likely(PyDict_CheckExact(__pyx_t_8))) { - __pyx_t_3 = PyDict_Copy(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2487, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2485, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - - /* "dependency_injector/providers.pyx":2485 - * cls = deepcopy(cls, memo) - * - * copied = self.__class__(cls, # <<<<<<<<<<<<<< - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) - */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2485, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2532, __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; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_8); - __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":2488 - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo)) + /* "dependency_injector/providers.pyx":2533 + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(provides) + * copied.set_args(*deepcopy(self.args, memo)) # <<<<<<<<<<<<<< + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) + * copied.set_attributes(**deepcopy(self.attributes, memo)) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2533, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "dependency_injector/providers.pyx":2534 + * copied.set_provides(provides) + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< + * copied.set_attributes(**deepcopy(self.attributes, memo)) + * + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2534, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_4 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(1, 2534, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_t_4))) { + __pyx_t_2 = PyDict_Copy(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "dependency_injector/providers.pyx":2535 + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) * copied.set_attributes(**deepcopy(self.attributes, memo)) # <<<<<<<<<<<<<< * * self._copy_overridings(copied, memo) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2488, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2488, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2488, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2535, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2488, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 2488, __pyx_L1_error) + __PYX_ERR(1, 2535, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_t_1))) { - __pyx_t_3 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2488, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2488, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2535, __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_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2488, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2490 + /* "dependency_injector/providers.pyx":2537 * copied.set_attributes(**deepcopy(self.attributes, memo)) * * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 2490, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2490, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 2537, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2537, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":2492 + /* "dependency_injector/providers.pyx":2539 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -48894,7 +50030,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2475 + /* "dependency_injector/providers.pyx":2521 * provides=self.__instantiator.cls) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -48908,18 +50044,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_copied); - __Pyx_XDECREF(__pyx_v_cls); + __Pyx_XDECREF(__pyx_v_provides); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":2495 +/* "dependency_injector/providers.pyx":2542 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -48949,7 +50084,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2497 + /* "dependency_injector/providers.pyx":2544 * def cls(self): * """Return provided type.""" * return self.provides # <<<<<<<<<<<<<< @@ -48957,13 +50092,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls_ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2497, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2495 + /* "dependency_injector/providers.pyx":2542 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -48982,11 +50117,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls_ return __pyx_r; } -/* "dependency_injector/providers.pyx":2500 +/* "dependency_injector/providers.pyx":2547 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return provided type.""" + * """Return provider's provides.""" * return self.__instantiator.provides */ @@ -49012,25 +50147,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8prov int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2502 + /* "dependency_injector/providers.pyx":2549 * def provides(self): - * """Return provided type.""" + * """Return provider's provides.""" * return self.__instantiator.provides # <<<<<<<<<<<<<< * - * @property + * def set_provides(self, provides): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2502, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2500 + /* "dependency_injector/providers.pyx":2547 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return provided type.""" + * """Return provider's provides.""" * return self.__instantiator.provides */ @@ -49045,7 +50180,294 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8prov return __pyx_r; } -/* "dependency_injector/providers.pyx":2505 +/* "dependency_injector/providers.pyx":2551 + * return self.__instantiator.provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * if (provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_6set_provides[] = "Set provider's provides."; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_provides(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), ((PyObject *)__pyx_v_provides)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_provides(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_provides", 0); + + /* "dependency_injector/providers.pyx":2553 + * def set_provides(self, provides): + * """Set provider's provides.""" + * if (provides # <<<<<<<<<<<<<< + * and self.__class__.provided_type and + * not issubclass(provides, self.__class__.provided_type)): + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_provides); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2553, __pyx_L1_error) + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + + /* "dependency_injector/providers.pyx":2554 + * """Set provider's provides.""" + * if (provides + * and self.__class__.provided_type and # <<<<<<<<<<<<<< + * not issubclass(provides, self.__class__.provided_type)): + * raise Error( + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2554, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + + /* "dependency_injector/providers.pyx":2555 + * if (provides + * and self.__class__.provided_type and + * not issubclass(provides, self.__class__.provided_type)): # <<<<<<<<<<<<<< + * raise Error( + * '{0} can provide only {1} instances'.format( + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 2555, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = ((!(__pyx_t_2 != 0)) != 0); + __pyx_t_1 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + + /* "dependency_injector/providers.pyx":2553 + * def set_provides(self, provides): + * """Set provider's provides.""" + * if (provides # <<<<<<<<<<<<<< + * and self.__class__.provided_type and + * not issubclass(provides, self.__class__.provided_type)): + */ + if (unlikely(__pyx_t_1)) { + + /* "dependency_injector/providers.pyx":2556 + * and self.__class__.provided_type and + * not issubclass(provides, self.__class__.provided_type)): + * raise Error( # <<<<<<<<<<<<<< + * '{0} can provide only {1} instances'.format( + * _class_qualname(self), + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "dependency_injector/providers.pyx":2557 + * not issubclass(provides, self.__class__.provided_type)): + * raise Error( + * '{0} can provide only {1} instances'.format( # <<<<<<<<<<<<<< + * _class_qualname(self), + * self.__class__.provided_type, + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_provide_only_1_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "dependency_injector/providers.pyx":2558 + * raise Error( + * '{0} can provide only {1} instances'.format( + * _class_qualname(self), # <<<<<<<<<<<<<< + * self.__class__.provided_type, + * ), + */ + __pyx_t_8 = __pyx_f_19dependency_injector_9providers__class_qualname(((PyObject *)__pyx_v_self), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "dependency_injector/providers.pyx":2559 + * '{0} can provide only {1} instances'.format( + * _class_qualname(self), + * self.__class__.provided_type, # <<<<<<<<<<<<<< + * ), + * ) + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + __pyx_t_11 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_11 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2557, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2557, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else + #endif + { + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_10); + __pyx_t_8 = 0; + __pyx_t_10 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 2556, __pyx_L1_error) + + /* "dependency_injector/providers.pyx":2553 + * def set_provides(self, provides): + * """Set provider's provides.""" + * if (provides # <<<<<<<<<<<<<< + * and self.__class__.provided_type and + * not issubclass(provides, self.__class__.provided_type)): + */ + } + + /* "dependency_injector/providers.pyx":2562 + * ), + * ) + * self.__instantiator.set_provides(provides) # <<<<<<<<<<<<<< + * return self + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "dependency_injector/providers.pyx":2563 + * ) + * self.__instantiator.set_provides(provides) + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":2551 + * return self.__instantiator.provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * if (provides + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.set_provides", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":2566 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -49075,7 +50497,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2507 + /* "dependency_injector/providers.pyx":2568 * def args(self): * """Return positional argument injections.""" * return self.__instantiator.args # <<<<<<<<<<<<<< @@ -49083,13 +50505,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args * def add_args(self, *args): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2507, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2505 + /* "dependency_injector/providers.pyx":2566 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -49108,7 +50530,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args return __pyx_r; } -/* "dependency_injector/providers.pyx":2509 +/* "dependency_injector/providers.pyx":2570 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -49117,9 +50539,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_6add_args[] = "Add __init__ positional argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_8add_args[] = "Add __init__ positional argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -49127,7 +50549,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7add_ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_args", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_args(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_args); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_8add_args(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -49135,7 +50557,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7add_ return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8add_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -49145,21 +50567,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_args", 0); - /* "dependency_injector/providers.pyx":2514 + /* "dependency_injector/providers.pyx":2575 * :return: Reference ``self`` * """ * self.__instantiator.add_args(*args) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2514, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2514, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2515 + /* "dependency_injector/providers.pyx":2576 * """ * self.__instantiator.add_args(*args) * return self # <<<<<<<<<<<<<< @@ -49171,7 +50593,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2509 + /* "dependency_injector/providers.pyx":2570 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -49191,7 +50613,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_ return __pyx_r; } -/* "dependency_injector/providers.pyx":2517 +/* "dependency_injector/providers.pyx":2578 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -49200,9 +50622,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_8set_args[] = "Set __init__ positional argument injections.\n\n Existing __init__ positional argument injections are dropped.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_11set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_10set_args[] = "Set __init__ positional argument injections.\n\n Existing __init__ positional argument injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_11set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -49210,7 +50632,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9set_ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_args", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_args(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_args); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_10set_args(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -49218,7 +50640,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9set_ return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10set_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -49228,21 +50650,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_args", 0); - /* "dependency_injector/providers.pyx":2524 + /* "dependency_injector/providers.pyx":2585 * :return: Reference ``self`` * """ * self.__instantiator.set_args(*args) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2524, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2524, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2525 + /* "dependency_injector/providers.pyx":2586 * """ * self.__instantiator.set_args(*args) * return self # <<<<<<<<<<<<<< @@ -49254,7 +50676,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2517 + /* "dependency_injector/providers.pyx":2578 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -49274,7 +50696,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_ return __pyx_r; } -/* "dependency_injector/providers.pyx":2527 +/* "dependency_injector/providers.pyx":2588 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -49283,20 +50705,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_10clear_args[] = "Drop __init__ positional argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_12clear_args[] = "Drop __init__ positional argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_args (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_10clear_args(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_12clear_args(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10clear_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12clear_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -49307,14 +50729,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_args", 0); - /* "dependency_injector/providers.pyx":2532 + /* "dependency_injector/providers.pyx":2593 * :return: Reference ``self`` * """ * self.__instantiator.clear_args() # <<<<<<<<<<<<<< * return self * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2532, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -49328,12 +50750,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2532, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2533 + /* "dependency_injector/providers.pyx":2594 * """ * self.__instantiator.clear_args() * return self # <<<<<<<<<<<<<< @@ -49345,7 +50767,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2527 + /* "dependency_injector/providers.pyx":2588 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -49366,7 +50788,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle return __pyx_r; } -/* "dependency_injector/providers.pyx":2536 +/* "dependency_injector/providers.pyx":2597 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -49396,7 +50818,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwar int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2538 + /* "dependency_injector/providers.pyx":2599 * def kwargs(self): * """Return keyword argument injections.""" * return self.__instantiator.kwargs # <<<<<<<<<<<<<< @@ -49404,13 +50826,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwar * def add_kwargs(self, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2538, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2536 + /* "dependency_injector/providers.pyx":2597 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -49429,7 +50851,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwar return __pyx_r; } -/* "dependency_injector/providers.pyx":2540 +/* "dependency_injector/providers.pyx":2601 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -49438,9 +50860,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwar */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_12add_kwargs[] = "Add __init__ keyword argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_14add_kwargs[] = "Add __init__ keyword argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -49454,7 +50876,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13add } else { __pyx_v_kwargs = NULL; } - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_14add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -49462,7 +50884,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13add return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14add_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -49472,21 +50894,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_kwargs", 0); - /* "dependency_injector/providers.pyx":2545 + /* "dependency_injector/providers.pyx":2606 * :return: Reference ``self`` * """ * self.__instantiator.add_kwargs(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2545, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2545, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2546 + /* "dependency_injector/providers.pyx":2607 * """ * self.__instantiator.add_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -49498,7 +50920,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2540 + /* "dependency_injector/providers.pyx":2601 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -49518,7 +50940,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add return __pyx_r; } -/* "dependency_injector/providers.pyx":2548 +/* "dependency_injector/providers.pyx":2609 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -49527,9 +50949,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_14set_kwargs[] = "Set __init__ keyword argument injections.\n\n Existing __init__ keyword argument injections are dropped.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_17set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_16set_kwargs[] = "Set __init__ keyword argument injections.\n\n Existing __init__ keyword argument injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_17set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -49543,7 +50965,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15set } else { __pyx_v_kwargs = NULL; } - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_16set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -49551,7 +50973,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15set return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16set_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -49561,21 +50983,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_kwargs", 0); - /* "dependency_injector/providers.pyx":2555 + /* "dependency_injector/providers.pyx":2616 * :return: Reference ``self`` * """ * self.__instantiator.set_kwargs(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2555, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2555, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2556 + /* "dependency_injector/providers.pyx":2617 * """ * self.__instantiator.set_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -49587,7 +51009,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2548 + /* "dependency_injector/providers.pyx":2609 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -49607,7 +51029,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set return __pyx_r; } -/* "dependency_injector/providers.pyx":2558 +/* "dependency_injector/providers.pyx":2619 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -49616,20 +51038,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_16clear_kwargs[] = "Drop __init__ keyword argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_18clear_kwargs[] = "Drop __init__ keyword argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_kwargs (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_16clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_18clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -49640,14 +51062,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_kwargs", 0); - /* "dependency_injector/providers.pyx":2563 + /* "dependency_injector/providers.pyx":2624 * :return: Reference ``self`` * """ * self.__instantiator.clear_kwargs() # <<<<<<<<<<<<<< * return self * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2563, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -49661,12 +51083,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2563, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2564 + /* "dependency_injector/providers.pyx":2625 * """ * self.__instantiator.clear_kwargs() * return self # <<<<<<<<<<<<<< @@ -49678,7 +51100,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2558 + /* "dependency_injector/providers.pyx":2619 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -49699,7 +51121,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle return __pyx_r; } -/* "dependency_injector/providers.pyx":2567 +/* "dependency_injector/providers.pyx":2628 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -49729,7 +51151,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10att int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":2569 + /* "dependency_injector/providers.pyx":2630 * def attributes(self): * """Return attribute injections.""" * return self.__instantiator.attributes # <<<<<<<<<<<<<< @@ -49737,13 +51159,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10att * def add_attributes(self, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2569, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2567 + /* "dependency_injector/providers.pyx":2628 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -49762,7 +51184,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10att return __pyx_r; } -/* "dependency_injector/providers.pyx":2571 +/* "dependency_injector/providers.pyx":2632 * return self.__instantiator.attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -49771,9 +51193,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10att */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_18add_attributes[] = "Add attribute injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_20add_attributes[] = "Add attribute injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -49787,7 +51209,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19add } else { __pyx_v_kwargs = NULL; } - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add_attributes(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_20add_attributes(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -49795,7 +51217,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19add return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20add_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -49805,21 +51227,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_attributes", 0); - /* "dependency_injector/providers.pyx":2576 + /* "dependency_injector/providers.pyx":2637 * :return: Reference ``self`` * """ * self.__instantiator.add_attributes(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2576, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2576, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2577 + /* "dependency_injector/providers.pyx":2638 * """ * self.__instantiator.add_attributes(**kwargs) * return self # <<<<<<<<<<<<<< @@ -49831,7 +51253,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2571 + /* "dependency_injector/providers.pyx":2632 * return self.__instantiator.attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -49851,7 +51273,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add return __pyx_r; } -/* "dependency_injector/providers.pyx":2579 +/* "dependency_injector/providers.pyx":2640 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -49860,9 +51282,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_20set_attributes[] = "Set attribute injections.\n\n Existing attribute injections are dropped.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_23set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_22set_attributes[] = "Set attribute injections.\n\n Existing attribute injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_23set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -49876,7 +51298,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21set } else { __pyx_v_kwargs = NULL; } - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set_attributes(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_22set_attributes(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -49884,7 +51306,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21set return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22set_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -49894,21 +51316,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_attributes", 0); - /* "dependency_injector/providers.pyx":2586 + /* "dependency_injector/providers.pyx":2647 * :return: Reference ``self`` * """ * self.__instantiator.set_attributes(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2586, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2586, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2587 + /* "dependency_injector/providers.pyx":2648 * """ * self.__instantiator.set_attributes(**kwargs) * return self # <<<<<<<<<<<<<< @@ -49920,7 +51342,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2579 + /* "dependency_injector/providers.pyx":2640 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -49940,7 +51362,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set return __pyx_r; } -/* "dependency_injector/providers.pyx":2589 +/* "dependency_injector/providers.pyx":2650 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -49949,20 +51371,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_23clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_22clear_attributes[] = "Drop attribute injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_23clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_25clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_24clear_attributes[] = "Drop attribute injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_25clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_attributes (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_22clear_attributes(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_24clear_attributes(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22clear_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24clear_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -49973,14 +51395,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_attributes", 0); - /* "dependency_injector/providers.pyx":2594 + /* "dependency_injector/providers.pyx":2655 * :return: Reference ``self`` * """ * self.__instantiator.clear_attributes() # <<<<<<<<<<<<<< * return self * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2594, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -49994,12 +51416,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2594, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2595 + /* "dependency_injector/providers.pyx":2656 * """ * self.__instantiator.clear_attributes() * return self # <<<<<<<<<<<<<< @@ -50011,7 +51433,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":2589 + /* "dependency_injector/providers.pyx":2650 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -50032,7 +51454,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle return __pyx_r; } -/* "dependency_injector/providers.pyx":2597 +/* "dependency_injector/providers.pyx":2658 * return self * * def reset(self): # <<<<<<<<<<<<<< @@ -50041,20 +51463,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_25reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_24reset[] = "Reset cached instance, if any.\n\n :rtype: None\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_25reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_27reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_26reset[] = "Reset cached instance, if any.\n\n :rtype: None\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_27reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_24reset(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_26reset(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24reset(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26reset(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -50063,20 +51485,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24res int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":2602 + /* "dependency_injector/providers.pyx":2663 * :rtype: None * """ * raise NotImplementedError() # <<<<<<<<<<<<<< * * def full_reset(self): */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2602, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 2602, __pyx_L1_error) + __PYX_ERR(1, 2663, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2597 + /* "dependency_injector/providers.pyx":2658 * return self * * def reset(self): # <<<<<<<<<<<<<< @@ -50094,7 +51516,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24res return __pyx_r; } -/* "dependency_injector/providers.pyx":2604 +/* "dependency_injector/providers.pyx":2665 * raise NotImplementedError() * * def full_reset(self): # <<<<<<<<<<<<<< @@ -50103,20 +51525,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24res */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_27full_reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_26full_reset[] = "Reset cached instance in current and all underlying singletons, if any.\n\n :rtype: :py:class:`SingletonFullResetContext`\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_27full_reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29full_reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_28full_reset[] = "Reset cached instance in current and all underlying singletons, if any.\n\n :rtype: :py:class:`SingletonFullResetContext`\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29full_reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("full_reset (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_26full_reset(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_28full_reset(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26full_reset(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28full_reset(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { PyObject *__pyx_v_provider = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -50131,14 +51553,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26ful int __pyx_clineno = 0; __Pyx_RefNannySetupContext("full_reset", 0); - /* "dependency_injector/providers.pyx":2609 + /* "dependency_injector/providers.pyx":2670 * :rtype: :py:class:`SingletonFullResetContext` * """ * self.reset() # <<<<<<<<<<<<<< * for provider in self.traverse(types=[BaseSingleton]): * provider.reset() */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2609, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -50152,30 +51574,30 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26ful } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2609, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2610 + /* "dependency_injector/providers.pyx":2671 * """ * self.reset() * for provider in self.traverse(types=[BaseSingleton]): # <<<<<<<<<<<<<< * provider.reset() * return SingletonFullResetContext(self) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2610, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2610, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2610, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(1, 2610, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(1, 2671, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2610, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -50183,9 +51605,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26ful __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2610, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2610, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2671, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -50193,17 +51615,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26ful if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 2610, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 2671, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2610, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 2610, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 2671, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2610, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -50213,7 +51635,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26ful PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 2610, __pyx_L1_error) + else __PYX_ERR(1, 2671, __pyx_L1_error) } break; } @@ -50222,14 +51644,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26ful __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":2611 + /* "dependency_injector/providers.pyx":2672 * self.reset() * for provider in self.traverse(types=[BaseSingleton]): * provider.reset() # <<<<<<<<<<<<<< * return SingletonFullResetContext(self) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2611, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -50243,12 +51665,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26ful } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2611, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":2610 + /* "dependency_injector/providers.pyx":2671 * """ * self.reset() * for provider in self.traverse(types=[BaseSingleton]): # <<<<<<<<<<<<<< @@ -50258,7 +51680,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26ful } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2612 + /* "dependency_injector/providers.pyx":2673 * for provider in self.traverse(types=[BaseSingleton]): * provider.reset() * return SingletonFullResetContext(self) # <<<<<<<<<<<<<< @@ -50266,13 +51688,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26ful * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonFullResetContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2612, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonFullResetContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2604 + /* "dependency_injector/providers.pyx":2665 * raise NotImplementedError() * * def full_reset(self): # <<<<<<<<<<<<<< @@ -50296,7 +51718,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26ful } static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7related_2generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":2615 +/* "dependency_injector/providers.pyx":2676 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -50329,7 +51751,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_7rela if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_12___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 2615, __pyx_L1_error) + __PYX_ERR(1, 2676, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -50337,7 +51759,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_7rela __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_13BaseSingleton_7related_2generator10, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_BaseSingleton___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 2615, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_13BaseSingleton_7related_2generator10, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_BaseSingleton___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 2676, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -50378,25 +51800,25 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2615, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2676, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2617 + /* "dependency_injector/providers.pyx":2678 * def related(self): * """Return related providers generator.""" * yield from filter(is_provider, [self.__instantiator.provides]) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2617, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2617, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2617, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2617, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -50404,7 +51826,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2617, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_3); @@ -50418,27 +51840,27 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2617, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2678, __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(1, 2617, __pyx_L1_error) + else __PYX_ERR(1, 2678, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":2618 + /* "dependency_injector/providers.pyx":2679 * """Return related providers generator.""" * yield from filter(is_provider, [self.__instantiator.provides]) * yield from filter(is_provider, self.args) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.kwargs.values()) * yield from filter(is_provider, self.attributes.values()) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2618, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2618, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2618, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -50446,7 +51868,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2618, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); @@ -50460,27 +51882,27 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2618, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2679, __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(1, 2618, __pyx_L1_error) + else __PYX_ERR(1, 2679, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":2619 + /* "dependency_injector/providers.pyx":2680 * yield from filter(is_provider, [self.__instantiator.provides]) * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.attributes.values()) * yield from super().related */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2619, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2619, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2619, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -50495,10 +51917,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2619, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2619, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -50506,7 +51928,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2619, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -50520,27 +51942,27 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L6_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2619, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2680, __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(1, 2619, __pyx_L1_error) + else __PYX_ERR(1, 2680, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":2620 + /* "dependency_injector/providers.pyx":2681 * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) * yield from filter(is_provider, self.attributes.values()) # <<<<<<<<<<<<<< * yield from super().related * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2620, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2620, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2620, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -50555,10 +51977,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela } __pyx_t_4 = (__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_4)) __PYX_ERR(1, 2620, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2620, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -50566,7 +51988,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2620, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_4); @@ -50580,23 +52002,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela __pyx_generator->resume_label = 4; return __pyx_r; __pyx_L7_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2620, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2681, __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(1, 2620, __pyx_L1_error) + else __PYX_ERR(1, 2681, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":2621 + /* "dependency_injector/providers.pyx":2682 * yield from filter(is_provider, self.kwargs.values()) * yield from filter(is_provider, self.attributes.values()) * yield from super().related # <<<<<<<<<<<<<< * * def _async_init_instance(self, future_result, result): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2621, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); @@ -50604,10 +52026,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2621, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2621, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_4); @@ -50621,17 +52043,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela __pyx_generator->resume_label = 5; return __pyx_r; __pyx_L8_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2621, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2682, __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(1, 2621, __pyx_L1_error) + else __PYX_ERR(1, 2682, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":2615 + /* "dependency_injector/providers.pyx":2676 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -50659,7 +52081,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela return __pyx_r; } -/* "dependency_injector/providers.pyx":2623 +/* "dependency_injector/providers.pyx":2684 * yield from super().related * * def _async_init_instance(self, future_result, result): # <<<<<<<<<<<<<< @@ -50668,8 +52090,8 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_13BaseSingleton_7rela */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29_async_init_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29_async_init_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_31_async_init_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_31_async_init_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future_result = 0; PyObject *__pyx_v_result = 0; int __pyx_lineno = 0; @@ -50701,11 +52123,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29_as case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_init_instance", 1, 2, 2, 1); __PYX_ERR(1, 2623, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_init_instance", 1, 2, 2, 1); __PYX_ERR(1, 2684, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_init_instance") < 0)) __PYX_ERR(1, 2623, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_init_instance") < 0)) __PYX_ERR(1, 2684, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -50718,20 +52140,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29_as } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_async_init_instance", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2623, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_init_instance", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2684, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.BaseSingleton._async_init_instance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_async_init_instance(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_future_result, __pyx_v_result); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_30_async_init_instance(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_future_result, __pyx_v_result); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_async_init_instance(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_result) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_30_async_init_instance(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_result) { PyObject *__pyx_v_instance = NULL; PyObject *__pyx_v_exception = NULL; PyObject *__pyx_r = NULL; @@ -50751,7 +52173,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_async_init_instance", 0); - /* "dependency_injector/providers.pyx":2624 + /* "dependency_injector/providers.pyx":2685 * * def _async_init_instance(self, future_result, result): * try: # <<<<<<<<<<<<<< @@ -50767,14 +52189,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":2625 + /* "dependency_injector/providers.pyx":2686 * def _async_init_instance(self, future_result, result): * try: * instance = result.result() # <<<<<<<<<<<<<< * except Exception as exception: * self.__storage = None */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2625, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2686, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -50788,13 +52210,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as } __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, 2625, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2686, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_instance = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":2624 + /* "dependency_injector/providers.pyx":2685 * * def _async_init_instance(self, future_result, result): * try: # <<<<<<<<<<<<<< @@ -50803,7 +52225,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as */ } - /* "dependency_injector/providers.pyx":2630 + /* "dependency_injector/providers.pyx":2691 * future_result.set_exception(exception) * else: * self.__storage = instance # <<<<<<<<<<<<<< @@ -50817,14 +52239,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as __Pyx_DECREF(__pyx_v_self->__pyx___storage); __pyx_v_self->__pyx___storage = __pyx_v_instance; - /* "dependency_injector/providers.pyx":2631 + /* "dependency_injector/providers.pyx":2692 * else: * self.__storage = instance * future_result.set_result(instance) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2631, __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, 2692, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -50838,7 +52260,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2631, __pyx_L5_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2692, __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; @@ -50852,7 +52274,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":2626 + /* "dependency_injector/providers.pyx":2687 * try: * instance = result.result() * except Exception as exception: # <<<<<<<<<<<<<< @@ -50862,14 +52284,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.BaseSingleton._async_init_instance", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 2626, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 2687, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_exception = __pyx_t_5; - /* "dependency_injector/providers.pyx":2627 + /* "dependency_injector/providers.pyx":2688 * instance = result.result() * except Exception as exception: * self.__storage = None # <<<<<<<<<<<<<< @@ -50882,14 +52304,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as __Pyx_DECREF(__pyx_v_self->__pyx___storage); __pyx_v_self->__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":2628 + /* "dependency_injector/providers.pyx":2689 * except Exception as exception: * self.__storage = None * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * self.__storage = instance */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2628, __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, 2689, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -50903,7 +52325,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as } __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, 2628, __pyx_L5_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2689, __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; @@ -50915,7 +52337,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":2624 + /* "dependency_injector/providers.pyx":2685 * * def _async_init_instance(self, future_result, result): * try: # <<<<<<<<<<<<<< @@ -50935,7 +52357,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as __pyx_L8_try_end:; } - /* "dependency_injector/providers.pyx":2623 + /* "dependency_injector/providers.pyx":2684 * yield from super().related * * def _async_init_instance(self, future_result, result): # <<<<<<<<<<<<<< @@ -50970,19 +52392,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28_as */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_31__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_31__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_30__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_32__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_30__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_32__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -51244,19 +52666,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_30__r */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_33__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_33__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_32__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_34__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_32__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_34__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -51295,10 +52717,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_32__s return __pyx_r; } -/* "dependency_injector/providers.pyx":2666 +/* "dependency_injector/providers.pyx":2727 * """ * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< * """Initializer. * */ @@ -51335,6 +52757,7 @@ static int __pyx_pw_19dependency_injector_9providers_9Singleton_1__init__(PyObje { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -51347,23 +52770,26 @@ static int __pyx_pw_19dependency_injector_9providers_9Singleton_1__init__(PyObje kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 2666, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 2727, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } } __pyx_v_provides = values[0]; } goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2666, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -51391,7 +52817,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":2672 + /* "dependency_injector/providers.pyx":2733 * :type provides: type * """ * self.__storage = None # <<<<<<<<<<<<<< @@ -51404,14 +52830,14 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___storage); __pyx_v_self->__pyx_base.__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":2673 + /* "dependency_injector/providers.pyx":2734 * """ * self.__storage = None * super(Singleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * def reset(self): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2673, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Singleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Singleton)); @@ -51419,30 +52845,30 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2673, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2673, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2673, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_provides); __Pyx_GIVEREF(__pyx_v_provides); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_provides); - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2673, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2673, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2666 + /* "dependency_injector/providers.pyx":2727 * """ * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< * """Initializer. * */ @@ -51461,7 +52887,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct return __pyx_r; } -/* "dependency_injector/providers.pyx":2675 +/* "dependency_injector/providers.pyx":2736 * super(Singleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -51496,7 +52922,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":2680 + /* "dependency_injector/providers.pyx":2741 * :rtype: None * """ * if __is_future_or_coroutine(self.__storage): # <<<<<<<<<<<<<< @@ -51509,16 +52935,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":2681 + /* "dependency_injector/providers.pyx":2742 * """ * if __is_future_or_coroutine(self.__storage): * asyncio.ensure_future(self.__storage).cancel() # <<<<<<<<<<<<<< * self.__storage = None * return SingletonResetContext(self) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2681, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2681, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -51533,10 +52959,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_self->__pyx_base.__pyx___storage) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->__pyx_base.__pyx___storage); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2681, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cancel); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2681, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cancel); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -51551,12 +52977,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2681, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2680 + /* "dependency_injector/providers.pyx":2741 * :rtype: None * """ * if __is_future_or_coroutine(self.__storage): # <<<<<<<<<<<<<< @@ -51565,7 +52991,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str */ } - /* "dependency_injector/providers.pyx":2682 + /* "dependency_injector/providers.pyx":2743 * if __is_future_or_coroutine(self.__storage): * asyncio.ensure_future(self.__storage).cancel() * self.__storage = None # <<<<<<<<<<<<<< @@ -51578,7 +53004,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___storage); __pyx_v_self->__pyx_base.__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":2683 + /* "dependency_injector/providers.pyx":2744 * asyncio.ensure_future(self.__storage).cancel() * self.__storage = None * return SingletonResetContext(self) # <<<<<<<<<<<<<< @@ -51586,13 +53012,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str * cpdef object _provide(self, tuple args, dict kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonResetContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2683, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonResetContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2675 + /* "dependency_injector/providers.pyx":2736 * super(Singleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -51614,7 +53040,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str return __pyx_r; } -/* "dependency_injector/providers.pyx":2685 +/* "dependency_injector/providers.pyx":2746 * return SingletonResetContext(self) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -51651,7 +53077,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2685, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -51671,7 +53097,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2685, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2746, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -51679,13 +53105,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2685, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2746, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2685, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -51696,7 +53122,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2685, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -51719,7 +53145,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st #endif } - /* "dependency_injector/providers.pyx":2687 + /* "dependency_injector/providers.pyx":2748 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * if self.__storage is None: # <<<<<<<<<<<<<< @@ -51730,7 +53156,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "dependency_injector/providers.pyx":2688 + /* "dependency_injector/providers.pyx":2749 * """Return single instance.""" * if self.__storage is None: * instance = __factory_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< @@ -51739,13 +53165,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2688, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_instance = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2690 + /* "dependency_injector/providers.pyx":2751 * instance = __factory_call(self.__instantiator, args, kwargs) * * if __is_future_or_coroutine(instance): # <<<<<<<<<<<<<< @@ -51755,16 +53181,16 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_t_8 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_instance) != 0); if (__pyx_t_8) { - /* "dependency_injector/providers.pyx":2691 + /* "dependency_injector/providers.pyx":2752 * * if __is_future_or_coroutine(instance): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * instance = asyncio.ensure_future(instance) * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2691, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2691, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -51779,22 +53205,22 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2691, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_future_result = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2692 + /* "dependency_injector/providers.pyx":2753 * if __is_future_or_coroutine(instance): * future_result = asyncio.Future() * instance = asyncio.ensure_future(instance) # <<<<<<<<<<<<<< * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) * self.__storage = future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2692, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2692, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -51809,27 +53235,27 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2692, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_instance, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2693 + /* "dependency_injector/providers.pyx":2754 * future_result = asyncio.Future() * instance = asyncio.ensure_future(instance) * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) # <<<<<<<<<<<<<< * self.__storage = future_result * return future_result */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2693, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2693, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2693, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_init_instance); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2693, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_init_instance); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = NULL; __pyx_t_5 = 0; @@ -51846,7 +53272,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_v_future_result}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2693, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2754, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -51855,14 +53281,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_v_future_result}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2693, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2754, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2693, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2754, __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; @@ -51873,7 +53299,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __Pyx_GIVEREF(__pyx_v_future_result); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_5, __pyx_v_future_result); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2693, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -51891,12 +53317,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2693, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2694 + /* "dependency_injector/providers.pyx":2755 * instance = asyncio.ensure_future(instance) * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) * self.__storage = future_result # <<<<<<<<<<<<<< @@ -51909,7 +53335,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___storage); __pyx_v_self->__pyx_base.__pyx___storage = __pyx_v_future_result; - /* "dependency_injector/providers.pyx":2695 + /* "dependency_injector/providers.pyx":2756 * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) * self.__storage = future_result * return future_result # <<<<<<<<<<<<<< @@ -51921,7 +53347,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2690 + /* "dependency_injector/providers.pyx":2751 * instance = __factory_call(self.__instantiator, args, kwargs) * * if __is_future_or_coroutine(instance): # <<<<<<<<<<<<<< @@ -51930,7 +53356,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st */ } - /* "dependency_injector/providers.pyx":2697 + /* "dependency_injector/providers.pyx":2758 * return future_result * * self.__storage = instance # <<<<<<<<<<<<<< @@ -51943,7 +53369,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___storage); __pyx_v_self->__pyx_base.__pyx___storage = __pyx_v_instance; - /* "dependency_injector/providers.pyx":2687 + /* "dependency_injector/providers.pyx":2748 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * if self.__storage is None: # <<<<<<<<<<<<<< @@ -51952,7 +53378,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st */ } - /* "dependency_injector/providers.pyx":2699 + /* "dependency_injector/providers.pyx":2760 * self.__storage = instance * * return self.__storage # <<<<<<<<<<<<<< @@ -51964,7 +53390,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_r = __pyx_v_self->__pyx_base.__pyx___storage; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2685 + /* "dependency_injector/providers.pyx":2746 * return SingletonResetContext(self) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -52026,11 +53452,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide( case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2685, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2746, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2685, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2746, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -52043,14 +53469,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2685, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2746, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Singleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2685, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2685, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2746, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2746, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_9Singleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_Singleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -52071,7 +53497,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_4_provide( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9Singleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2685, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9Singleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -52752,10 +54178,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedSingleton_ return __pyx_r; } -/* "dependency_injector/providers.pyx":2733 +/* "dependency_injector/providers.pyx":2794 * """ * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< * """Initializer. * */ @@ -52792,6 +54218,7 @@ static int __pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_1__in { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -52804,23 +54231,26 @@ static int __pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_1__in kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 2733, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 2794, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } } __pyx_v_provides = values[0]; } goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2733, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -52848,7 +54278,7 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":2739 + /* "dependency_injector/providers.pyx":2800 * :type provides: type * """ * self.__storage = None # <<<<<<<<<<<<<< @@ -52861,16 +54291,16 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___storage); __pyx_v_self->__pyx_base.__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":2740 + /* "dependency_injector/providers.pyx":2801 * """ * self.__storage = None * self.__storage_lock = self.__class__.storage_lock # <<<<<<<<<<<<<< * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2740, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_storage_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2740, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_storage_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -52879,14 +54309,14 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini __pyx_v_self->__pyx___storage_lock = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2741 + /* "dependency_injector/providers.pyx":2802 * self.__storage = None * self.__storage_lock = self.__class__.storage_lock * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * def reset(self): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2741, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton)); @@ -52894,30 +54324,30 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2741, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2741, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2741, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_provides); __Pyx_GIVEREF(__pyx_v_provides); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_provides); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2741, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2741, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2733 + /* "dependency_injector/providers.pyx":2794 * """ * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< * """Initializer. * */ @@ -52936,7 +54366,7 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini return __pyx_r; } -/* "dependency_injector/providers.pyx":2743 +/* "dependency_injector/providers.pyx":2804 * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -52977,7 +54407,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":2748 + /* "dependency_injector/providers.pyx":2809 * :rtype: None * """ * with self.__storage_lock: # <<<<<<<<<<<<<< @@ -52985,9 +54415,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton * asyncio.ensure_future(self.__storage).cancel() */ /*with:*/ { - __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2748, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2748, __pyx_L3_error) + __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2809, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -53001,7 +54431,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton } __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, 2748, __pyx_L3_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2809, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -53015,7 +54445,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "dependency_injector/providers.pyx":2749 + /* "dependency_injector/providers.pyx":2810 * """ * with self.__storage_lock: * if __is_future_or_coroutine(self.__storage): # <<<<<<<<<<<<<< @@ -53028,16 +54458,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_8) { - /* "dependency_injector/providers.pyx":2750 + /* "dependency_injector/providers.pyx":2811 * with self.__storage_lock: * if __is_future_or_coroutine(self.__storage): * asyncio.ensure_future(self.__storage).cancel() # <<<<<<<<<<<<<< * self.__storage = None * return SingletonResetContext(self) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2750, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2811, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2750, __pyx_L7_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2811, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -53052,10 +54482,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_v_self->__pyx_base.__pyx___storage) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_self->__pyx_base.__pyx___storage); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2750, __pyx_L7_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2811, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cancel); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2750, __pyx_L7_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cancel); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2811, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -53070,12 +54500,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2750, __pyx_L7_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2811, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2749 + /* "dependency_injector/providers.pyx":2810 * """ * with self.__storage_lock: * if __is_future_or_coroutine(self.__storage): # <<<<<<<<<<<<<< @@ -53084,7 +54514,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton */ } - /* "dependency_injector/providers.pyx":2751 + /* "dependency_injector/providers.pyx":2812 * if __is_future_or_coroutine(self.__storage): * asyncio.ensure_future(self.__storage).cancel() * self.__storage = None # <<<<<<<<<<<<<< @@ -53097,7 +54527,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___storage); __pyx_v_self->__pyx_base.__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":2748 + /* "dependency_injector/providers.pyx":2809 * :rtype: None * """ * with self.__storage_lock: # <<<<<<<<<<<<<< @@ -53116,20 +54546,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /*except:*/ { __Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(1, 2748, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(1, 2809, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2748, __pyx_L9_except_error) + __pyx_t_4 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2809, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2748, __pyx_L9_except_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2809, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__pyx_t_8 < 0) __PYX_ERR(1, 2748, __pyx_L9_except_error) + if (__pyx_t_8 < 0) __PYX_ERR(1, 2809, __pyx_L9_except_error) __pyx_t_11 = ((!(__pyx_t_8 != 0)) != 0); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_2); @@ -53137,7 +54567,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_9, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_9 = 0; __pyx_t_3 = 0; - __PYX_ERR(1, 2748, __pyx_L9_except_error) + __PYX_ERR(1, 2809, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -53163,7 +54593,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton if (__pyx_t_1) { __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2748, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -53178,7 +54608,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton __pyx_L17:; } - /* "dependency_injector/providers.pyx":2752 + /* "dependency_injector/providers.pyx":2813 * asyncio.ensure_future(self.__storage).cancel() * self.__storage = None * return SingletonResetContext(self) # <<<<<<<<<<<<<< @@ -53186,13 +54616,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton * cpdef object _provide(self, tuple args, dict kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonResetContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2752, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonResetContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2743 + /* "dependency_injector/providers.pyx":2804 * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -53214,7 +54644,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton return __pyx_r; } -/* "dependency_injector/providers.pyx":2754 +/* "dependency_injector/providers.pyx":2815 * return SingletonResetContext(self) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -53256,7 +54686,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2754, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -53276,7 +54706,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2754, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2815, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -53284,13 +54714,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2754, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2815, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2754, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -53301,7 +54731,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2754, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -53324,7 +54754,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ #endif } - /* "dependency_injector/providers.pyx":2756 + /* "dependency_injector/providers.pyx":2817 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * instance = self.__storage # <<<<<<<<<<<<<< @@ -53336,7 +54766,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_v_instance = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2758 + /* "dependency_injector/providers.pyx":2819 * instance = self.__storage * * if instance is None: # <<<<<<<<<<<<<< @@ -53347,7 +54777,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "dependency_injector/providers.pyx":2759 + /* "dependency_injector/providers.pyx":2820 * * if instance is None: * with self.__storage_lock: # <<<<<<<<<<<<<< @@ -53355,9 +54785,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ * instance = __factory_call(self.__instantiator, args, kwargs) */ /*with:*/ { - __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2759, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2759, __pyx_L4_error) + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2820, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -53371,7 +54801,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2759, __pyx_L4_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2820, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -53385,7 +54815,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "dependency_injector/providers.pyx":2760 + /* "dependency_injector/providers.pyx":2821 * if instance is None: * with self.__storage_lock: * if self.__storage is None: # <<<<<<<<<<<<<< @@ -53396,7 +54826,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":2761 + /* "dependency_injector/providers.pyx":2822 * with self.__storage_lock: * if self.__storage is None: * instance = __factory_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< @@ -53405,13 +54835,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2761, __pyx_L8_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2822, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_instance, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2763 + /* "dependency_injector/providers.pyx":2824 * instance = __factory_call(self.__instantiator, args, kwargs) * * if __is_future_or_coroutine(instance): # <<<<<<<<<<<<<< @@ -53421,16 +54851,16 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_t_7 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_instance) != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":2764 + /* "dependency_injector/providers.pyx":2825 * * if __is_future_or_coroutine(instance): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * instance = asyncio.ensure_future(instance) * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2764, __pyx_L8_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2825, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2764, __pyx_L8_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2825, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -53445,22 +54875,22 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2764, __pyx_L8_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2825, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_future_result = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2765 + /* "dependency_injector/providers.pyx":2826 * if __is_future_or_coroutine(instance): * future_result = asyncio.Future() * instance = asyncio.ensure_future(instance) # <<<<<<<<<<<<<< * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) * self.__storage = future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2765, __pyx_L8_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2826, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2765, __pyx_L8_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2826, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -53475,27 +54905,27 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2765, __pyx_L8_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2826, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_instance, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2766 + /* "dependency_injector/providers.pyx":2827 * future_result = asyncio.Future() * instance = asyncio.ensure_future(instance) * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) # <<<<<<<<<<<<<< * self.__storage = future_result * return future_result */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2766, __pyx_L8_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2827, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2766, __pyx_L8_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2827, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2766, __pyx_L8_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2827, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_init_instance); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2766, __pyx_L8_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_init_instance); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2827, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = NULL; __pyx_t_5 = 0; @@ -53512,7 +54942,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_6, __pyx_v_future_result}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2766, __pyx_L8_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2827, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -53521,14 +54951,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_6, __pyx_v_future_result}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2766, __pyx_L8_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2827, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_14 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 2766, __pyx_L8_error) + __pyx_t_14 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 2827, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL; @@ -53539,7 +54969,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_GIVEREF(__pyx_v_future_result); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_5, __pyx_v_future_result); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2766, __pyx_L8_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2827, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } @@ -53557,12 +54987,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2766, __pyx_L8_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2827, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2767 + /* "dependency_injector/providers.pyx":2828 * instance = asyncio.ensure_future(instance) * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) * self.__storage = future_result # <<<<<<<<<<<<<< @@ -53575,7 +55005,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___storage); __pyx_v_self->__pyx_base.__pyx___storage = __pyx_v_future_result; - /* "dependency_injector/providers.pyx":2768 + /* "dependency_injector/providers.pyx":2829 * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) * self.__storage = future_result * return future_result # <<<<<<<<<<<<<< @@ -53587,7 +55017,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_r = __pyx_v_future_result; goto __pyx_L12_try_return; - /* "dependency_injector/providers.pyx":2763 + /* "dependency_injector/providers.pyx":2824 * instance = __factory_call(self.__instantiator, args, kwargs) * * if __is_future_or_coroutine(instance): # <<<<<<<<<<<<<< @@ -53596,7 +55026,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ */ } - /* "dependency_injector/providers.pyx":2770 + /* "dependency_injector/providers.pyx":2831 * return future_result * * self.__storage = instance # <<<<<<<<<<<<<< @@ -53609,7 +55039,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___storage); __pyx_v_self->__pyx_base.__pyx___storage = __pyx_v_instance; - /* "dependency_injector/providers.pyx":2760 + /* "dependency_injector/providers.pyx":2821 * if instance is None: * with self.__storage_lock: * if self.__storage is None: # <<<<<<<<<<<<<< @@ -53618,7 +55048,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ */ } - /* "dependency_injector/providers.pyx":2759 + /* "dependency_injector/providers.pyx":2820 * * if instance is None: * with self.__storage_lock: # <<<<<<<<<<<<<< @@ -53640,20 +55070,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /*except:*/ { __Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(1, 2759, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(1, 2820, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2759, __pyx_L10_except_error) + __pyx_t_4 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2820, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 2759, __pyx_L10_except_error) + if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 2820, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_15); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (__pyx_t_7 < 0) __PYX_ERR(1, 2759, __pyx_L10_except_error) + if (__pyx_t_7 < 0) __PYX_ERR(1, 2820, __pyx_L10_except_error) __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_2); @@ -53661,7 +55091,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; - __PYX_ERR(1, 2759, __pyx_L10_except_error) + __PYX_ERR(1, 2820, __pyx_L10_except_error) } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -53693,7 +55123,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ if (__pyx_t_9) { __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple_, NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2759, __pyx_L1_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -53705,7 +55135,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ if (__pyx_t_9) { __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple_, NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2759, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -53722,7 +55152,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_L19:; } - /* "dependency_injector/providers.pyx":2758 + /* "dependency_injector/providers.pyx":2819 * instance = self.__storage * * if instance is None: # <<<<<<<<<<<<<< @@ -53731,7 +55161,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ */ } - /* "dependency_injector/providers.pyx":2772 + /* "dependency_injector/providers.pyx":2833 * self.__storage = instance * * return instance # <<<<<<<<<<<<<< @@ -53743,7 +55173,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_r = __pyx_v_instance; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2754 + /* "dependency_injector/providers.pyx":2815 * return SingletonResetContext(self) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -53805,11 +55235,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2754, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2815, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2754, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2815, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -53822,14 +55252,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2754, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2815, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2754, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2754, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2815, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2815, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -53850,7 +55280,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2754, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -54551,10 +55981,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_28DelegatedThreadSafe return __pyx_r; } -/* "dependency_injector/providers.pyx":2816 +/* "dependency_injector/providers.pyx":2877 * """ * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< * """Initializer. * */ @@ -54591,6 +56021,7 @@ static int __pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_1__i { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -54603,23 +56034,26 @@ static int __pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_1__i kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 2816, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 2877, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } } __pyx_v_provides = values[0]; } goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2816, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -54647,16 +56081,16 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":2822 + /* "dependency_injector/providers.pyx":2883 * :type provides: type * """ * self.__storage = threading.local() # <<<<<<<<<<<<<< * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2822, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_local); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2822, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_local); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -54671,7 +56105,7 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in } __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, 2822, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -54680,14 +56114,14 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in __pyx_v_self->__pyx_base.__pyx___storage = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2823 + /* "dependency_injector/providers.pyx":2884 * """ * self.__storage = threading.local() * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * def reset(self): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2823, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton)); @@ -54695,30 +56129,30 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2823, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2823, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2823, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_provides); __Pyx_GIVEREF(__pyx_v_provides); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_provides); - __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2823, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2823, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":2816 + /* "dependency_injector/providers.pyx":2877 * """ * - * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< * """Initializer. * */ @@ -54737,7 +56171,7 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in return __pyx_r; } -/* "dependency_injector/providers.pyx":2825 +/* "dependency_injector/providers.pyx":2886 * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -54777,7 +56211,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":2830 + /* "dependency_injector/providers.pyx":2891 * :rtype: None * """ * try: # <<<<<<<<<<<<<< @@ -54793,19 +56227,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":2831 + /* "dependency_injector/providers.pyx":2892 * """ * try: * instance = self.__storage.instance # <<<<<<<<<<<<<< * except AttributeError: * return SingletonResetContext(self) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2831, __pyx_L3_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2892, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_instance = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":2830 + /* "dependency_injector/providers.pyx":2891 * :rtype: None * """ * try: # <<<<<<<<<<<<<< @@ -54820,7 +56254,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":2832 + /* "dependency_injector/providers.pyx":2893 * try: * instance = self.__storage.instance * except AttributeError: # <<<<<<<<<<<<<< @@ -54830,12 +56264,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 2832, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 2893, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "dependency_injector/providers.pyx":2833 + /* "dependency_injector/providers.pyx":2894 * instance = self.__storage.instance * except AttributeError: * return SingletonResetContext(self) # <<<<<<<<<<<<<< @@ -54843,7 +56277,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto * if __is_future_or_coroutine(instance): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonResetContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2833, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonResetContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2894, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; @@ -54855,7 +56289,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":2830 + /* "dependency_injector/providers.pyx":2891 * :rtype: None * """ * try: # <<<<<<<<<<<<<< @@ -54876,7 +56310,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __pyx_L8_try_end:; } - /* "dependency_injector/providers.pyx":2835 + /* "dependency_injector/providers.pyx":2896 * return SingletonResetContext(self) * * if __is_future_or_coroutine(instance): # <<<<<<<<<<<<<< @@ -54886,16 +56320,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __pyx_t_9 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_instance) != 0); if (__pyx_t_9) { - /* "dependency_injector/providers.pyx":2836 + /* "dependency_injector/providers.pyx":2897 * * if __is_future_or_coroutine(instance): * asyncio.ensure_future(instance).cancel() # <<<<<<<<<<<<<< * * del self.__storage.instance */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2836, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2836, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -54910,10 +56344,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto } __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_4, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2836, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_cancel); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2836, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_cancel); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -54928,12 +56362,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto } __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2836, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/providers.pyx":2835 + /* "dependency_injector/providers.pyx":2896 * return SingletonResetContext(self) * * if __is_future_or_coroutine(instance): # <<<<<<<<<<<<<< @@ -54942,16 +56376,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto */ } - /* "dependency_injector/providers.pyx":2838 + /* "dependency_injector/providers.pyx":2899 * asyncio.ensure_future(instance).cancel() * * del self.__storage.instance # <<<<<<<<<<<<<< * * return SingletonResetContext(self) */ - if (__Pyx_PyObject_DelAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance) < 0) __PYX_ERR(1, 2838, __pyx_L1_error) + if (__Pyx_PyObject_DelAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance) < 0) __PYX_ERR(1, 2899, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2840 + /* "dependency_injector/providers.pyx":2901 * del self.__storage.instance * * return SingletonResetContext(self) # <<<<<<<<<<<<<< @@ -54959,13 +56393,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto * cpdef object _provide(self, tuple args, dict kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonResetContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2840, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonResetContext), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2825 + /* "dependency_injector/providers.pyx":2886 * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -54988,7 +56422,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto return __pyx_r; } -/* "dependency_injector/providers.pyx":2842 +/* "dependency_injector/providers.pyx":2903 * return SingletonResetContext(self) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -55033,7 +56467,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2842, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -55053,7 +56487,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2842, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2903, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -55061,13 +56495,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2842, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2903, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2842, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -55078,7 +56512,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2842, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -55101,7 +56535,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton #endif } - /* "dependency_injector/providers.pyx":2846 + /* "dependency_injector/providers.pyx":2907 * cdef object instance * * try: # <<<<<<<<<<<<<< @@ -55118,19 +56552,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { - /* "dependency_injector/providers.pyx":2847 + /* "dependency_injector/providers.pyx":2908 * * try: * instance = self.__storage.instance # <<<<<<<<<<<<<< * except AttributeError: * instance = __factory_call(self.__instantiator, args, kwargs) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2847, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2908, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_instance = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2846 + /* "dependency_injector/providers.pyx":2907 * cdef object instance * * try: # <<<<<<<<<<<<<< @@ -55149,7 +56583,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":2848 + /* "dependency_injector/providers.pyx":2909 * try: * instance = self.__storage.instance * except AttributeError: # <<<<<<<<<<<<<< @@ -55159,12 +56593,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 2848, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 2909, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":2849 + /* "dependency_injector/providers.pyx":2910 * instance = self.__storage.instance * except AttributeError: * instance = __factory_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< @@ -55173,13 +56607,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton */ __pyx_t_6 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator); __Pyx_INCREF(__pyx_t_6); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_6), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2849, __pyx_L8_except_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_6), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2910, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_instance, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":2851 + /* "dependency_injector/providers.pyx":2912 * instance = __factory_call(self.__instantiator, args, kwargs) * * if __is_future_or_coroutine(instance): # <<<<<<<<<<<<<< @@ -55189,16 +56623,16 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __pyx_t_10 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_instance) != 0); if (__pyx_t_10) { - /* "dependency_injector/providers.pyx":2852 + /* "dependency_injector/providers.pyx":2913 * * if __is_future_or_coroutine(instance): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * instance = asyncio.ensure_future(instance) * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2852, __pyx_L8_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2913, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Future); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2852, __pyx_L8_except_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Future); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2913, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -55213,22 +56647,22 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_11); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2852, __pyx_L8_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2913, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_future_result = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":2853 + /* "dependency_injector/providers.pyx":2914 * if __is_future_or_coroutine(instance): * future_result = asyncio.Future() * instance = asyncio.ensure_future(instance) # <<<<<<<<<<<<<< * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) * self.__storage.instance = future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2853, __pyx_L8_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2914, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2853, __pyx_L8_except_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2914, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; @@ -55243,27 +56677,27 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton } __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2853, __pyx_L8_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2914, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_instance, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":2854 + /* "dependency_injector/providers.pyx":2915 * future_result = asyncio.Future() * instance = asyncio.ensure_future(instance) * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) # <<<<<<<<<<<<<< * self.__storage.instance = future_result * return future_result */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2854, __pyx_L8_except_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2915, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_functools); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2854, __pyx_L8_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_functools); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2915, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_partial); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 2854, __pyx_L8_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_partial); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 2915, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_init_instance); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2854, __pyx_L8_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_init_instance); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2915, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_14 = NULL; __pyx_t_5 = 0; @@ -55280,7 +56714,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_12, __pyx_v_future_result}; - __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2854, __pyx_L8_except_error) + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2915, __pyx_L8_except_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -55289,14 +56723,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_12, __pyx_v_future_result}; - __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2854, __pyx_L8_except_error) + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2915, __pyx_L8_except_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { - __pyx_t_15 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 2854, __pyx_L8_except_error) + __pyx_t_15 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 2915, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL; @@ -55307,7 +56741,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_GIVEREF(__pyx_v_future_result); PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_5, __pyx_v_future_result); __pyx_t_12 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2854, __pyx_L8_except_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2915, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } @@ -55325,21 +56759,21 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __pyx_t_4 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_13, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2854, __pyx_L8_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2915, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":2855 + /* "dependency_injector/providers.pyx":2916 * instance = asyncio.ensure_future(instance) * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) * self.__storage.instance = future_result # <<<<<<<<<<<<<< * return future_result * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance, __pyx_v_future_result) < 0) __PYX_ERR(1, 2855, __pyx_L8_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance, __pyx_v_future_result) < 0) __PYX_ERR(1, 2916, __pyx_L8_except_error) - /* "dependency_injector/providers.pyx":2856 + /* "dependency_injector/providers.pyx":2917 * instance.add_done_callback(functools.partial(self._async_init_instance, future_result)) * self.__storage.instance = future_result * return future_result # <<<<<<<<<<<<<< @@ -55354,7 +56788,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L9_except_return; - /* "dependency_injector/providers.pyx":2851 + /* "dependency_injector/providers.pyx":2912 * instance = __factory_call(self.__instantiator, args, kwargs) * * if __is_future_or_coroutine(instance): # <<<<<<<<<<<<<< @@ -55363,14 +56797,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton */ } - /* "dependency_injector/providers.pyx":2858 + /* "dependency_injector/providers.pyx":2919 * return future_result * * self.__storage.instance = instance # <<<<<<<<<<<<<< * finally: * return instance */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(1, 2858, __pyx_L8_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(1, 2919, __pyx_L8_except_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -55379,7 +56813,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton goto __pyx_L8_except_error; __pyx_L8_except_error:; - /* "dependency_injector/providers.pyx":2846 + /* "dependency_injector/providers.pyx":2907 * cdef object instance * * try: # <<<<<<<<<<<<<< @@ -55406,7 +56840,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton } } - /* "dependency_injector/providers.pyx":2860 + /* "dependency_injector/providers.pyx":2921 * self.__storage.instance = instance * finally: * return instance # <<<<<<<<<<<<<< @@ -55445,7 +56879,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_XGOTREF(__pyx_t_18); { __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_instance)) { __Pyx_RaiseUnboundLocalError("instance"); __PYX_ERR(1, 2860, __pyx_L16_error) } + if (unlikely(!__pyx_v_instance)) { __Pyx_RaiseUnboundLocalError("instance"); __PYX_ERR(1, 2921, __pyx_L16_error) } __Pyx_INCREF(__pyx_v_instance); __pyx_r = __pyx_v_instance; goto __pyx_L15_return; @@ -55483,7 +56917,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton } } - /* "dependency_injector/providers.pyx":2842 + /* "dependency_injector/providers.pyx":2903 * return SingletonResetContext(self) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -55548,11 +56982,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleto case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2842, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2903, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2842, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2903, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -55565,14 +56999,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleto } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2842, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2903, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2842, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2842, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2903, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2903, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -55593,7 +57027,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2842, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -55610,7 +57044,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto return __pyx_r; } -/* "dependency_injector/providers.pyx":2862 +/* "dependency_injector/providers.pyx":2923 * return instance * * def _async_init_instance(self, future_result, result): # <<<<<<<<<<<<<< @@ -55652,11 +57086,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleto case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_init_instance", 1, 2, 2, 1); __PYX_ERR(1, 2862, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_init_instance", 1, 2, 2, 1); __PYX_ERR(1, 2923, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_init_instance") < 0)) __PYX_ERR(1, 2862, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_init_instance") < 0)) __PYX_ERR(1, 2923, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -55669,7 +57103,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleto } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_async_init_instance", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2862, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_init_instance", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2923, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._async_init_instance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -55702,7 +57136,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_async_init_instance", 0); - /* "dependency_injector/providers.pyx":2863 + /* "dependency_injector/providers.pyx":2924 * * def _async_init_instance(self, future_result, result): * try: # <<<<<<<<<<<<<< @@ -55718,14 +57152,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":2864 + /* "dependency_injector/providers.pyx":2925 * def _async_init_instance(self, future_result, result): * try: * instance = result.result() # <<<<<<<<<<<<<< * except Exception as exception: * del self.__storage.instance */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2864, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2925, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -55739,13 +57173,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto } __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, 2864, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2925, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_instance = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":2863 + /* "dependency_injector/providers.pyx":2924 * * def _async_init_instance(self, future_result, result): * try: # <<<<<<<<<<<<<< @@ -55754,7 +57188,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto */ } - /* "dependency_injector/providers.pyx":2869 + /* "dependency_injector/providers.pyx":2930 * future_result.set_exception(exception) * else: * self.__storage.instance = instance # <<<<<<<<<<<<<< @@ -55762,16 +57196,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto * */ /*else:*/ { - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(1, 2869, __pyx_L5_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(1, 2930, __pyx_L5_except_error) - /* "dependency_injector/providers.pyx":2870 + /* "dependency_injector/providers.pyx":2931 * else: * self.__storage.instance = instance * future_result.set_result(instance) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2870, __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, 2931, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -55785,7 +57219,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2870, __pyx_L5_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2931, __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; @@ -55799,7 +57233,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":2865 + /* "dependency_injector/providers.pyx":2926 * try: * instance = result.result() * except Exception as exception: # <<<<<<<<<<<<<< @@ -55809,30 +57243,30 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._async_init_instance", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 2865, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 2926, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_exception = __pyx_t_5; - /* "dependency_injector/providers.pyx":2866 + /* "dependency_injector/providers.pyx":2927 * instance = result.result() * except Exception as exception: * del self.__storage.instance # <<<<<<<<<<<<<< * future_result.set_exception(exception) * else: */ - if (__Pyx_PyObject_DelAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance) < 0) __PYX_ERR(1, 2866, __pyx_L5_except_error) + if (__Pyx_PyObject_DelAttrStr(__pyx_v_self->__pyx_base.__pyx___storage, __pyx_n_s_instance) < 0) __PYX_ERR(1, 2927, __pyx_L5_except_error) - /* "dependency_injector/providers.pyx":2867 + /* "dependency_injector/providers.pyx":2928 * except Exception as exception: * del self.__storage.instance * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * self.__storage.instance = instance */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2867, __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, 2928, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -55846,7 +57280,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto } __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, 2867, __pyx_L5_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2928, __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; @@ -55858,7 +57292,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":2863 + /* "dependency_injector/providers.pyx":2924 * * def _async_init_instance(self, future_result, result): * try: # <<<<<<<<<<<<<< @@ -55878,7 +57312,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __pyx_L8_try_end:; } - /* "dependency_injector/providers.pyx":2862 + /* "dependency_injector/providers.pyx":2923 * return instance * * def _async_init_instance(self, future_result, result): # <<<<<<<<<<<<<< @@ -56570,7 +58004,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_29DelegatedThreadLoca return __pyx_r; } -/* "dependency_injector/providers.pyx":2905 +/* "dependency_injector/providers.pyx":2966 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -56623,7 +58057,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "dependency_injector/providers.pyx":2910 + /* "dependency_injector/providers.pyx":2971 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -56634,16 +58068,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":2911 + /* "dependency_injector/providers.pyx":2972 * """ * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<< * return super().__call__(*args, **kwargs) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2911, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2911, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -56657,7 +58091,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2911, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -56673,14 +58107,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 2911, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 2911, __pyx_L1_error) + __PYX_ERR(1, 2972, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2910 + /* "dependency_injector/providers.pyx":2971 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -56689,7 +58123,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ */ } - /* "dependency_injector/providers.pyx":2912 + /* "dependency_injector/providers.pyx":2973 * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) * return super().__call__(*args, **kwargs) # <<<<<<<<<<<<<< @@ -56697,7 +58131,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ * def override(self, provider): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2912, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton)); @@ -56705,20 +58139,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2912, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_call); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2912, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_call); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2912, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2905 + /* "dependency_injector/providers.pyx":2966 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -56741,7 +58175,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ return __pyx_r; } -/* "dependency_injector/providers.pyx":2914 +/* "dependency_injector/providers.pyx":2975 * return super().__call__(*args, **kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -56780,7 +58214,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":2925 + /* "dependency_injector/providers.pyx":2986 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, BaseSingleton): # <<<<<<<<<<<<<< @@ -56791,24 +58225,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":2926 + /* "dependency_injector/providers.pyx":2987 * """ * if not isinstance(provider, BaseSingleton): * raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<< * '{1} providers'.format(self, BaseSingleton)) * return super(AbstractSingleton, self).override(provider) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2926, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":2927 + /* "dependency_injector/providers.pyx":2988 * if not isinstance(provider, BaseSingleton): * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, BaseSingleton)) # <<<<<<<<<<<<<< * return super(AbstractSingleton, self).override(provider) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2927, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -56825,7 +58259,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2927, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2988, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -56833,13 +58267,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2927, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2988, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2927, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -56850,7 +58284,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2927, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -56868,14 +58302,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 2926, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 2926, __pyx_L1_error) + __PYX_ERR(1, 2987, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2925 + /* "dependency_injector/providers.pyx":2986 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, BaseSingleton): # <<<<<<<<<<<<<< @@ -56884,7 +58318,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 */ } - /* "dependency_injector/providers.pyx":2928 + /* "dependency_injector/providers.pyx":2989 * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, BaseSingleton)) * return super(AbstractSingleton, self).override(provider) # <<<<<<<<<<<<<< @@ -56892,7 +58326,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 * def reset(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2928, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton)); @@ -56900,10 +58334,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2928, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2928, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -56918,14 +58352,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2928, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2914 + /* "dependency_injector/providers.pyx":2975 * return super().__call__(*args, **kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -56949,7 +58383,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 return __pyx_r; } -/* "dependency_injector/providers.pyx":2930 +/* "dependency_injector/providers.pyx":2991 * return super(AbstractSingleton, self).override(provider) * * def reset(self): # <<<<<<<<<<<<<< @@ -56986,7 +58420,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":2935 + /* "dependency_injector/providers.pyx":2996 * :rtype: None * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -56997,16 +58431,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":2936 + /* "dependency_injector/providers.pyx":2997 * """ * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<< * return self.__last_overriding.reset() * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2936, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2936, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -57020,7 +58454,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2936, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -57036,14 +58470,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 2936, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 2936, __pyx_L1_error) + __PYX_ERR(1, 2997, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2935 + /* "dependency_injector/providers.pyx":2996 * :rtype: None * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -57052,7 +58486,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 */ } - /* "dependency_injector/providers.pyx":2937 + /* "dependency_injector/providers.pyx":2998 * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) * return self.__last_overriding.reset() # <<<<<<<<<<<<<< @@ -57060,7 +58494,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2937, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -57074,14 +58508,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2937, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2930 + /* "dependency_injector/providers.pyx":2991 * return super(AbstractSingleton, self).override(provider) * * def reset(self): # <<<<<<<<<<<<<< @@ -57436,7 +58870,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_8 return __pyx_r; } -/* "dependency_injector/providers.pyx":2950 +/* "dependency_injector/providers.pyx":3011 * """ * * def __init__(self, singleton): # <<<<<<<<<<<<<< @@ -57477,7 +58911,7 @@ static int __pyx_pw_19dependency_injector_9providers_17SingletonDelegate_1__init else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 2950, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3011, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -57488,7 +58922,7 @@ static int __pyx_pw_19dependency_injector_9providers_17SingletonDelegate_1__init } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2950, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3011, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.SingletonDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -57519,7 +58953,7 @@ static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":2956 + /* "dependency_injector/providers.pyx":3017 * :type singleton: py:class:`BaseSingleton` * """ * if isinstance(singleton, BaseSingleton) is False: # <<<<<<<<<<<<<< @@ -57530,26 +58964,26 @@ static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init_ __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":2957 + /* "dependency_injector/providers.pyx":3018 * """ * if isinstance(singleton, BaseSingleton) is False: * raise Error('{0} can wrap only {1} providers'.format( # <<<<<<<<<<<<<< * self.__class__, BaseSingleton)) * super(SingletonDelegate, self).__init__(singleton) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2957, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2957, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "dependency_injector/providers.pyx":2958 + /* "dependency_injector/providers.pyx":3019 * if isinstance(singleton, BaseSingleton) is False: * raise Error('{0} can wrap only {1} providers'.format( * self.__class__, BaseSingleton)) # <<<<<<<<<<<<<< * super(SingletonDelegate, self).__init__(singleton) * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2958, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -57566,7 +59000,7 @@ static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2957, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3018, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -57575,14 +59009,14 @@ static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2957, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3018, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2957, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 3018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -57593,7 +59027,7 @@ static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init_ __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); __pyx_t_7 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2957, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -57611,14 +59045,14 @@ static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init_ __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 2957, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 2957, __pyx_L1_error) + __PYX_ERR(1, 3018, __pyx_L1_error) - /* "dependency_injector/providers.pyx":2956 + /* "dependency_injector/providers.pyx":3017 * :type singleton: py:class:`BaseSingleton` * """ * if isinstance(singleton, BaseSingleton) is False: # <<<<<<<<<<<<<< @@ -57627,14 +59061,14 @@ static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init_ */ } - /* "dependency_injector/providers.pyx":2959 + /* "dependency_injector/providers.pyx":3020 * raise Error('{0} can wrap only {1} providers'.format( * self.__class__, BaseSingleton)) * super(SingletonDelegate, self).__init__(singleton) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2959, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonDelegate)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonDelegate)); @@ -57642,10 +59076,10 @@ static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init_ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2959, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2959, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -57660,12 +59094,12 @@ static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init_ } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_singleton) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_singleton); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2959, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":2950 + /* "dependency_injector/providers.pyx":3011 * """ * * def __init__(self, singleton): # <<<<<<<<<<<<<< @@ -58013,7 +59447,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17SingletonDelegate_4 return __pyx_r; } -/* "dependency_injector/providers.pyx":2992 +/* "dependency_injector/providers.pyx":3053 * """ * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -58054,14 +59488,14 @@ static int __pyx_pf_19dependency_injector_9providers_4List___init__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":2994 + /* "dependency_injector/providers.pyx":3055 * def __init__(self, *args): * """Initializer.""" * self.__args = tuple() # <<<<<<<<<<<<<< * self.__args_len = 0 * self.set_args(*args) */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2994, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -58069,7 +59503,7 @@ static int __pyx_pf_19dependency_injector_9providers_4List___init__(struct __pyx __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":2995 + /* "dependency_injector/providers.pyx":3056 * """Initializer.""" * self.__args = tuple() * self.__args_len = 0 # <<<<<<<<<<<<<< @@ -58078,28 +59512,28 @@ static int __pyx_pf_19dependency_injector_9providers_4List___init__(struct __pyx */ __pyx_v_self->__pyx___args_len = 0; - /* "dependency_injector/providers.pyx":2996 + /* "dependency_injector/providers.pyx":3057 * self.__args = tuple() * self.__args_len = 0 * self.set_args(*args) # <<<<<<<<<<<<<< * super(List, self).__init__() * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2996, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2996, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2997 + /* "dependency_injector/providers.pyx":3058 * self.__args_len = 0 * self.set_args(*args) * super(List, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2997, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_List)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_List)); @@ -58107,10 +59541,10 @@ static int __pyx_pf_19dependency_injector_9providers_4List___init__(struct __pyx __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2997, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2997, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -58125,12 +59559,12 @@ static int __pyx_pf_19dependency_injector_9providers_4List___init__(struct __pyx } __pyx_t_2 = (__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_2)) __PYX_ERR(1, 2997, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":2992 + /* "dependency_injector/providers.pyx":3053 * """ * * def __init__(self, *args): # <<<<<<<<<<<<<< @@ -58152,7 +59586,7 @@ static int __pyx_pf_19dependency_injector_9providers_4List___init__(struct __pyx return __pyx_r; } -/* "dependency_injector/providers.pyx":2999 +/* "dependency_injector/providers.pyx":3060 * super(List, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -58190,16 +59624,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_2__deepcopy__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":3001 + /* "dependency_injector/providers.pyx":3062 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3001, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3001, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -58214,13 +59648,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_2__deepcopy__(s __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3001, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3002 + /* "dependency_injector/providers.pyx":3063 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -58231,7 +59665,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_2__deepcopy__(s __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":3003 + /* "dependency_injector/providers.pyx":3064 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -58243,7 +59677,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_2__deepcopy__(s __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3002 + /* "dependency_injector/providers.pyx":3063 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -58252,45 +59686,45 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_2__deepcopy__(s */ } - /* "dependency_injector/providers.pyx":3005 + /* "dependency_injector/providers.pyx":3066 * return copied * * copied = self.__class__(*deepcopy(self.args, memo)) # <<<<<<<<<<<<<< * self._copy_overridings(copied, memo) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3005, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3005, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3005, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3066, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3005, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3005, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3005, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3006 + /* "dependency_injector/providers.pyx":3067 * * copied = self.__class__(*deepcopy(self.args, memo)) * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3006, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3006, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3067, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3067, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_List *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":3008 + /* "dependency_injector/providers.pyx":3069 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -58302,7 +59736,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_2__deepcopy__(s __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":2999 + /* "dependency_injector/providers.pyx":3060 * super(List, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -58325,7 +59759,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_2__deepcopy__(s return __pyx_r; } -/* "dependency_injector/providers.pyx":3010 +/* "dependency_injector/providers.pyx":3071 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -58360,7 +59794,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4__str__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":3015 + /* "dependency_injector/providers.pyx":3076 * :rtype: str * """ * return represent_provider(provider=self, provides=list(self.args)) # <<<<<<<<<<<<<< @@ -58368,19 +59802,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4__str__(struct * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3015, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3015, __pyx_L1_error) + __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3015, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3010 + /* "dependency_injector/providers.pyx":3071 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -58400,7 +59834,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4__str__(struct return __pyx_r; } -/* "dependency_injector/providers.pyx":3018 +/* "dependency_injector/providers.pyx":3079 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -58437,19 +59871,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4args___get__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3024 + /* "dependency_injector/providers.pyx":3085 * cdef list args * * args = list() # <<<<<<<<<<<<<< * for index in range(self.__args_len): * arg = self.__args[index] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3024, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3025 + /* "dependency_injector/providers.pyx":3086 * * args = list() * for index in range(self.__args_len): # <<<<<<<<<<<<<< @@ -58461,7 +59895,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4args___get__(s for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pyx":3026 + /* "dependency_injector/providers.pyx":3087 * args = list() * for index in range(self.__args_len): * arg = self.__args[index] # <<<<<<<<<<<<<< @@ -58470,15 +59904,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4args___get__(s */ if (unlikely(__pyx_v_self->__pyx___args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 3026, __pyx_L1_error) + __PYX_ERR(1, 3087, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3026, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_PositionalInjection))))) __PYX_ERR(1, 3026, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_PositionalInjection))))) __PYX_ERR(1, 3087, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_arg, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3027 + /* "dependency_injector/providers.pyx":3088 * for index in range(self.__args_len): * arg = self.__args[index] * args.append(arg.__value) # <<<<<<<<<<<<<< @@ -58487,11 +59921,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4args___get__(s */ __pyx_t_1 = __pyx_v_arg->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 3027, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 3088, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":3028 + /* "dependency_injector/providers.pyx":3089 * arg = self.__args[index] * args.append(arg.__value) * return tuple(args) # <<<<<<<<<<<<<< @@ -58499,13 +59933,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4args___get__(s * def add_args(self, *args): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3028, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3018 + /* "dependency_injector/providers.pyx":3079 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -58526,7 +59960,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4args___get__(s return __pyx_r; } -/* "dependency_injector/providers.pyx":3030 +/* "dependency_injector/providers.pyx":3091 * return tuple(args) * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -58564,16 +59998,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_6add_args(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_args", 0); - /* "dependency_injector/providers.pyx":3035 + /* "dependency_injector/providers.pyx":3096 * :return: Reference ``self`` * """ * self.__args += parse_positional_injections(args) # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3035, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3035, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -58582,7 +60016,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_6add_args(struc __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3036 + /* "dependency_injector/providers.pyx":3097 * """ * self.__args += parse_positional_injections(args) * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -58593,13 +60027,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_6add_args(struc __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3036, __pyx_L1_error) + __PYX_ERR(1, 3097, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3036, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_3; - /* "dependency_injector/providers.pyx":3037 + /* "dependency_injector/providers.pyx":3098 * self.__args += parse_positional_injections(args) * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -58611,7 +60045,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_6add_args(struc __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3030 + /* "dependency_injector/providers.pyx":3091 * return tuple(args) * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -58631,7 +60065,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_6add_args(struc return __pyx_r; } -/* "dependency_injector/providers.pyx":3039 +/* "dependency_injector/providers.pyx":3100 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -58668,14 +60102,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_8set_args(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_args", 0); - /* "dependency_injector/providers.pyx":3046 + /* "dependency_injector/providers.pyx":3107 * :return: Reference ``self`` * """ * self.__args = parse_positional_injections(args) # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3046, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -58683,7 +60117,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_8set_args(struc __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3047 + /* "dependency_injector/providers.pyx":3108 * """ * self.__args = parse_positional_injections(args) * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -58694,13 +60128,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_8set_args(struc __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3047, __pyx_L1_error) + __PYX_ERR(1, 3108, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3047, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":3048 + /* "dependency_injector/providers.pyx":3109 * self.__args = parse_positional_injections(args) * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -58712,7 +60146,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_8set_args(struc __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3039 + /* "dependency_injector/providers.pyx":3100 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -58731,7 +60165,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_8set_args(struc return __pyx_r; } -/* "dependency_injector/providers.pyx":3050 +/* "dependency_injector/providers.pyx":3111 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -58763,14 +60197,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_10clear_args(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_args", 0); - /* "dependency_injector/providers.pyx":3055 + /* "dependency_injector/providers.pyx":3116 * :return: Reference ``self`` * """ * self.__args = tuple() # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3055, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -58778,7 +60212,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_10clear_args(st __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3056 + /* "dependency_injector/providers.pyx":3117 * """ * self.__args = tuple() * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -58789,13 +60223,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_10clear_args(st __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3056, __pyx_L1_error) + __PYX_ERR(1, 3117, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3056, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":3057 + /* "dependency_injector/providers.pyx":3118 * self.__args = tuple() * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -58807,7 +60241,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_10clear_args(st __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3050 + /* "dependency_injector/providers.pyx":3111 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -58827,7 +60261,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_10clear_args(st } static PyObject *__pyx_gb_19dependency_injector_9providers_4List_7related_2generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":3060 +/* "dependency_injector/providers.pyx":3121 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -58860,7 +60294,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_7related___get_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_13___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 3060, __pyx_L1_error) + __PYX_ERR(1, 3121, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -58868,7 +60302,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_7related___get_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_4List_7related_2generator11, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_List___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3060, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_4List_7related_2generator11, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_List___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3121, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -58905,20 +60339,20 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4List_7related_2gener return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3060, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3121, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3062 + /* "dependency_injector/providers.pyx":3123 * def related(self): * """Return related providers generator.""" * yield from filter(is_provider, self.args) # <<<<<<<<<<<<<< * yield from super().related * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3062, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3062, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3062, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -58926,7 +60360,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4List_7related_2gener PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3062, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); @@ -58940,23 +60374,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4List_7related_2gener __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3062, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3123, __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(1, 3062, __pyx_L1_error) + else __PYX_ERR(1, 3123, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":3063 + /* "dependency_injector/providers.pyx":3124 * """Return related providers generator.""" * yield from filter(is_provider, self.args) * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3063, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_List)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_List)); @@ -58964,10 +60398,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4List_7related_2gener __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3063, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3063, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); @@ -58981,17 +60415,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4List_7related_2gener __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3063, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3124, __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(1, 3063, __pyx_L1_error) + else __PYX_ERR(1, 3124, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":3060 + /* "dependency_injector/providers.pyx":3121 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -59018,7 +60452,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4List_7related_2gener return __pyx_r; } -/* "dependency_injector/providers.pyx":3065 +/* "dependency_injector/providers.pyx":3126 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -59049,7 +60483,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4List__provide(struct if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3065, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_4List_13_provide)) { __Pyx_XDECREF(__pyx_r); @@ -59069,7 +60503,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4List__provide(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3065, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3126, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -59077,13 +60511,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4List__provide(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3065, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3126, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3065, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -59094,7 +60528,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4List__provide(struct __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3065, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -59117,7 +60551,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4List__provide(struct #endif } - /* "dependency_injector/providers.pyx":3067 + /* "dependency_injector/providers.pyx":3128 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" * return list(__provide_positional_args(args, self.__args, self.__args_len)) # <<<<<<<<<<<<<< @@ -59127,17 +60561,17 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4List__provide(struct __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_args, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3067, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_args, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3067, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3065 + /* "dependency_injector/providers.pyx":3126 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -59195,11 +60629,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_4List_13_provide(PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3065, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3126, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3065, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3126, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -59212,14 +60646,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_4List_13_provide(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3065, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3126, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.List._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3065, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3065, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3126, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3126, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_4List_12_provide(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -59240,7 +60674,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_12_provide(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_4List__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3065, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_4List__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -59584,7 +61018,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4List_16__setstate_cy return __pyx_r; } -/* "dependency_injector/providers.pyx":3100 +/* "dependency_injector/providers.pyx":3161 * """ * * def __init__(self, dict_=None, **kwargs): # <<<<<<<<<<<<<< @@ -59631,7 +61065,7 @@ static int __pyx_pw_19dependency_injector_9providers_4Dict_1__init__(PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3100, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3161, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -59645,7 +61079,7 @@ static int __pyx_pw_19dependency_injector_9providers_4Dict_1__init__(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3100, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3161, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("dependency_injector.providers.Dict.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -59671,14 +61105,14 @@ static int __pyx_pf_19dependency_injector_9providers_4Dict___init__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":3102 + /* "dependency_injector/providers.pyx":3163 * def __init__(self, dict_=None, **kwargs): * """Initializer.""" * self.__kwargs = tuple() # <<<<<<<<<<<<<< * self.__kwargs_len = 0 * self.add_kwargs(dict_, **kwargs) */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3102, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -59686,7 +61120,7 @@ static int __pyx_pf_19dependency_injector_9providers_4Dict___init__(struct __pyx __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3103 + /* "dependency_injector/providers.pyx":3164 * """Initializer.""" * self.__kwargs = tuple() * self.__kwargs_len = 0 # <<<<<<<<<<<<<< @@ -59695,34 +61129,34 @@ static int __pyx_pf_19dependency_injector_9providers_4Dict___init__(struct __pyx */ __pyx_v_self->__pyx___kwargs_len = 0; - /* "dependency_injector/providers.pyx":3104 + /* "dependency_injector/providers.pyx":3165 * self.__kwargs = tuple() * self.__kwargs_len = 0 * self.add_kwargs(dict_, **kwargs) # <<<<<<<<<<<<<< * super(Dict, self).__init__() * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3104, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3104, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_dict_); __Pyx_GIVEREF(__pyx_v_dict_); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_dict_); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3104, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3105 + /* "dependency_injector/providers.pyx":3166 * self.__kwargs_len = 0 * self.add_kwargs(dict_, **kwargs) * super(Dict, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3105, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dict)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dict)); @@ -59730,10 +61164,10 @@ static int __pyx_pf_19dependency_injector_9providers_4Dict___init__(struct __pyx __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3105, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3105, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -59748,12 +61182,12 @@ static int __pyx_pf_19dependency_injector_9providers_4Dict___init__(struct __pyx } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3105, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3100 + /* "dependency_injector/providers.pyx":3161 * """ * * def __init__(self, dict_=None, **kwargs): # <<<<<<<<<<<<<< @@ -59775,7 +61209,7 @@ static int __pyx_pf_19dependency_injector_9providers_4Dict___init__(struct __pyx return __pyx_r; } -/* "dependency_injector/providers.pyx":3107 +/* "dependency_injector/providers.pyx":3168 * super(Dict, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -59813,16 +61247,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_2__deepcopy__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":3109 + /* "dependency_injector/providers.pyx":3170 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3109, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3109, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -59837,13 +61271,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_2__deepcopy__(s __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3109, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3110 + /* "dependency_injector/providers.pyx":3171 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -59854,7 +61288,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_2__deepcopy__(s __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":3111 + /* "dependency_injector/providers.pyx":3172 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -59866,7 +61300,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_2__deepcopy__(s __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3110 + /* "dependency_injector/providers.pyx":3171 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -59875,21 +61309,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_2__deepcopy__(s */ } - /* "dependency_injector/providers.pyx":3113 + /* "dependency_injector/providers.pyx":3174 * return copied * * copied = self.__class__(deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< * self._copy_overridings(copied, memo) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3113, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3113, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3113, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3174, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3113, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -59905,24 +61339,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_2__deepcopy__(s __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(1, 3113, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3114 + /* "dependency_injector/providers.pyx":3175 * * copied = self.__class__(deepcopy(self.kwargs, memo)) * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3114, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3114, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3175, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3175, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_Dict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":3116 + /* "dependency_injector/providers.pyx":3177 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -59934,7 +61368,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_2__deepcopy__(s __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3107 + /* "dependency_injector/providers.pyx":3168 * super(Dict, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -59957,7 +61391,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_2__deepcopy__(s return __pyx_r; } -/* "dependency_injector/providers.pyx":3118 +/* "dependency_injector/providers.pyx":3179 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -59992,7 +61426,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_4__str__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":3123 + /* "dependency_injector/providers.pyx":3184 * :rtype: str * """ * return represent_provider(provider=self, provides=self.kwargs) # <<<<<<<<<<<<<< @@ -60000,16 +61434,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_4__str__(struct * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3123, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3123, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3118 + /* "dependency_injector/providers.pyx":3179 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -60029,7 +61463,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_4__str__(struct return __pyx_r; } -/* "dependency_injector/providers.pyx":3126 +/* "dependency_injector/providers.pyx":3187 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -60065,19 +61499,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6kwargs___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3132 + /* "dependency_injector/providers.pyx":3193 * cdef dict kwargs * * kwargs = dict() # <<<<<<<<<<<<<< * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3133 + /* "dependency_injector/providers.pyx":3194 * * kwargs = dict() * for index in range(self.__kwargs_len): # <<<<<<<<<<<<<< @@ -60089,7 +61523,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6kwargs___get__ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pyx":3134 + /* "dependency_injector/providers.pyx":3195 * kwargs = dict() * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] # <<<<<<<<<<<<<< @@ -60098,15 +61532,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6kwargs___get__ */ if (unlikely(__pyx_v_self->__pyx___kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 3134, __pyx_L1_error) + __PYX_ERR(1, 3195, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3134, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 3134, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 3195, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_kwarg, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3135 + /* "dependency_injector/providers.pyx":3196 * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] * kwargs[kwarg.__name] = kwarg.__value # <<<<<<<<<<<<<< @@ -60115,11 +61549,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6kwargs___get__ */ __pyx_t_1 = __pyx_v_kwarg->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_1); - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 3135, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 3196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":3136 + /* "dependency_injector/providers.pyx":3197 * kwarg = self.__kwargs[index] * kwargs[kwarg.__name] = kwarg.__value * return kwargs # <<<<<<<<<<<<<< @@ -60131,7 +61565,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6kwargs___get__ __pyx_r = __pyx_v_kwargs; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3126 + /* "dependency_injector/providers.pyx":3187 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -60152,7 +61586,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6kwargs___get__ return __pyx_r; } -/* "dependency_injector/providers.pyx":3138 +/* "dependency_injector/providers.pyx":3199 * return kwargs * * def add_kwargs(self, dict_=None, **kwargs): # <<<<<<<<<<<<<< @@ -60196,7 +61630,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_4Dict_7add_kwargs(PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "add_kwargs") < 0)) __PYX_ERR(1, 3138, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "add_kwargs") < 0)) __PYX_ERR(1, 3199, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -60210,7 +61644,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_4Dict_7add_kwargs(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_kwargs", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3138, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_kwargs", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3199, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("dependency_injector.providers.Dict.add_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -60239,7 +61673,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6add_kwargs(str __Pyx_RefNannySetupContext("add_kwargs", 0); __Pyx_INCREF(__pyx_v_dict_); - /* "dependency_injector/providers.pyx":3143 + /* "dependency_injector/providers.pyx":3204 * :return: Reference ``self`` * """ * if dict_ is None: # <<<<<<<<<<<<<< @@ -60250,19 +61684,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6add_kwargs(str __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":3144 + /* "dependency_injector/providers.pyx":3205 * """ * if dict_ is None: * dict_ = {} # <<<<<<<<<<<<<< * * self.__kwargs += parse_named_injections(dict_) */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3144, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_dict_, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3143 + /* "dependency_injector/providers.pyx":3204 * :return: Reference ``self`` * """ * if dict_ is None: # <<<<<<<<<<<<<< @@ -60271,17 +61705,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6add_kwargs(str */ } - /* "dependency_injector/providers.pyx":3146 + /* "dependency_injector/providers.pyx":3207 * dict_ = {} * * self.__kwargs += parse_named_injections(dict_) # <<<<<<<<<<<<<< * self.__kwargs += parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) */ - if (!(likely(PyDict_CheckExact(__pyx_v_dict_))||((__pyx_v_dict_) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_dict_)->tp_name), 0))) __PYX_ERR(1, 3146, __pyx_L1_error) - __pyx_t_3 = __pyx_f_19dependency_injector_9providers_parse_named_injections(((PyObject*)__pyx_v_dict_), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3146, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_dict_))||((__pyx_v_dict_) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_dict_)->tp_name), 0))) __PYX_ERR(1, 3207, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_parse_named_injections(((PyObject*)__pyx_v_dict_), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3146, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -60290,16 +61724,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6add_kwargs(str __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3147 + /* "dependency_injector/providers.pyx":3208 * * self.__kwargs += parse_named_injections(dict_) * self.__kwargs += parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * */ - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3147, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3147, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -60308,7 +61742,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6add_kwargs(str __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3148 + /* "dependency_injector/providers.pyx":3209 * self.__kwargs += parse_named_injections(dict_) * self.__kwargs += parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -60319,13 +61753,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6add_kwargs(str __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, 3148, __pyx_L1_error) + __PYX_ERR(1, 3209, __pyx_L1_error) } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3148, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3209, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_5; - /* "dependency_injector/providers.pyx":3150 + /* "dependency_injector/providers.pyx":3211 * self.__kwargs_len = len(self.__kwargs) * * return self # <<<<<<<<<<<<<< @@ -60337,7 +61771,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6add_kwargs(str __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3138 + /* "dependency_injector/providers.pyx":3199 * return kwargs * * def add_kwargs(self, dict_=None, **kwargs): # <<<<<<<<<<<<<< @@ -60358,7 +61792,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_6add_kwargs(str return __pyx_r; } -/* "dependency_injector/providers.pyx":3152 +/* "dependency_injector/providers.pyx":3213 * return self * * def set_kwargs(self, dict_=None, **kwargs): # <<<<<<<<<<<<<< @@ -60402,7 +61836,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_4Dict_9set_kwargs(PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "set_kwargs") < 0)) __PYX_ERR(1, 3152, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "set_kwargs") < 0)) __PYX_ERR(1, 3213, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -60416,7 +61850,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_4Dict_9set_kwargs(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_kwargs", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3152, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_kwargs", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3213, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("dependency_injector.providers.Dict.set_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -60445,7 +61879,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_8set_kwargs(str __Pyx_RefNannySetupContext("set_kwargs", 0); __Pyx_INCREF(__pyx_v_dict_); - /* "dependency_injector/providers.pyx":3159 + /* "dependency_injector/providers.pyx":3220 * :return: Reference ``self`` * """ * if dict_ is None: # <<<<<<<<<<<<<< @@ -60456,19 +61890,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_8set_kwargs(str __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":3160 + /* "dependency_injector/providers.pyx":3221 * """ * if dict_ is None: * dict_ = {} # <<<<<<<<<<<<<< * * self.__kwargs = parse_named_injections(dict_) */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3160, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_dict_, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3159 + /* "dependency_injector/providers.pyx":3220 * :return: Reference ``self`` * """ * if dict_ is None: # <<<<<<<<<<<<<< @@ -60477,15 +61911,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_8set_kwargs(str */ } - /* "dependency_injector/providers.pyx":3162 + /* "dependency_injector/providers.pyx":3223 * dict_ = {} * * self.__kwargs = parse_named_injections(dict_) # <<<<<<<<<<<<<< * self.__kwargs += parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) */ - if (!(likely(PyDict_CheckExact(__pyx_v_dict_))||((__pyx_v_dict_) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_dict_)->tp_name), 0))) __PYX_ERR(1, 3162, __pyx_L1_error) - __pyx_t_3 = __pyx_f_19dependency_injector_9providers_parse_named_injections(((PyObject*)__pyx_v_dict_), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3162, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_dict_))||((__pyx_v_dict_) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_dict_)->tp_name), 0))) __PYX_ERR(1, 3223, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_parse_named_injections(((PyObject*)__pyx_v_dict_), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -60493,16 +61927,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_8set_kwargs(str __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3163 + /* "dependency_injector/providers.pyx":3224 * * self.__kwargs = parse_named_injections(dict_) * self.__kwargs += parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * */ - __pyx_t_3 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3163, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3163, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -60511,7 +61945,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_8set_kwargs(str __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3164 + /* "dependency_injector/providers.pyx":3225 * self.__kwargs = parse_named_injections(dict_) * self.__kwargs += parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -60522,13 +61956,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_8set_kwargs(str __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3164, __pyx_L1_error) + __PYX_ERR(1, 3225, __pyx_L1_error) } - __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3164, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_5; - /* "dependency_injector/providers.pyx":3166 + /* "dependency_injector/providers.pyx":3227 * self.__kwargs_len = len(self.__kwargs) * * return self # <<<<<<<<<<<<<< @@ -60540,7 +61974,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_8set_kwargs(str __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3152 + /* "dependency_injector/providers.pyx":3213 * return self * * def set_kwargs(self, dict_=None, **kwargs): # <<<<<<<<<<<<<< @@ -60561,7 +61995,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_8set_kwargs(str return __pyx_r; } -/* "dependency_injector/providers.pyx":3168 +/* "dependency_injector/providers.pyx":3229 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -60593,14 +62027,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_10clear_kwargs( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_kwargs", 0); - /* "dependency_injector/providers.pyx":3173 + /* "dependency_injector/providers.pyx":3234 * :return: Reference ``self`` * """ * self.__kwargs = tuple() # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * return self */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3173, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -60608,7 +62042,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_10clear_kwargs( __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3174 + /* "dependency_injector/providers.pyx":3235 * """ * self.__kwargs = tuple() * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -60619,13 +62053,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_10clear_kwargs( __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3174, __pyx_L1_error) + __PYX_ERR(1, 3235, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3174, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":3175 + /* "dependency_injector/providers.pyx":3236 * self.__kwargs = tuple() * self.__kwargs_len = len(self.__kwargs) * return self # <<<<<<<<<<<<<< @@ -60637,7 +62071,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_10clear_kwargs( __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3168 + /* "dependency_injector/providers.pyx":3229 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -60657,7 +62091,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_10clear_kwargs( } static PyObject *__pyx_gb_19dependency_injector_9providers_4Dict_7related_2generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":3178 +/* "dependency_injector/providers.pyx":3239 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -60690,7 +62124,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_7related___get_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_14___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 3178, __pyx_L1_error) + __PYX_ERR(1, 3239, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -60698,7 +62132,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_7related___get_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_4Dict_7related_2generator12, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Dict___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3178, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_4Dict_7related_2generator12, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Dict___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3239, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -60736,20 +62170,20 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4Dict_7related_2gener return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3178, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3239, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3180 + /* "dependency_injector/providers.pyx":3241 * def related(self): * """Return related providers generator.""" * yield from filter(is_provider, self.kwargs.values()) # <<<<<<<<<<<<<< * yield from super().related * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3180, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3180, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3180, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -60764,10 +62198,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4Dict_7related_2gener } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3180, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3180, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -60775,7 +62209,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4Dict_7related_2gener PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3180, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); @@ -60789,23 +62223,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4Dict_7related_2gener __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3180, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3241, __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(1, 3180, __pyx_L1_error) + else __PYX_ERR(1, 3241, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":3181 + /* "dependency_injector/providers.pyx":3242 * """Return related providers generator.""" * yield from filter(is_provider, self.kwargs.values()) * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3181, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dict)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dict)); @@ -60813,10 +62247,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4Dict_7related_2gener __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3181, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_related); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3181, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_related); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); @@ -60830,17 +62264,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4Dict_7related_2gener __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3181, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3242, __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(1, 3181, __pyx_L1_error) + else __PYX_ERR(1, 3242, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":3178 + /* "dependency_injector/providers.pyx":3239 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -60868,7 +62302,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_4Dict_7related_2gener return __pyx_r; } -/* "dependency_injector/providers.pyx":3183 +/* "dependency_injector/providers.pyx":3244 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -60899,7 +62333,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Dict__provide(struct if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3183, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_4Dict_13_provide)) { __Pyx_XDECREF(__pyx_r); @@ -60919,7 +62353,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Dict__provide(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3183, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3244, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -60927,13 +62361,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Dict__provide(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3183, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3244, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3183, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -60944,7 +62378,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Dict__provide(struct __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3183, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -60967,7 +62401,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Dict__provide(struct #endif } - /* "dependency_injector/providers.pyx":3185 + /* "dependency_injector/providers.pyx":3246 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" * return __provide_keyword_args(kwargs, self.__kwargs, self.__kwargs_len) # <<<<<<<<<<<<<< @@ -60977,14 +62411,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_4Dict__provide(struct __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_kwargs, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3185, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_kwargs, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3183 + /* "dependency_injector/providers.pyx":3244 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -61042,11 +62476,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_4Dict_13_provide(PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3183, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3244, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3183, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3244, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -61059,14 +62493,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_4Dict_13_provide(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3183, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3244, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Dict._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3183, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3183, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3244, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3244, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_4Dict_12_provide(((struct __pyx_obj_19dependency_injector_9providers_Dict *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -61087,7 +62521,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_12_provide(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_4Dict__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3183, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_4Dict__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -61431,18 +62865,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4Dict_16__setstate_cy return __pyx_r; } -/* "dependency_injector/providers.pyx":3191 +/* "dependency_injector/providers.pyx":3252 * """Resource provider provides a component with initialization and shutdown.""" * - * def __init__(self, initializer, *args, **kwargs): # <<<<<<<<<<<<<< - * self.__initializer = initializer - * self.__initialized = False + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< + * self.__provides = None + * self.set_provides(provides) */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_8Resource_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_19dependency_injector_9providers_8Resource_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_initializer = 0; + PyObject *__pyx_v_provides = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -61465,8 +62899,9 @@ static int __pyx_pw_19dependency_injector_9providers_8Resource_1__init__(PyObjec __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_initializer,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -61479,23 +62914,26 @@ static int __pyx_pw_19dependency_injector_9providers_8Resource_1__init__(PyObjec kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initializer)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 3191, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 3252, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } } - __pyx_v_initializer = values[0]; + __pyx_v_provides = values[0]; } goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3191, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -61503,7 +62941,7 @@ static int __pyx_pw_19dependency_injector_9providers_8Resource_1__init__(PyObjec __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource___init__(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_initializer, __pyx_v_args, __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource___init__(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_provides, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -61512,7 +62950,7 @@ static int __pyx_pw_19dependency_injector_9providers_8Resource_1__init__(PyObjec return __pyx_r; } -static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_initializer, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -61523,30 +62961,56 @@ static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":3192 + /* "dependency_injector/providers.pyx":3253 + * + * def __init__(self, provides=None, *args, **kwargs): + * self.__provides = None # <<<<<<<<<<<<<< + * self.set_provides(provides) * - * def __init__(self, initializer, *args, **kwargs): - * self.__initializer = initializer # <<<<<<<<<<<<<< - * self.__initialized = False - * self.__resource = None */ - __Pyx_INCREF(__pyx_v_initializer); - __Pyx_GIVEREF(__pyx_v_initializer); - __Pyx_GOTREF(__pyx_v_self->__pyx___initializer); - __Pyx_DECREF(__pyx_v_self->__pyx___initializer); - __pyx_v_self->__pyx___initializer = __pyx_v_initializer; + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = Py_None; - /* "dependency_injector/providers.pyx":3193 - * def __init__(self, initializer, *args, **kwargs): - * self.__initializer = initializer + /* "dependency_injector/providers.pyx":3254 + * def __init__(self, provides=None, *args, **kwargs): + * self.__provides = None + * self.set_provides(provides) # <<<<<<<<<<<<<< + * + * self.__initialized = False + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3254, __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_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_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":3256 + * self.set_provides(provides) + * * self.__initialized = False # <<<<<<<<<<<<<< * self.__resource = None * self.__shutdowner = None */ __pyx_v_self->__pyx___initialized = 0; - /* "dependency_injector/providers.pyx":3194 - * self.__initializer = initializer + /* "dependency_injector/providers.pyx":3257 + * * self.__initialized = False * self.__resource = None # <<<<<<<<<<<<<< * self.__shutdowner = None @@ -61558,7 +63022,7 @@ static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct _ __Pyx_DECREF(__pyx_v_self->__pyx___resource); __pyx_v_self->__pyx___resource = Py_None; - /* "dependency_injector/providers.pyx":3195 + /* "dependency_injector/providers.pyx":3258 * self.__initialized = False * self.__resource = None * self.__shutdowner = None # <<<<<<<<<<<<<< @@ -61571,14 +63035,14 @@ static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct _ __Pyx_DECREF(__pyx_v_self->__pyx___shutdowner); __pyx_v_self->__pyx___shutdowner = Py_None; - /* "dependency_injector/providers.pyx":3197 + /* "dependency_injector/providers.pyx":3260 * self.__shutdowner = None * * self.__args = tuple() # <<<<<<<<<<<<<< * self.__args_len = 0 * self.set_args(*args) */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3197, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -61586,7 +63050,7 @@ static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct _ __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3198 + /* "dependency_injector/providers.pyx":3261 * * self.__args = tuple() * self.__args_len = 0 # <<<<<<<<<<<<<< @@ -61595,28 +63059,28 @@ static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct _ */ __pyx_v_self->__pyx___args_len = 0; - /* "dependency_injector/providers.pyx":3199 + /* "dependency_injector/providers.pyx":3262 * self.__args = tuple() * self.__args_len = 0 * self.set_args(*args) # <<<<<<<<<<<<<< * * self.__kwargs = tuple() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3199, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3199, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3201 + /* "dependency_injector/providers.pyx":3264 * self.set_args(*args) * * self.__kwargs = tuple() # <<<<<<<<<<<<<< * self.__kwargs_len = 0 * self.set_kwargs(**kwargs) */ - __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3201, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -61624,7 +63088,7 @@ static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct _ __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3202 + /* "dependency_injector/providers.pyx":3265 * * self.__kwargs = tuple() * self.__kwargs_len = 0 # <<<<<<<<<<<<<< @@ -61633,28 +63097,28 @@ static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct _ */ __pyx_v_self->__pyx___kwargs_len = 0; - /* "dependency_injector/providers.pyx":3203 + /* "dependency_injector/providers.pyx":3266 * self.__kwargs = tuple() * self.__kwargs_len = 0 * self.set_kwargs(**kwargs) # <<<<<<<<<<<<<< * * super().__init__() */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3203, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3203, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3205 + /* "dependency_injector/providers.pyx":3268 * self.set_kwargs(**kwargs) * * super().__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3205, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource)); @@ -61662,10 +63126,10 @@ static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct _ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3205, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3205, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -61680,17 +63144,17 @@ static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct _ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3205, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3191 + /* "dependency_injector/providers.pyx":3252 * """Resource provider provides a component with initialization and shutdown.""" * - * def __init__(self, initializer, *args, **kwargs): # <<<<<<<<<<<<<< - * self.__initializer = initializer - * self.__initialized = False + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< + * self.__provides = None + * self.set_provides(provides) */ /* function exit code */ @@ -61707,7 +63171,7 @@ static int __pyx_pf_19dependency_injector_9providers_8Resource___init__(struct _ return __pyx_r; } -/* "dependency_injector/providers.pyx":3207 +/* "dependency_injector/providers.pyx":3270 * super().__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -61740,22 +63204,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy int __pyx_t_5; int __pyx_t_6; struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7; - PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":3209 + /* "dependency_injector/providers.pyx":3272 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3209, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3209, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -61770,13 +63233,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3209, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3210 + /* "dependency_injector/providers.pyx":3273 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -61787,7 +63250,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":3211 + /* "dependency_injector/providers.pyx":3274 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -61799,7 +63262,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3210 + /* "dependency_injector/providers.pyx":3273 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -61808,7 +63271,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy */ } - /* "dependency_injector/providers.pyx":3213 + /* "dependency_injector/providers.pyx":3276 * return copied * * if self.__initialized: # <<<<<<<<<<<<<< @@ -61818,14 +63281,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy __pyx_t_6 = (__pyx_v_self->__pyx___initialized != 0); if (unlikely(__pyx_t_6)) { - /* "dependency_injector/providers.pyx":3214 + /* "dependency_injector/providers.pyx":3277 * * if self.__initialized: * raise Error('Can not copy initialized resource') # <<<<<<<<<<<<<< * - * copied = self.__class__( + * copied = _memorized_duplicate(self, memo) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3214, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -61839,14 +63302,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Can_not_copy_initialized_resourc) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Can_not_copy_initialized_resourc); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3214, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 3214, __pyx_L1_error) + __PYX_ERR(1, 3277, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3213 + /* "dependency_injector/providers.pyx":3276 * return copied * * if self.__initialized: # <<<<<<<<<<<<<< @@ -61855,116 +63318,126 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy */ } - /* "dependency_injector/providers.pyx":3216 + /* "dependency_injector/providers.pyx":3279 * raise Error('Can not copy initialized resource') * - * copied = self.__class__( # <<<<<<<<<<<<<< - * self.__initializer, - * *deepcopy(self.args, memo), + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_args(*deepcopy(self.args, memo)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3216, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3279, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3217 + /* "dependency_injector/providers.pyx":3280 * - * copied = self.__class__( - * self.__initializer, # <<<<<<<<<<<<<< - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo), + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(_copy_if_provider(self.provides, memo)) # <<<<<<<<<<<<<< + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3216, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_self->__pyx___initializer); - __Pyx_GIVEREF(__pyx_v_self->__pyx___initializer); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->__pyx___initializer); - - /* "dependency_injector/providers.pyx":3218 - * copied = self.__class__( - * self.__initializer, - * *deepcopy(self.args, memo), # <<<<<<<<<<<<<< - * **deepcopy(self.kwargs, memo), - * ) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3218, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3218, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3280, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers__copy_if_provider(__pyx_t_3, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3280, __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 && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_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(1, 3280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":3281 + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_args(*deepcopy(self.args, memo)) # <<<<<<<<<<<<<< + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3281, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3218, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "dependency_injector/providers.pyx":3216 - * raise Error('Can not copy initialized resource') - * - * copied = self.__class__( # <<<<<<<<<<<<<< - * self.__initializer, - * *deepcopy(self.args, memo), - */ - __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3216, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3216, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3219 - * self.__initializer, - * *deepcopy(self.args, memo), - * **deepcopy(self.kwargs, memo), # <<<<<<<<<<<<<< - * ) + /* "dependency_injector/providers.pyx":3282 + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< + * * self._copy_overridings(copied, memo) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3219, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3282, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__pyx_t_8 == Py_None)) { - PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 3219, __pyx_L1_error) - } - if (likely(PyDict_CheckExact(__pyx_t_8))) { - __pyx_t_3 = PyDict_Copy(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else { - __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3216, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - - /* "dependency_injector/providers.pyx":3216 - * raise Error('Can not copy initialized resource') - * - * copied = self.__class__( # <<<<<<<<<<<<<< - * self.__initializer, - * *deepcopy(self.args, memo), - */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3216, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_3 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(1, 3282, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_t_3))) { + __pyx_t_2 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_8); - __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":3221 - * **deepcopy(self.kwargs, memo), - * ) + /* "dependency_injector/providers.pyx":3284 + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) + * * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3221, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3221, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3284, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3284, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_Resource *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":3223 + /* "dependency_injector/providers.pyx":3286 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -61976,7 +63449,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3207 + /* "dependency_injector/providers.pyx":3270 * super().__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -61990,7 +63463,6 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("dependency_injector.providers.Resource.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -62000,7 +63472,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_2__deepcopy return __pyx_r; } -/* "dependency_injector/providers.pyx":3225 +/* "dependency_injector/providers.pyx":3288 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -62035,24 +63507,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4__str__(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":3230 + /* "dependency_injector/providers.pyx":3293 * :rtype: str * """ - * return represent_provider(provider=self, provides=self.__initializer) # <<<<<<<<<<<<<< + * return represent_provider(provider=self, provides=self.provides) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_v_self->__pyx___initializer; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3230, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3225 + /* "dependency_injector/providers.pyx":3288 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -62072,50 +63544,50 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4__str__(st return __pyx_r; } -/* "dependency_injector/providers.pyx":3233 +/* "dependency_injector/providers.pyx":3296 * * @property - * def initializer(self): # <<<<<<<<<<<<<< - * """Return initializer.""" - * return self.__initializer + * def provides(self): # <<<<<<<<<<<<<< + * """Return provider's provides.""" + * return self.__provides */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_11initializer_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_11initializer_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_8provides_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_8provides_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_11initializer___get__(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_8provides___get__(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_11initializer___get__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3235 - * def initializer(self): - * """Return initializer.""" - * return self.__initializer # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":3298 + * def provides(self): + * """Return provider's provides.""" + * return self.__provides # <<<<<<<<<<<<<< * - * @property + * def set_provides(self, provides): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->__pyx___initializer); - __pyx_r = __pyx_v_self->__pyx___initializer; + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __pyx_r = __pyx_v_self->__pyx___provides; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3233 + /* "dependency_injector/providers.pyx":3296 * * @property - * def initializer(self): # <<<<<<<<<<<<<< - * """Return initializer.""" - * return self.__initializer + * def provides(self): # <<<<<<<<<<<<<< + * """Return provider's provides.""" + * return self.__provides */ /* function exit code */ @@ -62125,7 +63597,74 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_11initializ return __pyx_r; } -/* "dependency_injector/providers.pyx":3238 +/* "dependency_injector/providers.pyx":3300 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_7set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Resource_6set_provides[] = "Set provider's provides."; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_7set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_6set_provides(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), ((PyObject *)__pyx_v_provides)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6set_provides(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides", 0); + + /* "dependency_injector/providers.pyx":3302 + * def set_provides(self, provides): + * """Set provider's provides.""" + * self.__provides = provides # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_provides); + __Pyx_GIVEREF(__pyx_v_provides); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = __pyx_v_provides; + + /* "dependency_injector/providers.pyx":3303 + * """Set provider's provides.""" + * self.__provides = provides + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":3300 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":3306 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -62162,19 +63701,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4args___get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3244 + /* "dependency_injector/providers.pyx":3312 * cdef list args * * args = list() # <<<<<<<<<<<<<< * for index in range(self.__args_len): * arg = self.__args[index] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3244, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3245 + /* "dependency_injector/providers.pyx":3313 * * args = list() * for index in range(self.__args_len): # <<<<<<<<<<<<<< @@ -62186,7 +63725,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4args___get for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pyx":3246 + /* "dependency_injector/providers.pyx":3314 * args = list() * for index in range(self.__args_len): * arg = self.__args[index] # <<<<<<<<<<<<<< @@ -62195,15 +63734,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4args___get */ if (unlikely(__pyx_v_self->__pyx___args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 3246, __pyx_L1_error) + __PYX_ERR(1, 3314, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3246, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_PositionalInjection))))) __PYX_ERR(1, 3246, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_PositionalInjection))))) __PYX_ERR(1, 3314, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_arg, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3247 + /* "dependency_injector/providers.pyx":3315 * for index in range(self.__args_len): * arg = self.__args[index] * args.append(arg.__value) # <<<<<<<<<<<<<< @@ -62212,11 +63751,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4args___get */ __pyx_t_1 = __pyx_v_arg->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 3247, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 3315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":3248 + /* "dependency_injector/providers.pyx":3316 * arg = self.__args[index] * args.append(arg.__value) * return tuple(args) # <<<<<<<<<<<<<< @@ -62224,13 +63763,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4args___get * def add_args(self, *args): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3248, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3238 + /* "dependency_injector/providers.pyx":3306 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -62251,7 +63790,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4args___get return __pyx_r; } -/* "dependency_injector/providers.pyx":3250 +/* "dependency_injector/providers.pyx":3318 * return tuple(args) * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -62260,9 +63799,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_4args___get */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Resource_6add_args[] = "Add positional argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_9add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Resource_8add_args[] = "Add positional argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_9add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -62270,7 +63809,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_7add_args(P if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_args", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_6add_args(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_args); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_8add_args(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -62278,7 +63817,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_7add_args(P return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6add_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8add_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -62289,16 +63828,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6add_args(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_args", 0); - /* "dependency_injector/providers.pyx":3255 + /* "dependency_injector/providers.pyx":3323 * :return: Reference ``self`` * """ * self.__args += parse_positional_injections(args) # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3255, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3255, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -62307,7 +63846,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6add_args(s __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3256 + /* "dependency_injector/providers.pyx":3324 * """ * self.__args += parse_positional_injections(args) * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -62318,13 +63857,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6add_args(s __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3256, __pyx_L1_error) + __PYX_ERR(1, 3324, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3256, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3324, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_3; - /* "dependency_injector/providers.pyx":3257 + /* "dependency_injector/providers.pyx":3325 * self.__args += parse_positional_injections(args) * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -62336,7 +63875,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6add_args(s __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3250 + /* "dependency_injector/providers.pyx":3318 * return tuple(args) * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -62356,7 +63895,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6add_args(s return __pyx_r; } -/* "dependency_injector/providers.pyx":3259 +/* "dependency_injector/providers.pyx":3327 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -62365,9 +63904,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6add_args(s */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Resource_8set_args[] = "Set positional argument injections.\n\n Existing positional argument injections are dropped.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_11set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Resource_10set_args[] = "Set positional argument injections.\n\n Existing positional argument injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_11set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -62375,7 +63914,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_9set_args(P if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_args", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_8set_args(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_args); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_10set_args(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -62383,7 +63922,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_9set_args(P return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8set_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_10set_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -62393,14 +63932,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8set_args(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_args", 0); - /* "dependency_injector/providers.pyx":3266 + /* "dependency_injector/providers.pyx":3334 * :return: Reference ``self`` * """ * self.__args = parse_positional_injections(args) # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3266, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -62408,7 +63947,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8set_args(s __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3267 + /* "dependency_injector/providers.pyx":3335 * """ * self.__args = parse_positional_injections(args) * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -62419,13 +63958,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8set_args(s __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3267, __pyx_L1_error) + __PYX_ERR(1, 3335, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3267, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3335, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":3268 + /* "dependency_injector/providers.pyx":3336 * self.__args = parse_positional_injections(args) * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -62437,7 +63976,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8set_args(s __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3259 + /* "dependency_injector/providers.pyx":3327 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -62456,7 +63995,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8set_args(s return __pyx_r; } -/* "dependency_injector/providers.pyx":3270 +/* "dependency_injector/providers.pyx":3338 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -62465,20 +64004,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_8set_args(s */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Resource_10clear_args[] = "Drop positional argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_13clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Resource_12clear_args[] = "Drop positional argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_13clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_args (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_10clear_args(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_12clear_args(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_10clear_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_12clear_args(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -62488,14 +64027,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_10clear_arg int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_args", 0); - /* "dependency_injector/providers.pyx":3275 + /* "dependency_injector/providers.pyx":3343 * :return: Reference ``self`` * """ * self.__args = tuple() # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3275, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -62503,7 +64042,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_10clear_arg __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3276 + /* "dependency_injector/providers.pyx":3344 * """ * self.__args = tuple() * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -62514,13 +64053,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_10clear_arg __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3276, __pyx_L1_error) + __PYX_ERR(1, 3344, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3276, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":3277 + /* "dependency_injector/providers.pyx":3345 * self.__args = tuple() * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -62532,7 +64071,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_10clear_arg __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3270 + /* "dependency_injector/providers.pyx":3338 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -62551,7 +64090,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_10clear_arg return __pyx_r; } -/* "dependency_injector/providers.pyx":3280 +/* "dependency_injector/providers.pyx":3348 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -62587,19 +64126,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6kwargs___g int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3286 + /* "dependency_injector/providers.pyx":3354 * cdef dict kwargs * * kwargs = dict() # <<<<<<<<<<<<<< * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3286, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3287 + /* "dependency_injector/providers.pyx":3355 * * kwargs = dict() * for index in range(self.__kwargs_len): # <<<<<<<<<<<<<< @@ -62611,7 +64150,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6kwargs___g for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pyx":3288 + /* "dependency_injector/providers.pyx":3356 * kwargs = dict() * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] # <<<<<<<<<<<<<< @@ -62620,15 +64159,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6kwargs___g */ if (unlikely(__pyx_v_self->__pyx___kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 3288, __pyx_L1_error) + __PYX_ERR(1, 3356, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3288, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 3288, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 3356, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_kwarg, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3289 + /* "dependency_injector/providers.pyx":3357 * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] * kwargs[kwarg.__name] = kwarg.__value # <<<<<<<<<<<<<< @@ -62637,11 +64176,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6kwargs___g */ __pyx_t_1 = __pyx_v_kwarg->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_1); - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 3289, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 3357, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":3290 + /* "dependency_injector/providers.pyx":3358 * kwarg = self.__kwargs[index] * kwargs[kwarg.__name] = kwarg.__value * return kwargs # <<<<<<<<<<<<<< @@ -62653,7 +64192,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6kwargs___g __pyx_r = __pyx_v_kwargs; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3280 + /* "dependency_injector/providers.pyx":3348 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -62674,7 +64213,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6kwargs___g return __pyx_r; } -/* "dependency_injector/providers.pyx":3292 +/* "dependency_injector/providers.pyx":3360 * return kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -62683,9 +64222,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_6kwargs___g */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Resource_12add_kwargs[] = "Add keyword argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_15add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Resource_14add_kwargs[] = "Add keyword argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_15add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -62695,7 +64234,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_13add_kwarg if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_kwargs", 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_r = __pyx_pf_19dependency_injector_9providers_8Resource_12add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_14add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -62703,7 +64242,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_13add_kwarg return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_14add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -62714,16 +64253,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_12add_kwarg int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_kwargs", 0); - /* "dependency_injector/providers.pyx":3297 + /* "dependency_injector/providers.pyx":3365 * :return: Reference ``self`` * """ * self.__kwargs += parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3297, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3297, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -62732,7 +64271,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_12add_kwarg __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3298 + /* "dependency_injector/providers.pyx":3366 * """ * self.__kwargs += parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -62743,13 +64282,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_12add_kwarg __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3298, __pyx_L1_error) + __PYX_ERR(1, 3366, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3298, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3366, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_3; - /* "dependency_injector/providers.pyx":3299 + /* "dependency_injector/providers.pyx":3367 * self.__kwargs += parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) * return self # <<<<<<<<<<<<<< @@ -62761,7 +64300,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_12add_kwarg __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3292 + /* "dependency_injector/providers.pyx":3360 * return kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -62781,7 +64320,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_12add_kwarg return __pyx_r; } -/* "dependency_injector/providers.pyx":3301 +/* "dependency_injector/providers.pyx":3369 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -62790,9 +64329,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_12add_kwarg */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Resource_14set_kwargs[] = "Set keyword argument injections.\n\n Existing keyword argument injections are dropped.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_17set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Resource_16set_kwargs[] = "Set keyword argument injections.\n\n Existing keyword argument injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_17set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -62802,7 +64341,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_15set_kwarg if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_kwargs", 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_r = __pyx_pf_19dependency_injector_9providers_8Resource_14set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_16set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); @@ -62810,7 +64349,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_15set_kwarg return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_16set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -62820,14 +64359,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_14set_kwarg int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_kwargs", 0); - /* "dependency_injector/providers.pyx":3308 + /* "dependency_injector/providers.pyx":3376 * :return: Reference ``self`` * """ * self.__kwargs = parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3308, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -62835,7 +64374,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_14set_kwarg __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3309 + /* "dependency_injector/providers.pyx":3377 * """ * self.__kwargs = parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -62846,13 +64385,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_14set_kwarg __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3309, __pyx_L1_error) + __PYX_ERR(1, 3377, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3309, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3377, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":3310 + /* "dependency_injector/providers.pyx":3378 * self.__kwargs = parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) * return self # <<<<<<<<<<<<<< @@ -62864,7 +64403,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_14set_kwarg __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3301 + /* "dependency_injector/providers.pyx":3369 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -62883,7 +64422,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_14set_kwarg return __pyx_r; } -/* "dependency_injector/providers.pyx":3312 +/* "dependency_injector/providers.pyx":3380 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -62892,20 +64431,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_14set_kwarg */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Resource_16clear_kwargs[] = "Drop keyword argument injections.\n\n :return: Reference ``self``\n "; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_19clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Resource_18clear_kwargs[] = "Drop keyword argument injections.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_19clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_kwargs (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_16clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_18clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_18clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -62915,14 +64454,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_16clear_kwa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_kwargs", 0); - /* "dependency_injector/providers.pyx":3317 + /* "dependency_injector/providers.pyx":3385 * :return: Reference ``self`` * """ * self.__kwargs = tuple() # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * return self */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3317, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -62930,7 +64469,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_16clear_kwa __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3318 + /* "dependency_injector/providers.pyx":3386 * """ * self.__kwargs = tuple() * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -62941,13 +64480,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_16clear_kwa __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3318, __pyx_L1_error) + __PYX_ERR(1, 3386, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3318, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":3319 + /* "dependency_injector/providers.pyx":3387 * self.__kwargs = tuple() * self.__kwargs_len = len(self.__kwargs) * return self # <<<<<<<<<<<<<< @@ -62959,7 +64498,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_16clear_kwa __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3312 + /* "dependency_injector/providers.pyx":3380 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -62978,7 +64517,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_16clear_kwa return __pyx_r; } -/* "dependency_injector/providers.pyx":3322 +/* "dependency_injector/providers.pyx":3390 * * @property * def initialized(self): # <<<<<<<<<<<<<< @@ -63008,7 +64547,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_11initializ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3324 + /* "dependency_injector/providers.pyx":3392 * def initialized(self): * """Check if resource is initialized.""" * return self.__initialized # <<<<<<<<<<<<<< @@ -63016,13 +64555,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_11initializ * def init(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3324, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3322 + /* "dependency_injector/providers.pyx":3390 * * @property * def initialized(self): # <<<<<<<<<<<<<< @@ -63041,7 +64580,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_11initializ return __pyx_r; } -/* "dependency_injector/providers.pyx":3326 +/* "dependency_injector/providers.pyx":3394 * return self.__initialized * * def init(self): # <<<<<<<<<<<<<< @@ -63050,20 +64589,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_11initializ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_19init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Resource_18init[] = "Initialize resource."; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_19init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_21init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Resource_20init[] = "Initialize resource."; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_21init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("init (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_18init(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_20init(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_18init(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20init(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -63074,7 +64613,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_18init(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init", 0); - /* "dependency_injector/providers.pyx":3328 + /* "dependency_injector/providers.pyx":3396 * def init(self): * """Initialize resource.""" * return self.__call__() # <<<<<<<<<<<<<< @@ -63082,7 +64621,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_18init(stru * def shutdown(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3328, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -63096,14 +64635,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_18init(stru } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3328, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3326 + /* "dependency_injector/providers.pyx":3394 * return self.__initialized * * def init(self): # <<<<<<<<<<<<<< @@ -63124,7 +64663,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_18init(stru return __pyx_r; } -/* "dependency_injector/providers.pyx":3330 +/* "dependency_injector/providers.pyx":3398 * return self.__call__() * * def shutdown(self): # <<<<<<<<<<<<<< @@ -63133,20 +64672,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_18init(stru */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_21shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Resource_20shutdown[] = "Shutdown resource."; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_21shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_23shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Resource_22shutdown[] = "Shutdown resource."; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_23shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("shutdown (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_20shutdown(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_22shutdown(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_22shutdown(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_shutdown = NULL; PyObject *__pyx_r = NULL; @@ -63164,7 +64703,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("shutdown", 0); - /* "dependency_injector/providers.pyx":3332 + /* "dependency_injector/providers.pyx":3400 * def shutdown(self): * """Shutdown resource.""" * if not self.__initialized: # <<<<<<<<<<<<<< @@ -63174,14 +64713,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( __pyx_t_1 = ((!(__pyx_v_self->__pyx___initialized != 0)) != 0); if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":3333 + /* "dependency_injector/providers.pyx":3401 * """Shutdown resource.""" * if not self.__initialized: * if self.is_async_mode_enabled(): # <<<<<<<<<<<<<< * result = asyncio.Future() * result.set_result(None) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_enabled); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3333, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_enabled); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -63195,23 +64734,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( } __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, 3333, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3333, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":3334 + /* "dependency_injector/providers.pyx":3402 * if not self.__initialized: * if self.is_async_mode_enabled(): * result = asyncio.Future() # <<<<<<<<<<<<<< * result.set_result(None) * return result */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3334, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3334, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -63226,20 +64765,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3334, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3335 + /* "dependency_injector/providers.pyx":3403 * if self.is_async_mode_enabled(): * result = asyncio.Future() * result.set_result(None) # <<<<<<<<<<<<<< * return result * return */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3335, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -63253,12 +64792,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_None); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3335, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3336 + /* "dependency_injector/providers.pyx":3404 * result = asyncio.Future() * result.set_result(None) * return result # <<<<<<<<<<<<<< @@ -63270,7 +64809,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3333 + /* "dependency_injector/providers.pyx":3401 * """Shutdown resource.""" * if not self.__initialized: * if self.is_async_mode_enabled(): # <<<<<<<<<<<<<< @@ -63279,7 +64818,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( */ } - /* "dependency_injector/providers.pyx":3337 + /* "dependency_injector/providers.pyx":3405 * result.set_result(None) * return result * return # <<<<<<<<<<<<<< @@ -63290,7 +64829,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3332 + /* "dependency_injector/providers.pyx":3400 * def shutdown(self): * """Shutdown resource.""" * if not self.__initialized: # <<<<<<<<<<<<<< @@ -63299,17 +64838,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( */ } - /* "dependency_injector/providers.pyx":3339 + /* "dependency_injector/providers.pyx":3407 * return * * if self.__shutdowner: # <<<<<<<<<<<<<< * try: * shutdown = self.__shutdowner(self.__resource) */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___shutdowner); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3339, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___shutdowner); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3407, __pyx_L1_error) if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":3340 + /* "dependency_injector/providers.pyx":3408 * * if self.__shutdowner: * try: # <<<<<<<<<<<<<< @@ -63325,7 +64864,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "dependency_injector/providers.pyx":3341 + /* "dependency_injector/providers.pyx":3409 * if self.__shutdowner: * try: * shutdown = self.__shutdowner(self.__resource) # <<<<<<<<<<<<<< @@ -63345,13 +64884,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_self->__pyx___resource) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->__pyx___resource); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3341, __pyx_L6_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3409, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_shutdown = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3340 + /* "dependency_injector/providers.pyx":3408 * * if self.__shutdowner: * try: # <<<<<<<<<<<<<< @@ -63360,7 +64899,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( */ } - /* "dependency_injector/providers.pyx":3345 + /* "dependency_injector/providers.pyx":3413 * pass * else: * if inspect.isawaitable(shutdown): # <<<<<<<<<<<<<< @@ -63368,9 +64907,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( * */ /*else:*/ { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_inspect); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3345, __pyx_L8_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_inspect); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3413, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isawaitable); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3345, __pyx_L8_except_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isawaitable); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3413, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -63385,14 +64924,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_shutdown) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_shutdown); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3345, __pyx_L8_except_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3413, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3345, __pyx_L8_except_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3413, __pyx_L8_except_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":3346 + /* "dependency_injector/providers.pyx":3414 * else: * if inspect.isawaitable(shutdown): * return self._create_shutdown_future(shutdown) # <<<<<<<<<<<<<< @@ -63400,7 +64939,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( * self.__resource = None */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_shutdown_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3346, __pyx_L8_except_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_shutdown_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3414, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -63414,14 +64953,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_shutdown) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_shutdown); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3346, __pyx_L8_except_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3414, __pyx_L8_except_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_L9_except_return; - /* "dependency_injector/providers.pyx":3345 + /* "dependency_injector/providers.pyx":3413 * pass * else: * if inspect.isawaitable(shutdown): # <<<<<<<<<<<<<< @@ -63439,7 +64978,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3342 + /* "dependency_injector/providers.pyx":3410 * try: * shutdown = self.__shutdowner(self.__resource) * except StopIteration: # <<<<<<<<<<<<<< @@ -63454,7 +64993,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( goto __pyx_L8_except_error; __pyx_L8_except_error:; - /* "dependency_injector/providers.pyx":3340 + /* "dependency_injector/providers.pyx":3408 * * if self.__shutdowner: * try: # <<<<<<<<<<<<<< @@ -63480,7 +65019,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( __pyx_L11_try_end:; } - /* "dependency_injector/providers.pyx":3339 + /* "dependency_injector/providers.pyx":3407 * return * * if self.__shutdowner: # <<<<<<<<<<<<<< @@ -63489,7 +65028,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( */ } - /* "dependency_injector/providers.pyx":3348 + /* "dependency_injector/providers.pyx":3416 * return self._create_shutdown_future(shutdown) * * self.__resource = None # <<<<<<<<<<<<<< @@ -63502,7 +65041,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( __Pyx_DECREF(__pyx_v_self->__pyx___resource); __pyx_v_self->__pyx___resource = Py_None; - /* "dependency_injector/providers.pyx":3349 + /* "dependency_injector/providers.pyx":3417 * * self.__resource = None * self.__initialized = False # <<<<<<<<<<<<<< @@ -63511,7 +65050,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( */ __pyx_v_self->__pyx___initialized = 0; - /* "dependency_injector/providers.pyx":3350 + /* "dependency_injector/providers.pyx":3418 * self.__resource = None * self.__initialized = False * self.__shutdowner = None # <<<<<<<<<<<<<< @@ -63524,14 +65063,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( __Pyx_DECREF(__pyx_v_self->__pyx___shutdowner); __pyx_v_self->__pyx___shutdowner = Py_None; - /* "dependency_injector/providers.pyx":3352 + /* "dependency_injector/providers.pyx":3420 * self.__shutdowner = None * * if self.is_async_mode_enabled(): # <<<<<<<<<<<<<< * result = asyncio.Future() * result.set_result(None) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_enabled); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3352, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_enabled); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -63545,23 +65084,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( } __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, 3352, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3352, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3420, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":3353 + /* "dependency_injector/providers.pyx":3421 * * if self.is_async_mode_enabled(): * result = asyncio.Future() # <<<<<<<<<<<<<< * result.set_result(None) * return result */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3353, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3353, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -63576,20 +65115,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3353, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3354 + /* "dependency_injector/providers.pyx":3422 * if self.is_async_mode_enabled(): * result = asyncio.Future() * result.set_result(None) # <<<<<<<<<<<<<< * return result * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3354, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -63603,12 +65142,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_4, Py_None); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3354, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3355 + /* "dependency_injector/providers.pyx":3423 * result = asyncio.Future() * result.set_result(None) * return result # <<<<<<<<<<<<<< @@ -63620,7 +65159,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3352 + /* "dependency_injector/providers.pyx":3420 * self.__shutdowner = None * * if self.is_async_mode_enabled(): # <<<<<<<<<<<<<< @@ -63629,7 +65168,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( */ } - /* "dependency_injector/providers.pyx":3330 + /* "dependency_injector/providers.pyx":3398 * return self.__call__() * * def shutdown(self): # <<<<<<<<<<<<<< @@ -63655,12 +65194,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_20shutdown( } static PyObject *__pyx_gb_19dependency_injector_9providers_8Resource_7related_2generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":3358 +/* "dependency_injector/providers.pyx":3426 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield from filter(is_provider, [self.__initializer]) + * yield from filter(is_provider, [self.provides]) */ /* Python wrapper */ @@ -63688,7 +65227,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_7related___ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_15___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 3358, __pyx_L1_error) + __PYX_ERR(1, 3426, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -63696,7 +65235,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_7related___ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_8Resource_7related_2generator13, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Resource___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3358, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_8Resource_7related_2generator13, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Resource___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3426, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -63736,35 +65275,37 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Resource_7related_2g return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3358, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3426, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3360 + /* "dependency_injector/providers.pyx":3428 * def related(self): * """Return related providers generator.""" - * yield from filter(is_provider, [self.__initializer]) # <<<<<<<<<<<<<< + * yield from filter(is_provider, [self.provides]) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3360, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3360, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->__pyx___initializer); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->__pyx___initializer); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_self->__pyx___initializer); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3360, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); - __pyx_t_1 = 0; + PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3360, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); @@ -63774,39 +65315,39 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Resource_7related_2g __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3360, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3428, __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(1, 3360, __pyx_L1_error) + else __PYX_ERR(1, 3428, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":3361 + /* "dependency_injector/providers.pyx":3429 * """Return related providers generator.""" - * yield from filter(is_provider, [self.__initializer]) + * yield from filter(is_provider, [self.provides]) * yield from filter(is_provider, self.args) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.kwargs.values()) * yield from super().related */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3361, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3361, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3361, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); - __pyx_t_2 = 0; + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3361, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); @@ -63816,53 +65357,53 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Resource_7related_2g __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3361, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3429, __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(1, 3361, __pyx_L1_error) + else __PYX_ERR(1, 3429, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":3362 - * yield from filter(is_provider, [self.__initializer]) + /* "dependency_injector/providers.pyx":3430 + * yield from filter(is_provider, [self.provides]) * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) # <<<<<<<<<<<<<< * yield from super().related * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3362, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3362, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3362, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_2)) { + __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_2); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3362, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3362, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); - __pyx_t_3 = 0; + __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3362, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -63876,23 +65417,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Resource_7related_2g __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L6_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3362, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3430, __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(1, 3362, __pyx_L1_error) + else __PYX_ERR(1, 3430, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":3363 + /* "dependency_injector/providers.pyx":3431 * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3363, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource)); @@ -63900,10 +65441,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Resource_7related_2g __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3363, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3363, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -63917,22 +65458,22 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Resource_7related_2g __pyx_generator->resume_label = 4; return __pyx_r; __pyx_L7_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3363, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3431, __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(1, 3363, __pyx_L1_error) + else __PYX_ERR(1, 3431, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":3358 + /* "dependency_injector/providers.pyx":3426 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield from filter(is_provider, [self.__initializer]) + * yield from filter(is_provider, [self.provides]) */ /* function exit code */ @@ -63955,7 +65496,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Resource_7related_2g return __pyx_r; } -/* "dependency_injector/providers.pyx":3365 +/* "dependency_injector/providers.pyx":3433 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -63963,7 +65504,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Resource_7related_2g * return self.__resource */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_23_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_25_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) { PyObject *__pyx_v_initializer = NULL; PyObject *__pyx_v_async_init = NULL; @@ -63990,9 +65531,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3365, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Resource_23_provide)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Resource_25_provide)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -64010,7 +65551,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3365, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3433, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -64018,13 +65559,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3365, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3433, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3365, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -64035,7 +65576,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3365, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -64058,7 +65599,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str #endif } - /* "dependency_injector/providers.pyx":3366 + /* "dependency_injector/providers.pyx":3434 * * cpdef object _provide(self, tuple args, dict kwargs): * if self.__initialized: # <<<<<<<<<<<<<< @@ -64068,19 +65609,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_7 = (__pyx_v_self->__pyx___initialized != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":3367 + /* "dependency_injector/providers.pyx":3435 * cpdef object _provide(self, tuple args, dict kwargs): * if self.__initialized: * return self.__resource # <<<<<<<<<<<<<< * - * if self._is_resource_subclass(self.__initializer): + * if self._is_resource_subclass(self.__provides): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->__pyx___resource); __pyx_r = __pyx_v_self->__pyx___resource; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3366 + /* "dependency_injector/providers.pyx":3434 * * cpdef object _provide(self, tuple args, dict kwargs): * if self.__initialized: # <<<<<<<<<<<<<< @@ -64089,14 +65630,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str */ } - /* "dependency_injector/providers.pyx":3369 + /* "dependency_injector/providers.pyx":3437 * return self.__resource * - * if self._is_resource_subclass(self.__initializer): # <<<<<<<<<<<<<< - * initializer = self.__initializer() + * if self._is_resource_subclass(self.__provides): # <<<<<<<<<<<<<< + * initializer = self.__provides() * self.__resource = __call( */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_resource_subclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3369, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_resource_subclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -64108,24 +65649,24 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self->__pyx___initializer) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx___initializer); + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self->__pyx___provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx___provides); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3369, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 3369, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 3437, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":3370 + /* "dependency_injector/providers.pyx":3438 * - * if self._is_resource_subclass(self.__initializer): - * initializer = self.__initializer() # <<<<<<<<<<<<<< + * if self._is_resource_subclass(self.__provides): + * initializer = self.__provides() # <<<<<<<<<<<<<< * self.__resource = __call( * initializer.init, */ - __Pyx_INCREF(__pyx_v_self->__pyx___initializer); - __pyx_t_2 = __pyx_v_self->__pyx___initializer; __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __pyx_t_2 = __pyx_v_self->__pyx___provides; __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)) { @@ -64137,23 +65678,23 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3370, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_initializer = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3372 - * initializer = self.__initializer() + /* "dependency_injector/providers.pyx":3440 + * initializer = self.__provides() * self.__resource = __call( * initializer.init, # <<<<<<<<<<<<<< * args, * self.__args, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3372, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":3374 + /* "dependency_injector/providers.pyx":3442 * initializer.init, * args, * self.__args, # <<<<<<<<<<<<<< @@ -64163,7 +65704,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_2 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pyx":3377 + /* "dependency_injector/providers.pyx":3445 * self.__args_len, * kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -64173,14 +65714,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_3 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":3371 - * if self._is_resource_subclass(self.__initializer): - * initializer = self.__initializer() + /* "dependency_injector/providers.pyx":3439 + * if self._is_resource_subclass(self.__provides): + * initializer = self.__provides() * self.__resource = __call( # <<<<<<<<<<<<<< * initializer.init, * args, */ - __pyx_t_6 = __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); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3371, __pyx_L1_error) + __pyx_t_6 = __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); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3439, __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; @@ -64191,14 +65732,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_v_self->__pyx___resource = __pyx_t_6; __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":3380 + /* "dependency_injector/providers.pyx":3448 * self.__kwargs_len, * ) * self.__shutdowner = initializer.shutdown # <<<<<<<<<<<<<< - * elif self._is_async_resource_subclass(self.__initializer): - * initializer = self.__initializer() + * elif self._is_async_resource_subclass(self.__provides): + * initializer = self.__provides() */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3380, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->__pyx___shutdowner); @@ -64206,24 +65747,24 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_v_self->__pyx___shutdowner = __pyx_t_6; __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":3369 + /* "dependency_injector/providers.pyx":3437 * return self.__resource * - * if self._is_resource_subclass(self.__initializer): # <<<<<<<<<<<<<< - * initializer = self.__initializer() + * if self._is_resource_subclass(self.__provides): # <<<<<<<<<<<<<< + * initializer = self.__provides() * self.__resource = __call( */ goto __pyx_L4; } - /* "dependency_injector/providers.pyx":3381 + /* "dependency_injector/providers.pyx":3449 * ) * self.__shutdowner = initializer.shutdown - * elif self._is_async_resource_subclass(self.__initializer): # <<<<<<<<<<<<<< - * initializer = self.__initializer() + * elif self._is_async_resource_subclass(self.__provides): # <<<<<<<<<<<<<< + * initializer = self.__provides() * async_init = __call( */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_resource_subclass); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3381, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_resource_subclass); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -64235,24 +65776,24 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self->__pyx___initializer) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self->__pyx___initializer); + __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self->__pyx___provides) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self->__pyx___provides); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3381, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 3381, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 3449, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":3382 + /* "dependency_injector/providers.pyx":3450 * self.__shutdowner = initializer.shutdown - * elif self._is_async_resource_subclass(self.__initializer): - * initializer = self.__initializer() # <<<<<<<<<<<<<< + * elif self._is_async_resource_subclass(self.__provides): + * initializer = self.__provides() # <<<<<<<<<<<<<< * async_init = __call( * initializer.init, */ - __Pyx_INCREF(__pyx_v_self->__pyx___initializer); - __pyx_t_3 = __pyx_v_self->__pyx___initializer; __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __pyx_t_3 = __pyx_v_self->__pyx___provides; __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)) { @@ -64264,23 +65805,23 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str } __pyx_t_6 = (__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_6)) __PYX_ERR(1, 3382, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_initializer = __pyx_t_6; __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":3384 - * initializer = self.__initializer() + /* "dependency_injector/providers.pyx":3452 + * initializer = self.__provides() * async_init = __call( * initializer.init, # <<<<<<<<<<<<<< * args, * self.__args, */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_init_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3384, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_init_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "dependency_injector/providers.pyx":3386 + /* "dependency_injector/providers.pyx":3454 * initializer.init, * args, * self.__args, # <<<<<<<<<<<<<< @@ -64290,7 +65831,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_3 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":3389 + /* "dependency_injector/providers.pyx":3457 * self.__args_len, * kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -64300,14 +65841,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_2 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pyx":3383 - * elif self._is_async_resource_subclass(self.__initializer): - * initializer = self.__initializer() + /* "dependency_injector/providers.pyx":3451 + * elif self._is_async_resource_subclass(self.__provides): + * initializer = self.__provides() * async_init = __call( # <<<<<<<<<<<<<< * initializer.init, * args, */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_6, __pyx_v_args, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3383, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_6, __pyx_v_args, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -64315,26 +65856,26 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_v_async_init = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3392 + /* "dependency_injector/providers.pyx":3460 * self.__kwargs_len, * ) * self.__initialized = True # <<<<<<<<<<<<<< * return self._create_init_future(async_init, initializer.shutdown) - * elif inspect.isgeneratorfunction(self.__initializer): + * elif inspect.isgeneratorfunction(self.__provides): */ __pyx_v_self->__pyx___initialized = 1; - /* "dependency_injector/providers.pyx":3393 + /* "dependency_injector/providers.pyx":3461 * ) * self.__initialized = True * return self._create_init_future(async_init, initializer.shutdown) # <<<<<<<<<<<<<< - * elif inspect.isgeneratorfunction(self.__initializer): + * elif inspect.isgeneratorfunction(self.__provides): * initializer = __call( */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_init_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3393, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_init_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3393, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_5 = 0; @@ -64351,7 +65892,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_async_init, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3393, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3461, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -64360,14 +65901,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_async_init, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3393, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3461, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3393, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -64378,7 +65919,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3393, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -64387,25 +65928,25 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3381 + /* "dependency_injector/providers.pyx":3449 * ) * self.__shutdowner = initializer.shutdown - * elif self._is_async_resource_subclass(self.__initializer): # <<<<<<<<<<<<<< - * initializer = self.__initializer() + * elif self._is_async_resource_subclass(self.__provides): # <<<<<<<<<<<<<< + * initializer = self.__provides() * async_init = __call( */ } - /* "dependency_injector/providers.pyx":3394 + /* "dependency_injector/providers.pyx":3462 * self.__initialized = True * return self._create_init_future(async_init, initializer.shutdown) - * elif inspect.isgeneratorfunction(self.__initializer): # <<<<<<<<<<<<<< + * elif inspect.isgeneratorfunction(self.__provides): # <<<<<<<<<<<<<< * initializer = __call( - * self.__initializer, + * self.__provides, */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_inspect); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3394, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_inspect); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isgeneratorfunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3394, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isgeneratorfunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -64418,27 +65959,27 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_self->__pyx___initializer) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->__pyx___initializer); + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_self->__pyx___provides) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->__pyx___provides); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3394, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 3394, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 3462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":3396 - * elif inspect.isgeneratorfunction(self.__initializer): + /* "dependency_injector/providers.pyx":3464 + * elif inspect.isgeneratorfunction(self.__provides): * initializer = __call( - * self.__initializer, # <<<<<<<<<<<<<< + * self.__provides, # <<<<<<<<<<<<<< * args, * self.__args, */ - __pyx_t_1 = __pyx_v_self->__pyx___initializer; + __pyx_t_1 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":3398 - * self.__initializer, + /* "dependency_injector/providers.pyx":3466 + * self.__provides, * args, * self.__args, # <<<<<<<<<<<<<< * self.__args_len, @@ -64447,7 +65988,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_4 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":3401 + /* "dependency_injector/providers.pyx":3469 * self.__args_len, * kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -64457,14 +65998,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_2 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pyx":3395 + /* "dependency_injector/providers.pyx":3463 * return self._create_init_future(async_init, initializer.shutdown) - * elif inspect.isgeneratorfunction(self.__initializer): + * elif inspect.isgeneratorfunction(self.__provides): * initializer = __call( # <<<<<<<<<<<<<< - * self.__initializer, + * self.__provides, * args, */ - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3395, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -64472,14 +66013,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_v_initializer = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3404 + /* "dependency_injector/providers.pyx":3472 * self.__kwargs_len, * ) * self.__resource = next(initializer) # <<<<<<<<<<<<<< * self.__shutdowner = initializer.send - * elif iscoroutinefunction(self.__initializer): + * elif iscoroutinefunction(self.__provides): */ - __pyx_t_3 = __Pyx_PyIter_Next(__pyx_v_initializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3404, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyIter_Next(__pyx_v_initializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->__pyx___resource); @@ -64487,14 +66028,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_v_self->__pyx___resource = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3405 + /* "dependency_injector/providers.pyx":3473 * ) * self.__resource = next(initializer) * self.__shutdowner = initializer.send # <<<<<<<<<<<<<< - * elif iscoroutinefunction(self.__initializer): + * elif iscoroutinefunction(self.__provides): * initializer = __call( */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_send); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3405, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_send); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->__pyx___shutdowner); @@ -64502,24 +66043,24 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_v_self->__pyx___shutdowner = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3394 + /* "dependency_injector/providers.pyx":3462 * self.__initialized = True * return self._create_init_future(async_init, initializer.shutdown) - * elif inspect.isgeneratorfunction(self.__initializer): # <<<<<<<<<<<<<< + * elif inspect.isgeneratorfunction(self.__provides): # <<<<<<<<<<<<<< * initializer = __call( - * self.__initializer, + * self.__provides, */ goto __pyx_L4; } - /* "dependency_injector/providers.pyx":3406 + /* "dependency_injector/providers.pyx":3474 * self.__resource = next(initializer) * self.__shutdowner = initializer.send - * elif iscoroutinefunction(self.__initializer): # <<<<<<<<<<<<<< + * elif iscoroutinefunction(self.__provides): # <<<<<<<<<<<<<< * initializer = __call( - * self.__initializer, + * self.__provides, */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3406, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -64531,27 +66072,27 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_self->__pyx___initializer) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx___initializer); + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_self->__pyx___provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx___provides); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3406, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 3406, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 3474, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":3408 - * elif iscoroutinefunction(self.__initializer): + /* "dependency_injector/providers.pyx":3476 + * elif iscoroutinefunction(self.__provides): * initializer = __call( - * self.__initializer, # <<<<<<<<<<<<<< + * self.__provides, # <<<<<<<<<<<<<< * args, * self.__args, */ - __pyx_t_3 = __pyx_v_self->__pyx___initializer; + __pyx_t_3 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":3410 - * self.__initializer, + /* "dependency_injector/providers.pyx":3478 + * self.__provides, * args, * self.__args, # <<<<<<<<<<<<<< * self.__args_len, @@ -64560,7 +66101,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_2 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pyx":3413 + /* "dependency_injector/providers.pyx":3481 * self.__args_len, * kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -64570,14 +66111,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_4 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":3407 + /* "dependency_injector/providers.pyx":3475 * self.__shutdowner = initializer.send - * elif iscoroutinefunction(self.__initializer): + * elif iscoroutinefunction(self.__provides): * initializer = __call( # <<<<<<<<<<<<<< - * self.__initializer, + * self.__provides, * args, */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_3, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3407, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_3, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3475, __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; @@ -64585,24 +66126,24 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_v_initializer = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3416 + /* "dependency_injector/providers.pyx":3484 * self.__kwargs_len, * ) * self.__initialized = True # <<<<<<<<<<<<<< * return self._create_init_future(initializer) - * elif isasyncgenfunction(self.__initializer): + * elif isasyncgenfunction(self.__provides): */ __pyx_v_self->__pyx___initialized = 1; - /* "dependency_injector/providers.pyx":3417 + /* "dependency_injector/providers.pyx":3485 * ) * self.__initialized = True * return self._create_init_future(initializer) # <<<<<<<<<<<<<< - * elif isasyncgenfunction(self.__initializer): + * elif isasyncgenfunction(self.__provides): * initializer = __call( */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_init_future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3417, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_init_future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -64616,30 +66157,30 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_initializer) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_initializer); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3417, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3406 + /* "dependency_injector/providers.pyx":3474 * self.__resource = next(initializer) * self.__shutdowner = initializer.send - * elif iscoroutinefunction(self.__initializer): # <<<<<<<<<<<<<< + * elif iscoroutinefunction(self.__provides): # <<<<<<<<<<<<<< * initializer = __call( - * self.__initializer, + * self.__provides, */ } - /* "dependency_injector/providers.pyx":3418 + /* "dependency_injector/providers.pyx":3486 * self.__initialized = True * return self._create_init_future(initializer) - * elif isasyncgenfunction(self.__initializer): # <<<<<<<<<<<<<< + * elif isasyncgenfunction(self.__provides): # <<<<<<<<<<<<<< * initializer = __call( - * self.__initializer, + * self.__provides, */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_isasyncgenfunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3418, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_isasyncgenfunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -64651,27 +66192,27 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_self->__pyx___initializer) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->__pyx___initializer); + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_self->__pyx___provides) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->__pyx___provides); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3418, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 3418, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 3486, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":3420 - * elif isasyncgenfunction(self.__initializer): + /* "dependency_injector/providers.pyx":3488 + * elif isasyncgenfunction(self.__provides): * initializer = __call( - * self.__initializer, # <<<<<<<<<<<<<< + * self.__provides, # <<<<<<<<<<<<<< * args, * self.__args, */ - __pyx_t_1 = __pyx_v_self->__pyx___initializer; + __pyx_t_1 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":3422 - * self.__initializer, + /* "dependency_injector/providers.pyx":3490 + * self.__provides, * args, * self.__args, # <<<<<<<<<<<<<< * self.__args_len, @@ -64680,7 +66221,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_4 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":3425 + /* "dependency_injector/providers.pyx":3493 * self.__args_len, * kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -64690,14 +66231,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_2 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pyx":3419 + /* "dependency_injector/providers.pyx":3487 * return self._create_init_future(initializer) - * elif isasyncgenfunction(self.__initializer): + * elif isasyncgenfunction(self.__provides): * initializer = __call( # <<<<<<<<<<<<<< - * self.__initializer, + * self.__provides, * args, */ - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3419, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -64705,24 +66246,24 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_v_initializer = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3428 + /* "dependency_injector/providers.pyx":3496 * self.__kwargs_len, * ) * self.__initialized = True # <<<<<<<<<<<<<< * return self._create_async_gen_init_future(initializer) - * elif callable(self.__initializer): + * elif callable(self.__provides): */ __pyx_v_self->__pyx___initialized = 1; - /* "dependency_injector/providers.pyx":3429 + /* "dependency_injector/providers.pyx":3497 * ) * self.__initialized = True * return self._create_async_gen_init_future(initializer) # <<<<<<<<<<<<<< - * elif callable(self.__initializer): + * elif callable(self.__provides): * self.__resource = __call( */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_async_gen_init_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3429, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_async_gen_init_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -64736,48 +66277,48 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_initializer) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_initializer); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3429, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3418 + /* "dependency_injector/providers.pyx":3486 * self.__initialized = True * return self._create_init_future(initializer) - * elif isasyncgenfunction(self.__initializer): # <<<<<<<<<<<<<< + * elif isasyncgenfunction(self.__provides): # <<<<<<<<<<<<<< * initializer = __call( - * self.__initializer, + * self.__provides, */ } - /* "dependency_injector/providers.pyx":3430 + /* "dependency_injector/providers.pyx":3498 * self.__initialized = True * return self._create_async_gen_init_future(initializer) - * elif callable(self.__initializer): # <<<<<<<<<<<<<< + * elif callable(self.__provides): # <<<<<<<<<<<<<< * self.__resource = __call( - * self.__initializer, + * self.__provides, */ - __pyx_t_3 = __pyx_v_self->__pyx___initializer; + __pyx_t_3 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyCallable_Check(__pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 3430, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCallable_Check(__pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 3498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = (__pyx_t_7 != 0); if (likely(__pyx_t_8)) { - /* "dependency_injector/providers.pyx":3432 - * elif callable(self.__initializer): + /* "dependency_injector/providers.pyx":3500 + * elif callable(self.__provides): * self.__resource = __call( - * self.__initializer, # <<<<<<<<<<<<<< + * self.__provides, # <<<<<<<<<<<<<< * args, * self.__args, */ - __pyx_t_3 = __pyx_v_self->__pyx___initializer; + __pyx_t_3 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":3434 - * self.__initializer, + /* "dependency_injector/providers.pyx":3502 + * self.__provides, * args, * self.__args, # <<<<<<<<<<<<<< * self.__args_len, @@ -64786,7 +66327,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_2 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pyx":3437 + /* "dependency_injector/providers.pyx":3505 * self.__args_len, * kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -64796,14 +66337,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_t_4 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":3431 + /* "dependency_injector/providers.pyx":3499 * return self._create_async_gen_init_future(initializer) - * elif callable(self.__initializer): + * elif callable(self.__provides): * self.__resource = __call( # <<<<<<<<<<<<<< - * self.__initializer, + * self.__provides, * args, */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_3, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3431, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_3, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3499, __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; @@ -64814,17 +66355,17 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_v_self->__pyx___resource = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3430 + /* "dependency_injector/providers.pyx":3498 * self.__initialized = True * return self._create_async_gen_init_future(initializer) - * elif callable(self.__initializer): # <<<<<<<<<<<<<< + * elif callable(self.__provides): # <<<<<<<<<<<<<< * self.__resource = __call( - * self.__initializer, + * self.__provides, */ goto __pyx_L4; } - /* "dependency_injector/providers.pyx":3441 + /* "dependency_injector/providers.pyx":3509 * ) * else: * raise Error('Unknown type of resource initializer') # <<<<<<<<<<<<<< @@ -64832,7 +66373,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str * self.__initialized = True */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3441, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -64846,16 +66387,16 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_kp_s_Unknown_type_of_resource_initial) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Unknown_type_of_resource_initial); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3441, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 3441, __pyx_L1_error) + __PYX_ERR(1, 3509, __pyx_L1_error) } __pyx_L4:; - /* "dependency_injector/providers.pyx":3443 + /* "dependency_injector/providers.pyx":3511 * raise Error('Unknown type of resource initializer') * * self.__initialized = True # <<<<<<<<<<<<<< @@ -64864,7 +66405,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str */ __pyx_v_self->__pyx___initialized = 1; - /* "dependency_injector/providers.pyx":3444 + /* "dependency_injector/providers.pyx":3512 * * self.__initialized = True * return self.__resource # <<<<<<<<<<<<<< @@ -64876,7 +66417,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str __pyx_r = __pyx_v_self->__pyx___resource; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3365 + /* "dependency_injector/providers.pyx":3433 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -64902,8 +66443,8 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Resource__provide(str } /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_23_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_23_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_25_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_25_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -64935,11 +66476,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_23_provide( case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3365, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3433, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3365, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3433, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -64952,15 +66493,15 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_23_provide( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3365, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3433, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Resource._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3365, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3365, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_22_provide(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3433, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3433, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_24_provide(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; @@ -64971,7 +66512,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_23_provide( return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_22_provide(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_provide(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -64980,7 +66521,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_22_provide( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Resource__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3365, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Resource__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -64997,7 +66538,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_22_provide( return __pyx_r; } -/* "dependency_injector/providers.pyx":3446 +/* "dependency_injector/providers.pyx":3514 * return self.__resource * * def _create_init_future(self, future, shutdowner=None): # <<<<<<<<<<<<<< @@ -65006,8 +66547,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_22_provide( */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_25_create_init_future(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_25_create_init_future(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_27_create_init_future(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_27_create_init_future(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future = 0; PyObject *__pyx_v_shutdowner = 0; int __pyx_lineno = 0; @@ -65044,7 +66585,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_25_create_i } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_create_init_future") < 0)) __PYX_ERR(1, 3446, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_create_init_future") < 0)) __PYX_ERR(1, 3514, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -65060,20 +66601,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_25_create_i } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_create_init_future", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3446, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_create_init_future", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3514, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Resource._create_init_future", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_24_create_init_future(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_future, __pyx_v_shutdowner); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_26_create_init_future(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_future, __pyx_v_shutdowner); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_init_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_shutdowner) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_init_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_shutdowner) { PyObject *__pyx_v_callback = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -65088,49 +66629,49 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_i __Pyx_RefNannySetupContext("_create_init_future", 0); __Pyx_INCREF(__pyx_v_future); - /* "dependency_injector/providers.pyx":3447 + /* "dependency_injector/providers.pyx":3515 * * def _create_init_future(self, future, shutdowner=None): * callback = self._async_init_callback # <<<<<<<<<<<<<< * if shutdowner: * callback = functools.partial(callback, shutdowner=shutdowner) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_init_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3447, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_init_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_callback = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3448 + /* "dependency_injector/providers.pyx":3516 * def _create_init_future(self, future, shutdowner=None): * callback = self._async_init_callback * if shutdowner: # <<<<<<<<<<<<<< * callback = functools.partial(callback, shutdowner=shutdowner) * */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_shutdowner); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 3448, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_shutdowner); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 3516, __pyx_L1_error) if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":3449 + /* "dependency_injector/providers.pyx":3517 * callback = self._async_init_callback * if shutdowner: * callback = functools.partial(callback, shutdowner=shutdowner) # <<<<<<<<<<<<<< * * future = asyncio.ensure_future(future) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_functools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3449, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_functools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3449, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3449, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_callback); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3449, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shutdowner, __pyx_v_shutdowner) < 0) __PYX_ERR(1, 3449, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3449, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shutdowner, __pyx_v_shutdowner) < 0) __PYX_ERR(1, 3517, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -65138,7 +66679,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_i __Pyx_DECREF_SET(__pyx_v_callback, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":3448 + /* "dependency_injector/providers.pyx":3516 * def _create_init_future(self, future, shutdowner=None): * callback = self._async_init_callback * if shutdowner: # <<<<<<<<<<<<<< @@ -65147,16 +66688,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_i */ } - /* "dependency_injector/providers.pyx":3451 + /* "dependency_injector/providers.pyx":3519 * callback = functools.partial(callback, shutdowner=shutdowner) * * future = asyncio.ensure_future(future) # <<<<<<<<<<<<<< * future.add_done_callback(callback) * self.__resource = future */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3451, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3451, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -65171,20 +66712,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_i } __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_future) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_future); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3451, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_future, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":3452 + /* "dependency_injector/providers.pyx":3520 * * future = asyncio.ensure_future(future) * future.add_done_callback(callback) # <<<<<<<<<<<<<< * self.__resource = future * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3452, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -65198,12 +66739,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_i } __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_callback); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3452, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":3453 + /* "dependency_injector/providers.pyx":3521 * future = asyncio.ensure_future(future) * future.add_done_callback(callback) * self.__resource = future # <<<<<<<<<<<<<< @@ -65216,7 +66757,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_i __Pyx_DECREF(__pyx_v_self->__pyx___resource); __pyx_v_self->__pyx___resource = __pyx_v_future; - /* "dependency_injector/providers.pyx":3455 + /* "dependency_injector/providers.pyx":3523 * self.__resource = future * * return future # <<<<<<<<<<<<<< @@ -65228,7 +66769,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_i __pyx_r = __pyx_v_future; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3446 + /* "dependency_injector/providers.pyx":3514 * return self.__resource * * def _create_init_future(self, future, shutdowner=None): # <<<<<<<<<<<<<< @@ -65252,7 +66793,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_i return __pyx_r; } -/* "dependency_injector/providers.pyx":3457 +/* "dependency_injector/providers.pyx":3525 * return future * * def _create_async_gen_init_future(self, initializer): # <<<<<<<<<<<<<< @@ -65261,19 +66802,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_24_create_i */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_27_create_async_gen_init_future(PyObject *__pyx_v_self, PyObject *__pyx_v_initializer); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_27_create_async_gen_init_future(PyObject *__pyx_v_self, PyObject *__pyx_v_initializer) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_29_create_async_gen_init_future(PyObject *__pyx_v_self, PyObject *__pyx_v_initializer); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_29_create_async_gen_init_future(PyObject *__pyx_v_self, PyObject *__pyx_v_initializer) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_create_async_gen_init_future (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_26_create_async_gen_init_future(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), ((PyObject *)__pyx_v_initializer)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_28_create_async_gen_init_future(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), ((PyObject *)__pyx_v_initializer)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_async_gen_init_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_initializer) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_create_async_gen_init_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_initializer) { PyObject *__pyx_v_future = NULL; PyObject *__pyx_v_create_initializer = NULL; PyObject *__pyx_r = NULL; @@ -65292,16 +66833,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_create_async_gen_init_future", 0); - /* "dependency_injector/providers.pyx":3458 + /* "dependency_injector/providers.pyx":3526 * * def _create_async_gen_init_future(self, initializer): * if inspect.isasyncgen(initializer): # <<<<<<<<<<<<<< * return self._create_init_future(initializer.__anext__(), initializer.asend) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_inspect); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3458, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_inspect); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isasyncgen); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3458, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isasyncgen); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -65316,14 +66857,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_initializer) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_initializer); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3458, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 3458, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 3526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "dependency_injector/providers.pyx":3459 + /* "dependency_injector/providers.pyx":3527 * def _create_async_gen_init_future(self, initializer): * if inspect.isasyncgen(initializer): * return self._create_init_future(initializer.__anext__(), initializer.asend) # <<<<<<<<<<<<<< @@ -65331,9 +66872,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a * future = asyncio.Future() */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_init_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3459, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_init_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_anext); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3459, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_anext); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -65347,10 +66888,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a } __pyx_t_2 = (__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_2)) __PYX_ERR(1, 3459, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_asend); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3459, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_asend); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -65367,7 +66908,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3459, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3527, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -65377,7 +66918,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3459, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3527, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -65385,7 +66926,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3459, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3527, __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; @@ -65396,7 +66937,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3459, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -65405,7 +66946,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3458 + /* "dependency_injector/providers.pyx":3526 * * def _create_async_gen_init_future(self, initializer): * if inspect.isasyncgen(initializer): # <<<<<<<<<<<<<< @@ -65414,16 +66955,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a */ } - /* "dependency_injector/providers.pyx":3461 + /* "dependency_injector/providers.pyx":3529 * return self._create_init_future(initializer.__anext__(), initializer.asend) * * future = asyncio.Future() # <<<<<<<<<<<<<< * * create_initializer = asyncio.ensure_future(initializer) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3461, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3461, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -65438,22 +66979,22 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3461, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_future = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3463 + /* "dependency_injector/providers.pyx":3531 * future = asyncio.Future() * * create_initializer = asyncio.ensure_future(initializer) # <<<<<<<<<<<<<< * create_initializer.add_done_callback(functools.partial(self._async_create_gen_callback, future)) * self.__resource = future */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3463, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3463, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -65468,27 +67009,27 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_initializer) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_initializer); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3463, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_create_initializer = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3464 + /* "dependency_injector/providers.pyx":3532 * * create_initializer = asyncio.ensure_future(initializer) * create_initializer.add_done_callback(functools.partial(self._async_create_gen_callback, future)) # <<<<<<<<<<<<<< * self.__resource = future * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_create_initializer, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3464, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_create_initializer, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_functools); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3464, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_functools); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3464, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_create_gen_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3464, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_create_gen_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -65505,7 +67046,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_v_future}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3464, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3532, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -65514,14 +67055,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_v_future}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3464, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3532, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 3464, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 3532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -65532,7 +67073,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a __Pyx_GIVEREF(__pyx_v_future); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_v_future); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3464, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -65550,12 +67091,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3464, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3465 + /* "dependency_injector/providers.pyx":3533 * create_initializer = asyncio.ensure_future(initializer) * create_initializer.add_done_callback(functools.partial(self._async_create_gen_callback, future)) * self.__resource = future # <<<<<<<<<<<<<< @@ -65568,7 +67109,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a __Pyx_DECREF(__pyx_v_self->__pyx___resource); __pyx_v_self->__pyx___resource = __pyx_v_future; - /* "dependency_injector/providers.pyx":3467 + /* "dependency_injector/providers.pyx":3535 * self.__resource = future * * return future # <<<<<<<<<<<<<< @@ -65580,7 +67121,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a __pyx_r = __pyx_v_future; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3457 + /* "dependency_injector/providers.pyx":3525 * return future * * def _create_async_gen_init_future(self, initializer): # <<<<<<<<<<<<<< @@ -65607,7 +67148,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a return __pyx_r; } -/* "dependency_injector/providers.pyx":3469 +/* "dependency_injector/providers.pyx":3537 * return future * * def _async_init_callback(self, initializer, shutdowner=None): # <<<<<<<<<<<<<< @@ -65616,8 +67157,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_26_create_a */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_29_async_init_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_29_async_init_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_31_async_init_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_31_async_init_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_initializer = 0; PyObject *__pyx_v_shutdowner = 0; int __pyx_lineno = 0; @@ -65654,7 +67195,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_29_async_in } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_init_callback") < 0)) __PYX_ERR(1, 3469, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_init_callback") < 0)) __PYX_ERR(1, 3537, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -65670,20 +67211,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_29_async_in } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_async_init_callback", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3469, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_init_callback", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3537, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Resource._async_init_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_28_async_init_callback(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_initializer, __pyx_v_shutdowner); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_30_async_init_callback(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_initializer, __pyx_v_shutdowner); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_init_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_initializer, PyObject *__pyx_v_shutdowner) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_init_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_initializer, PyObject *__pyx_v_shutdowner) { PyObject *__pyx_v_resource = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -65699,7 +67240,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_async_init_callback", 0); - /* "dependency_injector/providers.pyx":3470 + /* "dependency_injector/providers.pyx":3538 * * def _async_init_callback(self, initializer, shutdowner=None): * try: # <<<<<<<<<<<<<< @@ -65715,14 +67256,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":3471 + /* "dependency_injector/providers.pyx":3539 * def _async_init_callback(self, initializer, shutdowner=None): * try: * resource = initializer.result() # <<<<<<<<<<<<<< * except Exception: * self.__initialized = False */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3471, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3539, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -65736,13 +67277,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in } __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, 3471, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3539, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_resource = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3470 + /* "dependency_injector/providers.pyx":3538 * * def _async_init_callback(self, initializer, shutdowner=None): * try: # <<<<<<<<<<<<<< @@ -65751,7 +67292,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in */ } - /* "dependency_injector/providers.pyx":3475 + /* "dependency_injector/providers.pyx":3543 * self.__initialized = False * else: * self.__resource = resource # <<<<<<<<<<<<<< @@ -65765,7 +67306,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in __Pyx_DECREF(__pyx_v_self->__pyx___resource); __pyx_v_self->__pyx___resource = __pyx_v_resource; - /* "dependency_injector/providers.pyx":3476 + /* "dependency_injector/providers.pyx":3544 * else: * self.__resource = resource * self.__shutdowner = shutdowner # <<<<<<<<<<<<<< @@ -65787,7 +67328,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":3472 + /* "dependency_injector/providers.pyx":3540 * try: * resource = initializer.result() * except Exception: # <<<<<<<<<<<<<< @@ -65797,12 +67338,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.Resource._async_init_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 3472, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 3540, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); - /* "dependency_injector/providers.pyx":3473 + /* "dependency_injector/providers.pyx":3541 * resource = initializer.result() * except Exception: * self.__initialized = False # <<<<<<<<<<<<<< @@ -65818,7 +67359,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":3470 + /* "dependency_injector/providers.pyx":3538 * * def _async_init_callback(self, initializer, shutdowner=None): * try: # <<<<<<<<<<<<<< @@ -65838,7 +67379,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in __pyx_L8_try_end:; } - /* "dependency_injector/providers.pyx":3469 + /* "dependency_injector/providers.pyx":3537 * return future * * def _async_init_callback(self, initializer, shutdowner=None): # <<<<<<<<<<<<<< @@ -65862,7 +67403,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in return __pyx_r; } -/* "dependency_injector/providers.pyx":3478 +/* "dependency_injector/providers.pyx":3546 * self.__shutdowner = shutdowner * * def _async_create_gen_callback(self, future, initializer_future): # <<<<<<<<<<<<<< @@ -65871,8 +67412,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_28_async_in */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_31_async_create_gen_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_31_async_create_gen_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_33_async_create_gen_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_33_async_create_gen_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future = 0; PyObject *__pyx_v_initializer_future = 0; int __pyx_lineno = 0; @@ -65904,11 +67445,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_31_async_cr case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initializer_future)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_create_gen_callback", 1, 2, 2, 1); __PYX_ERR(1, 3478, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_create_gen_callback", 1, 2, 2, 1); __PYX_ERR(1, 3546, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_create_gen_callback") < 0)) __PYX_ERR(1, 3478, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_create_gen_callback") < 0)) __PYX_ERR(1, 3546, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -65921,20 +67462,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_31_async_cr } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_async_create_gen_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3478, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_create_gen_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3546, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Resource._async_create_gen_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_30_async_create_gen_callback(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_future, __pyx_v_initializer_future); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_32_async_create_gen_callback(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_future, __pyx_v_initializer_future); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_create_gen_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_initializer_future) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_32_async_create_gen_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_initializer_future) { PyObject *__pyx_v_initializer = NULL; PyObject *__pyx_v_init_future = NULL; PyObject *__pyx_r = NULL; @@ -65952,14 +67493,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_async_create_gen_callback", 0); - /* "dependency_injector/providers.pyx":3479 + /* "dependency_injector/providers.pyx":3547 * * def _async_create_gen_callback(self, future, initializer_future): * initializer = initializer_future.result() # <<<<<<<<<<<<<< * init_future = self._create_init_future(initializer.__anext__(), initializer.asend) * init_future.add_done_callback(functools.partial(self._async_trigger_result, future)) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer_future, __pyx_n_s_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3479, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer_future, __pyx_n_s_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -65973,22 +67514,22 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3479, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_initializer = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3480 + /* "dependency_injector/providers.pyx":3548 * def _async_create_gen_callback(self, future, initializer_future): * initializer = initializer_future.result() * init_future = self._create_init_future(initializer.__anext__(), initializer.asend) # <<<<<<<<<<<<<< * init_future.add_done_callback(functools.partial(self._async_trigger_result, future)) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_init_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3480, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_init_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_anext); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3480, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_anext); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -66002,10 +67543,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3480, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_asend); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3480, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_initializer, __pyx_n_s_asend); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -66022,7 +67563,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3480, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3548, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -66032,7 +67573,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3480, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3548, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -66040,7 +67581,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3480, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -66051,7 +67592,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3480, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -66059,21 +67600,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr __pyx_v_init_future = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3481 + /* "dependency_injector/providers.pyx":3549 * initializer = initializer_future.result() * init_future = self._create_init_future(initializer.__anext__(), initializer.asend) * init_future.add_done_callback(functools.partial(self._async_trigger_result, future)) # <<<<<<<<<<<<<< * * def _async_trigger_result(self, future, future_result): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_future, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3481, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_future, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_functools); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3481, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_functools); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_partial); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3481, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_partial); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_trigger_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3481, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_trigger_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -66090,7 +67631,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_v_future}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3481, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3549, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -66099,14 +67640,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_v_future}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3481, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3549, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3481, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -66117,7 +67658,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr __Pyx_GIVEREF(__pyx_v_future); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_v_future); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3481, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -66135,12 +67676,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3481, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3478 + /* "dependency_injector/providers.pyx":3546 * self.__shutdowner = shutdowner * * def _async_create_gen_callback(self, future, initializer_future): # <<<<<<<<<<<<<< @@ -66169,7 +67710,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr return __pyx_r; } -/* "dependency_injector/providers.pyx":3483 +/* "dependency_injector/providers.pyx":3551 * init_future.add_done_callback(functools.partial(self._async_trigger_result, future)) * * def _async_trigger_result(self, future, future_result): # <<<<<<<<<<<<<< @@ -66178,8 +67719,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_30_async_cr */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_33_async_trigger_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_33_async_trigger_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_35_async_trigger_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_35_async_trigger_result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future = 0; PyObject *__pyx_v_future_result = 0; int __pyx_lineno = 0; @@ -66211,11 +67752,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_33_async_tr case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future_result)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_trigger_result", 1, 2, 2, 1); __PYX_ERR(1, 3483, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_trigger_result", 1, 2, 2, 1); __PYX_ERR(1, 3551, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_trigger_result") < 0)) __PYX_ERR(1, 3483, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_trigger_result") < 0)) __PYX_ERR(1, 3551, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -66228,20 +67769,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_33_async_tr } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_async_trigger_result", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3483, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_trigger_result", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3551, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Resource._async_trigger_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_32_async_trigger_result(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_future, __pyx_v_future_result); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_34_async_trigger_result(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_future, __pyx_v_future_result); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_32_async_trigger_result(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_future_result) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_async_trigger_result(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future, PyObject *__pyx_v_future_result) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -66254,16 +67795,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_32_async_tr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_async_trigger_result", 0); - /* "dependency_injector/providers.pyx":3484 + /* "dependency_injector/providers.pyx":3552 * * def _async_trigger_result(self, future, future_result): * future.set_result(future_result.result()) # <<<<<<<<<<<<<< * * def _create_shutdown_future(self, shutdown_future): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_set_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3484, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_set_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3484, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -66277,7 +67818,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_32_async_tr } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3484, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -66293,12 +67834,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_32_async_tr __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3484, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3483 + /* "dependency_injector/providers.pyx":3551 * init_future.add_done_callback(functools.partial(self._async_trigger_result, future)) * * def _async_trigger_result(self, future, future_result): # <<<<<<<<<<<<<< @@ -66323,7 +67864,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_32_async_tr return __pyx_r; } -/* "dependency_injector/providers.pyx":3486 +/* "dependency_injector/providers.pyx":3554 * future.set_result(future_result.result()) * * def _create_shutdown_future(self, shutdown_future): # <<<<<<<<<<<<<< @@ -66332,19 +67873,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_32_async_tr */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_35_create_shutdown_future(PyObject *__pyx_v_self, PyObject *__pyx_v_shutdown_future); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_35_create_shutdown_future(PyObject *__pyx_v_self, PyObject *__pyx_v_shutdown_future) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_37_create_shutdown_future(PyObject *__pyx_v_self, PyObject *__pyx_v_shutdown_future); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_37_create_shutdown_future(PyObject *__pyx_v_self, PyObject *__pyx_v_shutdown_future) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_create_shutdown_future (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_34_create_shutdown_future(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), ((PyObject *)__pyx_v_shutdown_future)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_36_create_shutdown_future(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), ((PyObject *)__pyx_v_shutdown_future)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_shutdown_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_shutdown_future) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_create_shutdown_future(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_shutdown_future) { PyObject *__pyx_v_future = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -66362,16 +67903,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_s __Pyx_RefNannySetupContext("_create_shutdown_future", 0); __Pyx_INCREF(__pyx_v_shutdown_future); - /* "dependency_injector/providers.pyx":3487 + /* "dependency_injector/providers.pyx":3555 * * def _create_shutdown_future(self, shutdown_future): * future = asyncio.Future() # <<<<<<<<<<<<<< * shutdown_future = asyncio.ensure_future(shutdown_future) * shutdown_future.add_done_callback(functools.partial(self._async_shutdown_callback, future)) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3487, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3555, __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, 3487, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -66386,22 +67927,22 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_s } __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, 3487, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_future = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3488 + /* "dependency_injector/providers.pyx":3556 * def _create_shutdown_future(self, shutdown_future): * future = asyncio.Future() * shutdown_future = asyncio.ensure_future(shutdown_future) # <<<<<<<<<<<<<< * shutdown_future.add_done_callback(functools.partial(self._async_shutdown_callback, future)) * return future */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3488, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3488, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -66416,27 +67957,27 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_s } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_shutdown_future) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_shutdown_future); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3488, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_shutdown_future, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3489 + /* "dependency_injector/providers.pyx":3557 * future = asyncio.Future() * shutdown_future = asyncio.ensure_future(shutdown_future) * shutdown_future.add_done_callback(functools.partial(self._async_shutdown_callback, future)) # <<<<<<<<<<<<<< * return future * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_shutdown_future, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3489, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_shutdown_future, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_functools); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3489, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_functools); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_partial); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3489, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_partial); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_shutdown_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3489, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_shutdown_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -66453,7 +67994,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_s #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_future}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3489, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3557, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -66462,14 +68003,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_s #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_future}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3489, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3557, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3489, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3557, __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; @@ -66480,7 +68021,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_s __Pyx_GIVEREF(__pyx_v_future); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_future); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3489, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -66498,12 +68039,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_s __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3489, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3490 + /* "dependency_injector/providers.pyx":3558 * shutdown_future = asyncio.ensure_future(shutdown_future) * shutdown_future.add_done_callback(functools.partial(self._async_shutdown_callback, future)) * return future # <<<<<<<<<<<<<< @@ -66515,7 +68056,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_s __pyx_r = __pyx_v_future; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3486 + /* "dependency_injector/providers.pyx":3554 * future.set_result(future_result.result()) * * def _create_shutdown_future(self, shutdown_future): # <<<<<<<<<<<<<< @@ -66542,7 +68083,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_s return __pyx_r; } -/* "dependency_injector/providers.pyx":3492 +/* "dependency_injector/providers.pyx":3560 * return future * * def _async_shutdown_callback(self, future_result, shutdowner): # <<<<<<<<<<<<<< @@ -66551,8 +68092,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_34_create_s */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_37_async_shutdown_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_37_async_shutdown_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_39_async_shutdown_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_39_async_shutdown_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future_result = 0; PyObject *__pyx_v_shutdowner = 0; int __pyx_lineno = 0; @@ -66584,11 +68125,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_37_async_sh case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shutdowner)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_shutdown_callback", 1, 2, 2, 1); __PYX_ERR(1, 3492, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_shutdown_callback", 1, 2, 2, 1); __PYX_ERR(1, 3560, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_shutdown_callback") < 0)) __PYX_ERR(1, 3492, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_shutdown_callback") < 0)) __PYX_ERR(1, 3560, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -66601,20 +68142,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_37_async_sh } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_async_shutdown_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3492, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_shutdown_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3560, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Resource._async_shutdown_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_36_async_shutdown_callback(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_future_result, __pyx_v_shutdowner); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_38_async_shutdown_callback(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), __pyx_v_future_result, __pyx_v_shutdowner); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_shutdown_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_shutdowner) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_async_shutdown_callback(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_shutdowner) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -66629,7 +68170,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_async_shutdown_callback", 0); - /* "dependency_injector/providers.pyx":3493 + /* "dependency_injector/providers.pyx":3561 * * def _async_shutdown_callback(self, future_result, shutdowner): * try: # <<<<<<<<<<<<<< @@ -66645,14 +68186,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":3494 + /* "dependency_injector/providers.pyx":3562 * def _async_shutdown_callback(self, future_result, shutdowner): * try: * shutdowner.result() # <<<<<<<<<<<<<< * except StopAsyncIteration: * pass */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_shutdowner, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3494, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_shutdowner, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3562, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -66666,12 +68207,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh } __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, 3494, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3562, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3493 + /* "dependency_injector/providers.pyx":3561 * * def _async_shutdown_callback(self, future_result, shutdowner): * try: # <<<<<<<<<<<<<< @@ -66688,7 +68229,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":3495 + /* "dependency_injector/providers.pyx":3563 * try: * shutdowner.result() * except StopAsyncIteration: # <<<<<<<<<<<<<< @@ -66703,7 +68244,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":3493 + /* "dependency_injector/providers.pyx":3561 * * def _async_shutdown_callback(self, future_result, shutdowner): * try: # <<<<<<<<<<<<<< @@ -66723,7 +68264,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh __pyx_L8_try_end:; } - /* "dependency_injector/providers.pyx":3498 + /* "dependency_injector/providers.pyx":3566 * pass * * self.__resource = None # <<<<<<<<<<<<<< @@ -66736,7 +68277,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh __Pyx_DECREF(__pyx_v_self->__pyx___resource); __pyx_v_self->__pyx___resource = Py_None; - /* "dependency_injector/providers.pyx":3499 + /* "dependency_injector/providers.pyx":3567 * * self.__resource = None * self.__initialized = False # <<<<<<<<<<<<<< @@ -66745,7 +68286,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh */ __pyx_v_self->__pyx___initialized = 0; - /* "dependency_injector/providers.pyx":3500 + /* "dependency_injector/providers.pyx":3568 * self.__resource = None * self.__initialized = False * self.__shutdowner = None # <<<<<<<<<<<<<< @@ -66758,14 +68299,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh __Pyx_DECREF(__pyx_v_self->__pyx___shutdowner); __pyx_v_self->__pyx___shutdowner = Py_None; - /* "dependency_injector/providers.pyx":3502 + /* "dependency_injector/providers.pyx":3570 * self.__shutdowner = None * * future_result.set_result(None) # <<<<<<<<<<<<<< * * @staticmethod */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3502, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -66779,12 +68320,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, Py_None) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_None); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3502, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3492 + /* "dependency_injector/providers.pyx":3560 * return future * * def _async_shutdown_callback(self, future_result, shutdowner): # <<<<<<<<<<<<<< @@ -66807,7 +68348,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh return __pyx_r; } -/* "dependency_injector/providers.pyx":3505 +/* "dependency_injector/providers.pyx":3573 * * @staticmethod * def _is_resource_subclass(instance): # <<<<<<<<<<<<<< @@ -66816,9 +68357,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_36_async_sh */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_39_is_resource_subclass(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_8Resource_39_is_resource_subclass = {"_is_resource_subclass", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_39_is_resource_subclass, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_39_is_resource_subclass(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_41_is_resource_subclass(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_8Resource_41_is_resource_subclass = {"_is_resource_subclass", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_41_is_resource_subclass, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_41_is_resource_subclass(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_instance = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -66845,7 +68386,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_39_is_resou else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_is_resource_subclass") < 0)) __PYX_ERR(1, 3505, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_is_resource_subclass") < 0)) __PYX_ERR(1, 3573, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -66856,20 +68397,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_39_is_resou } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_is_resource_subclass", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3505, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_is_resource_subclass", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3573, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Resource._is_resource_subclass", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_38_is_resource_subclass(__pyx_v_instance); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_40_is_resource_subclass(__pyx_v_instance); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resource_subclass(PyObject *__pyx_v_instance) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_resource_subclass(PyObject *__pyx_v_instance) { PyObject *__pyx_v_resources = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -66882,25 +68423,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resou int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_resource_subclass", 0); - /* "dependency_injector/providers.pyx":3506 + /* "dependency_injector/providers.pyx":3574 * @staticmethod * def _is_resource_subclass(instance): * if sys.version_info < (3, 5): # <<<<<<<<<<<<<< * return False * if not isinstance(instance, CLASS_TYPES): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3506, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3506, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__28, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3506, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__27, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3574, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 3506, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 3574, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "dependency_injector/providers.pyx":3507 + /* "dependency_injector/providers.pyx":3575 * def _is_resource_subclass(instance): * if sys.version_info < (3, 5): * return False # <<<<<<<<<<<<<< @@ -66912,7 +68453,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resou __pyx_r = Py_False; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3506 + /* "dependency_injector/providers.pyx":3574 * @staticmethod * def _is_resource_subclass(instance): * if sys.version_info < (3, 5): # <<<<<<<<<<<<<< @@ -66921,7 +68462,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resou */ } - /* "dependency_injector/providers.pyx":3508 + /* "dependency_injector/providers.pyx":3576 * if sys.version_info < (3, 5): * return False * if not isinstance(instance, CLASS_TYPES): # <<<<<<<<<<<<<< @@ -66930,12 +68471,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resou */ __pyx_t_1 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 3508, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 3576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { - /* "dependency_injector/providers.pyx":3509 + /* "dependency_injector/providers.pyx":3577 * return False * if not isinstance(instance, CLASS_TYPES): * return # <<<<<<<<<<<<<< @@ -66946,7 +68487,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resou __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3508 + /* "dependency_injector/providers.pyx":3576 * if sys.version_info < (3, 5): * return False * if not isinstance(instance, CLASS_TYPES): # <<<<<<<<<<<<<< @@ -66955,29 +68496,29 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resou */ } - /* "dependency_injector/providers.pyx":3510 + /* "dependency_injector/providers.pyx":3578 * if not isinstance(instance, CLASS_TYPES): * return * from . import resources # <<<<<<<<<<<<<< * return issubclass(instance, resources.Resource) * */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3510, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_resources); __Pyx_GIVEREF(__pyx_n_s_resources); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_resources); - __pyx_t_2 = __Pyx_Import(__pyx_kp_s__10, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3510, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_kp_s__9, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3578, __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_resources); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3510, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_resources); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_resources = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3511 + /* "dependency_injector/providers.pyx":3579 * return * from . import resources * return issubclass(instance, resources.Resource) # <<<<<<<<<<<<<< @@ -66985,17 +68526,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resou * @staticmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_resources, __pyx_n_s_Resource); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3511, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_resources, __pyx_n_s_Resource); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_IsSubclass(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 3511, __pyx_L1_error) + __pyx_t_4 = PyObject_IsSubclass(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 3579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3511, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3505 + /* "dependency_injector/providers.pyx":3573 * * @staticmethod * def _is_resource_subclass(instance): # <<<<<<<<<<<<<< @@ -67016,7 +68557,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resou return __pyx_r; } -/* "dependency_injector/providers.pyx":3514 +/* "dependency_injector/providers.pyx":3582 * * @staticmethod * def _is_async_resource_subclass(instance): # <<<<<<<<<<<<<< @@ -67025,9 +68566,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_38_is_resou */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_41_is_async_resource_subclass(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_8Resource_41_is_async_resource_subclass = {"_is_async_resource_subclass", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_41_is_async_resource_subclass, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_41_is_async_resource_subclass(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_43_is_async_resource_subclass(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_8Resource_43_is_async_resource_subclass = {"_is_async_resource_subclass", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_43_is_async_resource_subclass, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_43_is_async_resource_subclass(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_instance = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -67054,7 +68595,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_41_is_async else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_is_async_resource_subclass") < 0)) __PYX_ERR(1, 3514, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_is_async_resource_subclass") < 0)) __PYX_ERR(1, 3582, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -67065,20 +68606,20 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_41_is_async } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_is_async_resource_subclass", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3514, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_is_async_resource_subclass", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3582, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Resource._is_async_resource_subclass", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_40_is_async_resource_subclass(__pyx_v_instance); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_42_is_async_resource_subclass(__pyx_v_instance); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_async_resource_subclass(PyObject *__pyx_v_instance) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42_is_async_resource_subclass(PyObject *__pyx_v_instance) { PyObject *__pyx_v_resources = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -67091,25 +68632,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_async int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_async_resource_subclass", 0); - /* "dependency_injector/providers.pyx":3515 + /* "dependency_injector/providers.pyx":3583 * @staticmethod * def _is_async_resource_subclass(instance): * if sys.version_info < (3, 5): # <<<<<<<<<<<<<< * return False * if not isinstance(instance, CLASS_TYPES): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3515, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3515, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__28, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3515, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__27, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3583, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 3515, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 3583, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "dependency_injector/providers.pyx":3516 + /* "dependency_injector/providers.pyx":3584 * def _is_async_resource_subclass(instance): * if sys.version_info < (3, 5): * return False # <<<<<<<<<<<<<< @@ -67121,7 +68662,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_async __pyx_r = Py_False; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3515 + /* "dependency_injector/providers.pyx":3583 * @staticmethod * def _is_async_resource_subclass(instance): * if sys.version_info < (3, 5): # <<<<<<<<<<<<<< @@ -67130,7 +68671,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_async */ } - /* "dependency_injector/providers.pyx":3517 + /* "dependency_injector/providers.pyx":3585 * if sys.version_info < (3, 5): * return False * if not isinstance(instance, CLASS_TYPES): # <<<<<<<<<<<<<< @@ -67139,12 +68680,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_async */ __pyx_t_1 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 3517, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 3585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { - /* "dependency_injector/providers.pyx":3518 + /* "dependency_injector/providers.pyx":3586 * return False * if not isinstance(instance, CLASS_TYPES): * return # <<<<<<<<<<<<<< @@ -67155,7 +68696,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_async __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3517 + /* "dependency_injector/providers.pyx":3585 * if sys.version_info < (3, 5): * return False * if not isinstance(instance, CLASS_TYPES): # <<<<<<<<<<<<<< @@ -67164,29 +68705,29 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_async */ } - /* "dependency_injector/providers.pyx":3519 + /* "dependency_injector/providers.pyx":3587 * if not isinstance(instance, CLASS_TYPES): * return * from . import resources # <<<<<<<<<<<<<< * return issubclass(instance, resources.AsyncResource) * */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3519, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_resources); __Pyx_GIVEREF(__pyx_n_s_resources); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_resources); - __pyx_t_2 = __Pyx_Import(__pyx_kp_s__10, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3519, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_kp_s__9, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3587, __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_resources); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3519, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_resources); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_resources = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3520 + /* "dependency_injector/providers.pyx":3588 * return * from . import resources * return issubclass(instance, resources.AsyncResource) # <<<<<<<<<<<<<< @@ -67194,17 +68735,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_async * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_resources, __pyx_n_s_AsyncResource); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3520, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_resources, __pyx_n_s_AsyncResource); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_IsSubclass(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 3520, __pyx_L1_error) + __pyx_t_4 = PyObject_IsSubclass(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 3588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3520, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3514 + /* "dependency_injector/providers.pyx":3582 * * @staticmethod * def _is_async_resource_subclass(instance): # <<<<<<<<<<<<<< @@ -67232,19 +68773,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_40_is_async */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_44__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_44__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -67266,7 +68807,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.__args, self.__args_len, self.__async_mode, self.__initialized, self.__initializer, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__resource, self.__shutdowner) # <<<<<<<<<<<<<< + * state = (self.__args, self.__args_len, self.__async_mode, self.__initialized, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides, self.__resource, self.__shutdowner) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ @@ -67289,20 +68830,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3); - __Pyx_INCREF(__pyx_v_self->__pyx___initializer); - __Pyx_GIVEREF(__pyx_v_self->__pyx___initializer); - PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_v_self->__pyx___initializer); __Pyx_INCREF(__pyx_v_self->__pyx___kwargs); __Pyx_GIVEREF(__pyx_v_self->__pyx___kwargs); - PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_v_self->__pyx___kwargs); + PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_v_self->__pyx___kwargs); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); - PyTuple_SET_ITEM(__pyx_t_5, 7, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); + PyTuple_SET_ITEM(__pyx_t_5, 6, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden); - PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_v_self->__pyx_base.__pyx___overridden); + PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_v_self->__pyx_base.__pyx___overridden); + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __Pyx_GIVEREF(__pyx_v_self->__pyx___provides); + PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_v_self->__pyx___provides); __Pyx_INCREF(__pyx_v_self->__pyx___resource); __Pyx_GIVEREF(__pyx_v_self->__pyx___resource); PyTuple_SET_ITEM(__pyx_t_5, 9, __pyx_v_self->__pyx___resource); @@ -67318,7 +68859,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.__args, self.__args_len, self.__async_mode, self.__initialized, self.__initializer, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__resource, self.__shutdowner) + * state = (self.__args, self.__args_len, self.__async_mode, self.__initialized, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides, self.__resource, self.__shutdowner) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -67329,7 +68870,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ __pyx_t_5 = 0; /* "(tree fragment)":7 - * state = (self.__args, self.__args_len, self.__async_mode, self.__initialized, self.__initializer, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__resource, self.__shutdowner) + * state = (self.__args, self.__args_len, self.__async_mode, self.__initialized, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides, self.__resource, self.__shutdowner) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -67362,12 +68903,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.__args is not None or self.__initializer is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__resource is not None or self.__shutdowner is not None + * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None or self.__resource is not None or self.__shutdowner is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.__args, self.__args_len, self.__async_mode, self.__initialized, self.__initializer, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__resource, self.__shutdowner) + * state = (self.__args, self.__args_len, self.__async_mode, self.__initialized, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides, self.__resource, self.__shutdowner) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -67379,9 +68920,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.__args is not None or self.__initializer is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__resource is not None or self.__shutdowner is not None # <<<<<<<<<<<<<< + * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None or self.__resource is not None or self.__shutdowner is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_Resource, (type(self), 0x734cfcb, None), state + * return __pyx_unpickle_Resource, (type(self), 0x62e918c, None), state */ /*else*/ { __pyx_t_6 = (__pyx_v_self->__pyx___args != ((PyObject*)Py_None)); @@ -67391,28 +68932,28 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ __pyx_t_7 = __pyx_t_8; goto __pyx_L4_bool_binop_done; } - __pyx_t_8 = (__pyx_v_self->__pyx___initializer != Py_None); + __pyx_t_8 = (__pyx_v_self->__pyx___kwargs != ((PyObject*)Py_None)); __pyx_t_6 = (__pyx_t_8 != 0); if (!__pyx_t_6) { } else { __pyx_t_7 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = (__pyx_v_self->__pyx___kwargs != ((PyObject*)Py_None)); + __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None); __pyx_t_8 = (__pyx_t_6 != 0); if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L4_bool_binop_done; } - __pyx_t_8 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None); + __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx___overridden != ((PyObject*)Py_None)); __pyx_t_6 = (__pyx_t_8 != 0); if (!__pyx_t_6) { } else { __pyx_t_7 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx___overridden != ((PyObject*)Py_None)); + __pyx_t_6 = (__pyx_v_self->__pyx___provides != Py_None); __pyx_t_8 = (__pyx_t_6 != 0); if (!__pyx_t_8) { } else { @@ -67436,20 +68977,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ /* "(tree fragment)":12 * else: - * use_setstate = self.__args is not None or self.__initializer is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__resource is not None or self.__shutdowner is not None + * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None or self.__resource is not None or self.__shutdowner is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Resource, (type(self), 0x734cfcb, None), state + * return __pyx_unpickle_Resource, (type(self), 0x62e918c, None), state * else: */ __pyx_t_7 = (__pyx_v_use_setstate != 0); if (__pyx_t_7) { /* "(tree fragment)":13 - * use_setstate = self.__args is not None or self.__initializer is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__resource is not None or self.__shutdowner is not None + * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None or self.__resource is not None or self.__shutdowner is not None * if use_setstate: - * return __pyx_unpickle_Resource, (type(self), 0x734cfcb, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_Resource, (type(self), 0x62e918c, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_Resource, (type(self), 0x734cfcb, state) + * return __pyx_unpickle_Resource, (type(self), 0x62e918c, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Resource); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) @@ -67459,9 +69000,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_120901579); - __Pyx_GIVEREF(__pyx_int_120901579); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_120901579); + __Pyx_INCREF(__pyx_int_103715212); + __Pyx_GIVEREF(__pyx_int_103715212); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_103715212); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None); @@ -67482,17 +69023,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ /* "(tree fragment)":12 * else: - * use_setstate = self.__args is not None or self.__initializer is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__resource is not None or self.__shutdowner is not None + * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None or self.__resource is not None or self.__shutdowner is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Resource, (type(self), 0x734cfcb, None), state + * return __pyx_unpickle_Resource, (type(self), 0x62e918c, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_Resource, (type(self), 0x734cfcb, None), state + * return __pyx_unpickle_Resource, (type(self), 0x62e918c, None), state * else: - * return __pyx_unpickle_Resource, (type(self), 0x734cfcb, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_Resource, (type(self), 0x62e918c, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Resource__set_state(self, __pyx_state) */ @@ -67505,9 +69046,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_120901579); - __Pyx_GIVEREF(__pyx_int_120901579); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_120901579); + __Pyx_INCREF(__pyx_int_103715212); + __Pyx_GIVEREF(__pyx_int_103715212); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_103715212); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); @@ -67549,25 +69090,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_42__reduce_ /* "(tree fragment)":16 * else: - * return __pyx_unpickle_Resource, (type(self), 0x734cfcb, state) + * return __pyx_unpickle_Resource, (type(self), 0x62e918c, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Resource__set_state(self, __pyx_state) */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Resource_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_44__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Resource_46__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Resource *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_44__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_46__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Resource *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -67577,7 +69118,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_44__setstat __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_Resource, (type(self), 0x734cfcb, state) + * return __pyx_unpickle_Resource, (type(self), 0x62e918c, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Resource__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -67588,7 +69129,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_44__setstat /* "(tree fragment)":16 * else: - * return __pyx_unpickle_Resource, (type(self), 0x734cfcb, state) + * return __pyx_unpickle_Resource, (type(self), 0x62e918c, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Resource__set_state(self, __pyx_state) */ @@ -67606,7 +69147,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Resource_44__setstat return __pyx_r; } -/* "dependency_injector/providers.pyx":3530 +/* "dependency_injector/providers.pyx":3598 * """ * * def __init__(self, container_cls, container=None, **overriding_providers): # <<<<<<<<<<<<<< @@ -67660,7 +69201,7 @@ static int __pyx_pw_19dependency_injector_9providers_9Container_1__init__(PyObje } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_overriding_providers, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3530, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_overriding_providers, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3598, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -67676,7 +69217,7 @@ static int __pyx_pw_19dependency_injector_9providers_9Container_1__init__(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3530, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3598, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_overriding_providers); __pyx_v_overriding_providers = 0; __Pyx_AddTraceback("dependency_injector.providers.Container.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -67705,7 +69246,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_container); - /* "dependency_injector/providers.pyx":3532 + /* "dependency_injector/providers.pyx":3600 * def __init__(self, container_cls, container=None, **overriding_providers): * """Initialize provider.""" * self.__container_cls = container_cls # <<<<<<<<<<<<<< @@ -67718,7 +69259,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct __Pyx_DECREF(__pyx_v_self->__pyx___container_cls); __pyx_v_self->__pyx___container_cls = __pyx_v_container_cls; - /* "dependency_injector/providers.pyx":3533 + /* "dependency_injector/providers.pyx":3601 * """Initialize provider.""" * self.__container_cls = container_cls * self.__overriding_providers = overriding_providers # <<<<<<<<<<<<<< @@ -67731,7 +69272,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct __Pyx_DECREF(__pyx_v_self->__pyx___overriding_providers); __pyx_v_self->__pyx___overriding_providers = __pyx_v_overriding_providers; - /* "dependency_injector/providers.pyx":3535 + /* "dependency_injector/providers.pyx":3603 * self.__overriding_providers = overriding_providers * * if container is None: # <<<<<<<<<<<<<< @@ -67742,7 +69283,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":3536 + /* "dependency_injector/providers.pyx":3604 * * if container is None: * container = container_cls() # <<<<<<<<<<<<<< @@ -67762,20 +69303,20 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3536, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_container, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3537 + /* "dependency_injector/providers.pyx":3605 * if container is None: * container = container_cls() * container.assign_parent(self) # <<<<<<<<<<<<<< * self.__container = container * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3537, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -67789,12 +69330,12 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3537, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3535 + /* "dependency_injector/providers.pyx":3603 * self.__overriding_providers = overriding_providers * * if container is None: # <<<<<<<<<<<<<< @@ -67803,7 +69344,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct */ } - /* "dependency_injector/providers.pyx":3538 + /* "dependency_injector/providers.pyx":3606 * container = container_cls() * container.assign_parent(self) * self.__container = container # <<<<<<<<<<<<<< @@ -67816,32 +69357,32 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct __Pyx_DECREF(__pyx_v_self->__pyx___container); __pyx_v_self->__pyx___container = __pyx_v_container; - /* "dependency_injector/providers.pyx":3540 + /* "dependency_injector/providers.pyx":3608 * self.__container = container * * if self.__container and self.__overriding_providers: # <<<<<<<<<<<<<< * self.apply_overridings() * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___container); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3540, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___container); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3608, __pyx_L1_error) if (__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L5_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___overriding_providers); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3540, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___overriding_providers); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3608, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":3541 + /* "dependency_injector/providers.pyx":3609 * * if self.__container and self.__overriding_providers: * self.apply_overridings() # <<<<<<<<<<<<<< * * self.__parent = None */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_apply_overridings); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3541, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_apply_overridings); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -67855,12 +69396,12 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3541, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3540 + /* "dependency_injector/providers.pyx":3608 * self.__container = container * * if self.__container and self.__overriding_providers: # <<<<<<<<<<<<<< @@ -67869,7 +69410,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct */ } - /* "dependency_injector/providers.pyx":3543 + /* "dependency_injector/providers.pyx":3611 * self.apply_overridings() * * self.__parent = None # <<<<<<<<<<<<<< @@ -67882,14 +69423,14 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct __Pyx_DECREF(__pyx_v_self->__pyx___parent); __pyx_v_self->__pyx___parent = Py_None; - /* "dependency_injector/providers.pyx":3545 + /* "dependency_injector/providers.pyx":3613 * self.__parent = None * * super(Container, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3545, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); @@ -67897,10 +69438,10 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3545, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3545, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -67915,12 +69456,12 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3545, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3530 + /* "dependency_injector/providers.pyx":3598 * """ * * def __init__(self, container_cls, container=None, **overriding_providers): # <<<<<<<<<<<<<< @@ -67943,7 +69484,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Container___init__(struct return __pyx_r; } -/* "dependency_injector/providers.pyx":3547 +/* "dependency_injector/providers.pyx":3615 * super(Container, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -67983,16 +69524,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":3551 + /* "dependency_injector/providers.pyx":3619 * cdef Container copied * * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3551, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3551, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -68007,14 +69548,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3551, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Container))))) __PYX_ERR(1, 3551, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Container))))) __PYX_ERR(1, 3619, __pyx_L1_error) __pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_Container *)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3552 + /* "dependency_injector/providers.pyx":3620 * * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -68025,7 +69566,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":3553 + /* "dependency_injector/providers.pyx":3621 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -68037,7 +69578,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop __pyx_r = ((PyObject *)__pyx_v_copied); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3552 + /* "dependency_injector/providers.pyx":3620 * * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -68046,16 +69587,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop */ } - /* "dependency_injector/providers.pyx":3555 + /* "dependency_injector/providers.pyx":3623 * return copied * * copied = self.__class__(self.__container_cls, UNDEFINED) # <<<<<<<<<<<<<< * memo[id(self)] = copied * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3555, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3555, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_7 = 0; @@ -68072,7 +69613,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_self->__pyx___container_cls, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3555, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3623, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -68081,14 +69622,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_self->__pyx___container_cls, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3555, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3623, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3555, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -68099,28 +69640,28 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3555, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Container))))) __PYX_ERR(1, 3555, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Container))))) __PYX_ERR(1, 3623, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_copied, ((struct __pyx_obj_19dependency_injector_9providers_Container *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3556 + /* "dependency_injector/providers.pyx":3624 * * copied = self.__class__(self.__container_cls, UNDEFINED) * memo[id(self)] = copied # <<<<<<<<<<<<<< * * copied.__container = deepcopy(self.__container, memo) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3556, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, ((PyObject *)__pyx_v_copied)) < 0)) __PYX_ERR(1, 3556, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, ((PyObject *)__pyx_v_copied)) < 0)) __PYX_ERR(1, 3624, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3558 + /* "dependency_injector/providers.pyx":3626 * memo[id(self)] = copied * * copied.__container = deepcopy(self.__container, memo) # <<<<<<<<<<<<<< @@ -68129,10 +69670,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop */ __pyx_t_1 = __pyx_v_self->__pyx___container; __Pyx_INCREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3558, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3626, __pyx_L1_error) __pyx_t_9.__pyx_n = 1; __pyx_t_9.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3558, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -68141,7 +69682,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop __pyx_v_copied->__pyx___container = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3559 + /* "dependency_injector/providers.pyx":3627 * * copied.__container = deepcopy(self.__container, memo) * copied.__overriding_providers = deepcopy(self.__overriding_providers, memo) # <<<<<<<<<<<<<< @@ -68150,27 +69691,27 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop */ __pyx_t_2 = __pyx_v_self->__pyx___overriding_providers; __Pyx_INCREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3559, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3627, __pyx_L1_error) __pyx_t_9.__pyx_n = 1; __pyx_t_9.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3559, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - 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, 3559, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 3627, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_copied->__pyx___overriding_providers); __Pyx_DECREF(__pyx_v_copied->__pyx___overriding_providers); __pyx_v_copied->__pyx___overriding_providers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3560 + /* "dependency_injector/providers.pyx":3628 * copied.__container = deepcopy(self.__container, memo) * copied.__overriding_providers = deepcopy(self.__overriding_providers, memo) * copied.apply_overridings() # <<<<<<<<<<<<<< * * self._copy_parent(copied, memo) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_copied), __pyx_n_s_apply_overridings); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3560, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_copied), __pyx_n_s_apply_overridings); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -68184,19 +69725,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3560, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3562 + /* "dependency_injector/providers.pyx":3630 * copied.apply_overridings() * * self._copy_parent(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3562, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -68213,7 +69754,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, ((PyObject *)__pyx_v_copied), __pyx_v_memo}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3562, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3630, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -68221,13 +69762,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, ((PyObject *)__pyx_v_copied), __pyx_v_memo}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3562, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3630, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3562, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -68238,14 +69779,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop __Pyx_INCREF(__pyx_v_memo); __Pyx_GIVEREF(__pyx_v_memo); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_v_memo); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3562, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3564 + /* "dependency_injector/providers.pyx":3632 * self._copy_parent(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -68257,7 +69798,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop __pyx_r = ((PyObject *)__pyx_v_copied); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3547 + /* "dependency_injector/providers.pyx":3615 * super(Container, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -68281,7 +69822,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_2__deepcop return __pyx_r; } -/* "dependency_injector/providers.pyx":3566 +/* "dependency_injector/providers.pyx":3634 * return copied * * def __getattr__(self, name): # <<<<<<<<<<<<<< @@ -68320,14 +69861,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_4__getattr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":3568 + /* "dependency_injector/providers.pyx":3636 * def __getattr__(self, name): * """Return dependency provider.""" * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< * raise AttributeError( * '\'{cls}\' object has no attribute ' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3568, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -68339,19 +69880,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_4__getattr __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__11); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3568, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 3568, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 3636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3568, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -68363,72 +69904,72 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_4__getattr __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__11); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3568, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 3568, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 3636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "dependency_injector/providers.pyx":3571 + /* "dependency_injector/providers.pyx":3639 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=name)) * return getattr(self.__container, name) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3571, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3571, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3571, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3571, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 3571, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 3639, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":3572 + /* "dependency_injector/providers.pyx":3640 * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, * attribute_name=name)) # <<<<<<<<<<<<<< * return getattr(self.__container, name) * */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_name) < 0) __PYX_ERR(1, 3571, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_name) < 0) __PYX_ERR(1, 3639, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3571 + /* "dependency_injector/providers.pyx":3639 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=name)) * return getattr(self.__container, name) */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3571, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3569 + /* "dependency_injector/providers.pyx":3637 * """Return dependency provider.""" * if name.startswith('__') and name.endswith('__'): * raise AttributeError( # <<<<<<<<<<<<<< * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3569, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 3569, __pyx_L1_error) + __PYX_ERR(1, 3637, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3568 + /* "dependency_injector/providers.pyx":3636 * def __getattr__(self, name): * """Return dependency provider.""" * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< @@ -68437,7 +69978,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_4__getattr */ } - /* "dependency_injector/providers.pyx":3573 + /* "dependency_injector/providers.pyx":3641 * '\'{attribute_name}\''.format(cls=self.__class__.__name__, * attribute_name=name)) * return getattr(self.__container, name) # <<<<<<<<<<<<<< @@ -68447,14 +69988,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_4__getattr __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_v_self->__pyx___container; __Pyx_INCREF(__pyx_t_3); - __pyx_t_6 = __Pyx_GetAttr(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3573, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetAttr(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3566 + /* "dependency_injector/providers.pyx":3634 * return copied * * def __getattr__(self, name): # <<<<<<<<<<<<<< @@ -68476,7 +70017,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_4__getattr return __pyx_r; } -/* "dependency_injector/providers.pyx":3576 +/* "dependency_injector/providers.pyx":3644 * * @property * def providers(self): # <<<<<<<<<<<<<< @@ -68506,7 +70047,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_9providers int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3577 + /* "dependency_injector/providers.pyx":3645 * @property * def providers(self): * return self.__container.providers # <<<<<<<<<<<<<< @@ -68514,13 +70055,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_9providers * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___container, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3577, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___container, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3576 + /* "dependency_injector/providers.pyx":3644 * * @property * def providers(self): # <<<<<<<<<<<<<< @@ -68539,7 +70080,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_9providers return __pyx_r; } -/* "dependency_injector/providers.pyx":3580 +/* "dependency_injector/providers.pyx":3648 * * @property * def container(self): # <<<<<<<<<<<<<< @@ -68565,7 +70106,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_9container __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3581 + /* "dependency_injector/providers.pyx":3649 * @property * def container(self): * return self.__container # <<<<<<<<<<<<<< @@ -68577,7 +70118,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_9container __pyx_r = __pyx_v_self->__pyx___container; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3580 + /* "dependency_injector/providers.pyx":3648 * * @property * def container(self): # <<<<<<<<<<<<<< @@ -68592,7 +70133,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_9container return __pyx_r; } -/* "dependency_injector/providers.pyx":3583 +/* "dependency_injector/providers.pyx":3651 * return self.__container * * def override(self, provider): # <<<<<<<<<<<<<< @@ -68629,27 +70170,27 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6override( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":3585 + /* "dependency_injector/providers.pyx":3653 * def override(self, provider): * """Override provider with another provider.""" * if not hasattr(provider, 'providers'): # <<<<<<<<<<<<<< * raise Error('Container provider {0} can be overridden only by providers container'.format(self)) * */ - __pyx_t_1 = __Pyx_HasAttr(__pyx_v_provider, __pyx_n_s_providers); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 3585, __pyx_L1_error) + __pyx_t_1 = __Pyx_HasAttr(__pyx_v_provider, __pyx_n_s_providers); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 3653, __pyx_L1_error) __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "dependency_injector/providers.pyx":3586 + /* "dependency_injector/providers.pyx":3654 * """Override provider with another provider.""" * if not hasattr(provider, 'providers'): * raise Error('Container provider {0} can be overridden only by providers container'.format(self)) # <<<<<<<<<<<<<< * * self.__container.override_providers(**provider.providers) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3586, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Container_provider_0_can_be_over, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3586, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Container_provider_0_can_be_over, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -68663,7 +70204,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6override( } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3586, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -68679,14 +70220,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6override( __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(1, 3586, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 3586, __pyx_L1_error) + __PYX_ERR(1, 3654, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3585 + /* "dependency_injector/providers.pyx":3653 * def override(self, provider): * """Override provider with another provider.""" * if not hasattr(provider, 'providers'): # <<<<<<<<<<<<<< @@ -68695,37 +70236,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6override( */ } - /* "dependency_injector/providers.pyx":3588 + /* "dependency_injector/providers.pyx":3656 * raise Error('Container provider {0} can be overridden only by providers container'.format(self)) * * self.__container.override_providers(**provider.providers) # <<<<<<<<<<<<<< * return super().override(provider) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___container, __pyx_n_s_override_providers_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3588, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___container, __pyx_n_s_override_providers_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_providers); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3588, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_providers); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_t_5 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 3588, __pyx_L1_error) + __PYX_ERR(1, 3656, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_t_5))) { - __pyx_t_4 = PyDict_Copy(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3588, __pyx_L1_error) + __pyx_t_4 = PyDict_Copy(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_4 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3588, __pyx_L1_error) + __pyx_t_4 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3588, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":3589 + /* "dependency_injector/providers.pyx":3657 * * self.__container.override_providers(**provider.providers) * return super().override(provider) # <<<<<<<<<<<<<< @@ -68733,7 +70274,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6override( * def reset_last_overriding(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3589, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); @@ -68741,10 +70282,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6override( __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3589, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3589, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -68759,14 +70300,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6override( } __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3589, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3583 + /* "dependency_injector/providers.pyx":3651 * return self.__container * * def override(self, provider): # <<<<<<<<<<<<<< @@ -68789,7 +70330,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6override( return __pyx_r; } -/* "dependency_injector/providers.pyx":3591 +/* "dependency_injector/providers.pyx":3659 * return super().override(provider) * * def reset_last_overriding(self): # <<<<<<<<<<<<<< @@ -68828,14 +70369,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_last_overriding", 0); - /* "dependency_injector/providers.pyx":3599 + /* "dependency_injector/providers.pyx":3667 * :rtype: None * """ * super().reset_last_overriding() # <<<<<<<<<<<<<< * for provider in self.__container.providers.values(): * if not provider.overridden: */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3599, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); @@ -68843,10 +70384,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3599, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3599, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -68861,21 +70402,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3599, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3600 + /* "dependency_injector/providers.pyx":3668 * """ * super().reset_last_overriding() * for provider in self.__container.providers.values(): # <<<<<<<<<<<<<< * if not provider.overridden: * continue */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3600, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3600, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -68890,16 +70431,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las } __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, 3600, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3600, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3668, __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(1, 3600, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3668, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -68907,17 +70448,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3600, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3668, __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(1, 3600, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3600, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3668, __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(1, 3600, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -68927,7 +70468,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 3600, __pyx_L1_error) + else __PYX_ERR(1, 3668, __pyx_L1_error) } break; } @@ -68936,21 +70477,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3601 + /* "dependency_injector/providers.pyx":3669 * super().reset_last_overriding() * for provider in self.__container.providers.values(): * if not provider.overridden: # <<<<<<<<<<<<<< * continue * provider.reset_last_overriding() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3601, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 3601, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 3669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = ((!__pyx_t_6) != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":3602 + /* "dependency_injector/providers.pyx":3670 * for provider in self.__container.providers.values(): * if not provider.overridden: * continue # <<<<<<<<<<<<<< @@ -68959,7 +70500,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las */ goto __pyx_L3_continue; - /* "dependency_injector/providers.pyx":3601 + /* "dependency_injector/providers.pyx":3669 * super().reset_last_overriding() * for provider in self.__container.providers.values(): * if not provider.overridden: # <<<<<<<<<<<<<< @@ -68968,14 +70509,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las */ } - /* "dependency_injector/providers.pyx":3603 + /* "dependency_injector/providers.pyx":3671 * if not provider.overridden: * continue * provider.reset_last_overriding() # <<<<<<<<<<<<<< * * def reset_override(self): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3603, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -68989,12 +70530,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3603, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3600 + /* "dependency_injector/providers.pyx":3668 * """ * super().reset_last_overriding() * for provider in self.__container.providers.values(): # <<<<<<<<<<<<<< @@ -69005,7 +70546,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3591 + /* "dependency_injector/providers.pyx":3659 * return super().override(provider) * * def reset_last_overriding(self): # <<<<<<<<<<<<<< @@ -69030,7 +70571,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_8reset_las return __pyx_r; } -/* "dependency_injector/providers.pyx":3605 +/* "dependency_injector/providers.pyx":3673 * provider.reset_last_overriding() * * def reset_override(self): # <<<<<<<<<<<<<< @@ -69069,14 +70610,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_override", 0); - /* "dependency_injector/providers.pyx":3610 + /* "dependency_injector/providers.pyx":3678 * :rtype: None * """ * super().reset_override() # <<<<<<<<<<<<<< * for provider in self.__container.providers.values(): * if not provider.overridden: */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3610, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); @@ -69084,10 +70625,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3610, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3610, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -69102,21 +70643,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3610, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3611 + /* "dependency_injector/providers.pyx":3679 * """ * super().reset_override() * for provider in self.__container.providers.values(): # <<<<<<<<<<<<<< * if not provider.overridden: * continue */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3611, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3611, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -69131,16 +70672,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov } __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, 3611, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3611, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3679, __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(1, 3611, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3679, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -69148,17 +70689,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3611, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3679, __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(1, 3611, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3611, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3679, __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(1, 3611, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -69168,7 +70709,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 3611, __pyx_L1_error) + else __PYX_ERR(1, 3679, __pyx_L1_error) } break; } @@ -69177,21 +70718,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3612 + /* "dependency_injector/providers.pyx":3680 * super().reset_override() * for provider in self.__container.providers.values(): * if not provider.overridden: # <<<<<<<<<<<<<< * continue * provider.reset_override() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3612, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 3612, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 3680, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = ((!__pyx_t_6) != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":3613 + /* "dependency_injector/providers.pyx":3681 * for provider in self.__container.providers.values(): * if not provider.overridden: * continue # <<<<<<<<<<<<<< @@ -69200,7 +70741,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov */ goto __pyx_L3_continue; - /* "dependency_injector/providers.pyx":3612 + /* "dependency_injector/providers.pyx":3680 * super().reset_override() * for provider in self.__container.providers.values(): * if not provider.overridden: # <<<<<<<<<<<<<< @@ -69209,14 +70750,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov */ } - /* "dependency_injector/providers.pyx":3614 + /* "dependency_injector/providers.pyx":3682 * if not provider.overridden: * continue * provider.reset_override() # <<<<<<<<<<<<<< * * def apply_overridings(self): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3614, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -69230,12 +70771,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3614, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3611 + /* "dependency_injector/providers.pyx":3679 * """ * super().reset_override() * for provider in self.__container.providers.values(): # <<<<<<<<<<<<<< @@ -69246,7 +70787,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3605 + /* "dependency_injector/providers.pyx":3673 * provider.reset_last_overriding() * * def reset_override(self): # <<<<<<<<<<<<<< @@ -69271,7 +70812,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_10reset_ov return __pyx_r; } -/* "dependency_injector/providers.pyx":3616 +/* "dependency_injector/providers.pyx":3684 * provider.reset_override() * * def apply_overridings(self): # <<<<<<<<<<<<<< @@ -69303,25 +70844,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_12apply_ov int __pyx_clineno = 0; __Pyx_RefNannySetupContext("apply_overridings", 0); - /* "dependency_injector/providers.pyx":3621 + /* "dependency_injector/providers.pyx":3689 * This method should not be called directly. It is called on * declarative container initialization.""" * self.__container.override_providers(**self.__overriding_providers) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___container, __pyx_n_s_override_providers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3621, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___container, __pyx_n_s_override_providers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->__pyx___overriding_providers == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 3621, __pyx_L1_error) + __PYX_ERR(1, 3689, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_self->__pyx___overriding_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3621, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_self->__pyx___overriding_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3616 + /* "dependency_injector/providers.pyx":3684 * provider.reset_override() * * def apply_overridings(self): # <<<<<<<<<<<<<< @@ -69344,7 +70885,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_12apply_ov } static PyObject *__pyx_gb_19dependency_injector_9providers_9Container_7related_2generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":3624 +/* "dependency_injector/providers.pyx":3692 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -69377,7 +70918,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_7related__ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_16___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 3624, __pyx_L1_error) + __PYX_ERR(1, 3692, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -69385,7 +70926,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_7related__ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_9Container_7related_2generator14, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Container___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3624, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_9Container_7related_2generator14, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Container___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3692, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -69422,18 +70963,18 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_9Container_7related_2 return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3624, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3692, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3626 + /* "dependency_injector/providers.pyx":3694 * def related(self): * """Return related providers generator.""" * yield from self.providers.values() # <<<<<<<<<<<<<< * yield from super().related * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3626, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3626, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -69448,7 +70989,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_9Container_7related_2 } __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, 3626, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -69462,23 +71003,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_9Container_7related_2 __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3626, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3694, __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(1, 3626, __pyx_L1_error) + else __PYX_ERR(1, 3694, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":3627 + /* "dependency_injector/providers.pyx":3695 * """Return related providers generator.""" * yield from self.providers.values() * yield from super().related # <<<<<<<<<<<<<< * * def resolve_provider_name(self, provider): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3627, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); @@ -69486,10 +71027,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_9Container_7related_2 __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3627, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3627, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); @@ -69503,17 +71044,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_9Container_7related_2 __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3627, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3695, __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(1, 3627, __pyx_L1_error) + else __PYX_ERR(1, 3695, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":3624 + /* "dependency_injector/providers.pyx":3692 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -69540,7 +71081,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_9Container_7related_2 return __pyx_r; } -/* "dependency_injector/providers.pyx":3629 +/* "dependency_injector/providers.pyx":3697 * yield from super().related * * def resolve_provider_name(self, provider): # <<<<<<<<<<<<<< @@ -69584,16 +71125,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resolve_provider_name", 0); - /* "dependency_injector/providers.pyx":3631 + /* "dependency_injector/providers.pyx":3699 * def resolve_provider_name(self, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): # <<<<<<<<<<<<<< * if container_provider is provider: * return provider_name */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3631, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3699, __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(1, 3631, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -69608,16 +71149,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ } __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, 3631, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3631, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3699, __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(1, 3631, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3699, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -69625,17 +71166,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3631, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3699, __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(1, 3631, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3631, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 3699, __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(1, 3631, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -69645,7 +71186,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 3631, __pyx_L1_error) + else __PYX_ERR(1, 3699, __pyx_L1_error) } break; } @@ -69657,7 +71198,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 3631, __pyx_L1_error) + __PYX_ERR(1, 3699, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -69670,15 +71211,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3631, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3631, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3699, __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, 3631, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3699, __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; @@ -69686,7 +71227,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 3631, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 3699, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -69694,7 +71235,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 3631, __pyx_L1_error) + __PYX_ERR(1, 3699, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_provider_name, __pyx_t_2); @@ -69702,7 +71243,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ __Pyx_XDECREF_SET(__pyx_v_container_provider, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":3632 + /* "dependency_injector/providers.pyx":3700 * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): * if container_provider is provider: # <<<<<<<<<<<<<< @@ -69713,7 +71254,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "dependency_injector/providers.pyx":3633 + /* "dependency_injector/providers.pyx":3701 * for provider_name, container_provider in self.providers.items(): * if container_provider is provider: * return provider_name # <<<<<<<<<<<<<< @@ -69726,7 +71267,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3632 + /* "dependency_injector/providers.pyx":3700 * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): * if container_provider is provider: # <<<<<<<<<<<<<< @@ -69735,7 +71276,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ */ } - /* "dependency_injector/providers.pyx":3631 + /* "dependency_injector/providers.pyx":3699 * def resolve_provider_name(self, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): # <<<<<<<<<<<<<< @@ -69745,16 +71286,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ } /*else*/ { - /* "dependency_injector/providers.pyx":3635 + /* "dependency_injector/providers.pyx":3703 * return provider_name * else: * raise Error(f'Can not resolve name for provider "{provider}"') # <<<<<<<<<<<<<< * * @property */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3635, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3635, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = 0; __pyx_t_12 = 127; @@ -69762,18 +71303,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ __pyx_t_11 += 35; __Pyx_GIVEREF(__pyx_kp_u_Can_not_resolve_name_for_provide); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Can_not_resolve_name_for_provide); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_provider, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3635, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_provider, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_12; __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__5); + __Pyx_INCREF(__pyx_kp_u__4); __pyx_t_11 += 1; - __Pyx_GIVEREF(__pyx_kp_u__5); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3635, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__4); + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -69789,15 +71330,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3635, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 3635, __pyx_L1_error) + __PYX_ERR(1, 3703, __pyx_L1_error) } - /* "dependency_injector/providers.pyx":3631 + /* "dependency_injector/providers.pyx":3699 * def resolve_provider_name(self, provider): * """Try to resolve provider name.""" * for provider_name, container_provider in self.providers.items(): # <<<<<<<<<<<<<< @@ -69806,7 +71347,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ */ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3629 + /* "dependency_injector/providers.pyx":3697 * yield from super().related * * def resolve_provider_name(self, provider): # <<<<<<<<<<<<<< @@ -69831,7 +71372,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_14resolve_ return __pyx_r; } -/* "dependency_injector/providers.pyx":3638 +/* "dependency_injector/providers.pyx":3706 * * @property * def parent(self): # <<<<<<<<<<<<<< @@ -69857,7 +71398,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6parent___ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3640 + /* "dependency_injector/providers.pyx":3708 * def parent(self): * """Return parent.""" * return self.__parent # <<<<<<<<<<<<<< @@ -69869,7 +71410,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6parent___ __pyx_r = __pyx_v_self->__pyx___parent; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3638 + /* "dependency_injector/providers.pyx":3706 * * @property * def parent(self): # <<<<<<<<<<<<<< @@ -69884,7 +71425,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_6parent___ return __pyx_r; } -/* "dependency_injector/providers.pyx":3643 +/* "dependency_injector/providers.pyx":3711 * * @property * def parent_name(self): # <<<<<<<<<<<<<< @@ -69919,18 +71460,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_11parent_n int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3645 + /* "dependency_injector/providers.pyx":3713 * def parent_name(self): * """Return parent name.""" * if not self.__parent: # <<<<<<<<<<<<<< * return None * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___parent); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3645, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___parent); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3713, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":3646 + /* "dependency_injector/providers.pyx":3714 * """Return parent name.""" * if not self.__parent: * return None # <<<<<<<<<<<<<< @@ -69941,7 +71482,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_11parent_n __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/providers.pyx":3645 + /* "dependency_injector/providers.pyx":3713 * def parent_name(self): * """Return parent name.""" * if not self.__parent: # <<<<<<<<<<<<<< @@ -69950,51 +71491,51 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_11parent_n */ } - /* "dependency_injector/providers.pyx":3648 + /* "dependency_injector/providers.pyx":3716 * return None * * name = '' # <<<<<<<<<<<<<< * if self.__parent.parent_name: * name += f'{self.__parent.parent_name}.' */ - __Pyx_INCREF(__pyx_kp_s__10); - __pyx_v_name = __pyx_kp_s__10; + __Pyx_INCREF(__pyx_kp_s__9); + __pyx_v_name = __pyx_kp_s__9; - /* "dependency_injector/providers.pyx":3649 + /* "dependency_injector/providers.pyx":3717 * * name = '' * if self.__parent.parent_name: # <<<<<<<<<<<<<< * name += f'{self.__parent.parent_name}.' * name += f'{self.__parent.resolve_provider_name(self)}' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3649, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 3649, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 3717, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":3650 + /* "dependency_injector/providers.pyx":3718 * name = '' * if self.__parent.parent_name: * name += f'{self.__parent.parent_name}.' # <<<<<<<<<<<<<< * name += f'{self.__parent.resolve_provider_name(self)}' * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3650, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_parent_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3650, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_kp_u__7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3650, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_kp_u__6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3650, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3649 + /* "dependency_injector/providers.pyx":3717 * * name = '' * if self.__parent.parent_name: # <<<<<<<<<<<<<< @@ -70003,14 +71544,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_11parent_n */ } - /* "dependency_injector/providers.pyx":3651 + /* "dependency_injector/providers.pyx":3719 * if self.__parent.parent_name: * name += f'{self.__parent.parent_name}.' * name += f'{self.__parent.resolve_provider_name(self)}' # <<<<<<<<<<<<<< * * return name */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_resolve_provider_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3651, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___parent, __pyx_n_s_resolve_provider_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -70024,19 +71565,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_11parent_n } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3651, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3651, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3651, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3653 + /* "dependency_injector/providers.pyx":3721 * name += f'{self.__parent.resolve_provider_name(self)}' * * return name # <<<<<<<<<<<<<< @@ -70048,7 +71589,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_11parent_n __pyx_r = __pyx_v_name; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3643 + /* "dependency_injector/providers.pyx":3711 * * @property * def parent_name(self): # <<<<<<<<<<<<<< @@ -70070,7 +71611,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_11parent_n return __pyx_r; } -/* "dependency_injector/providers.pyx":3655 +/* "dependency_injector/providers.pyx":3723 * return name * * def assign_parent(self, parent): # <<<<<<<<<<<<<< @@ -70097,7 +71638,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_16assign_p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("assign_parent", 0); - /* "dependency_injector/providers.pyx":3657 + /* "dependency_injector/providers.pyx":3725 * def assign_parent(self, parent): * """Assign parent.""" * self.__parent = parent # <<<<<<<<<<<<<< @@ -70110,7 +71651,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_16assign_p __Pyx_DECREF(__pyx_v_self->__pyx___parent); __pyx_v_self->__pyx___parent = __pyx_v_parent; - /* "dependency_injector/providers.pyx":3655 + /* "dependency_injector/providers.pyx":3723 * return name * * def assign_parent(self, parent): # <<<<<<<<<<<<<< @@ -70125,7 +71666,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_16assign_p return __pyx_r; } -/* "dependency_injector/providers.pyx":3659 +/* "dependency_injector/providers.pyx":3727 * self.__parent = parent * * def _copy_parent(self, copied, memo): # <<<<<<<<<<<<<< @@ -70167,11 +71708,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9Container_19_copy_pa case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, 1); __PYX_ERR(1, 3659, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, 1); __PYX_ERR(1, 3727, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_parent") < 0)) __PYX_ERR(1, 3659, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_parent") < 0)) __PYX_ERR(1, 3727, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -70184,7 +71725,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9Container_19_copy_pa } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3659, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3727, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Container._copy_parent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -70206,19 +71747,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_18_copy_pa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_copy_parent", 0); - /* "dependency_injector/providers.pyx":3660 + /* "dependency_injector/providers.pyx":3728 * * def _copy_parent(self, copied, memo): * _copy_parent(self, copied, memo) # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3660, __pyx_L1_error) - __pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_parent(((PyObject *)__pyx_v_self), __pyx_v_copied, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3660, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3728, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_parent(((PyObject *)__pyx_v_self), __pyx_v_copied, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3659 + /* "dependency_injector/providers.pyx":3727 * self.__parent = parent * * def _copy_parent(self, copied, memo): # <<<<<<<<<<<<<< @@ -70239,7 +71780,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_18_copy_pa return __pyx_r; } -/* "dependency_injector/providers.pyx":3662 +/* "dependency_injector/providers.pyx":3730 * _copy_parent(self, copied, memo) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -70270,7 +71811,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Container__provide(st if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3662, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_9Container_21_provide)) { __Pyx_XDECREF(__pyx_r); @@ -70290,7 +71831,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Container__provide(st #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3662, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3730, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -70298,13 +71839,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Container__provide(st #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3662, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3730, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3662, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -70315,7 +71856,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Container__provide(st __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3662, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -70338,7 +71879,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Container__provide(st #endif } - /* "dependency_injector/providers.pyx":3664 + /* "dependency_injector/providers.pyx":3732 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * return self.__container # <<<<<<<<<<<<<< @@ -70350,7 +71891,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Container__provide(st __pyx_r = __pyx_v_self->__pyx___container; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3662 + /* "dependency_injector/providers.pyx":3730 * _copy_parent(self, copied, memo) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -70408,11 +71949,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9Container_21_provide case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3662, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3730, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3662, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3730, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -70425,14 +71966,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9Container_21_provide } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3662, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3730, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Container._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3662, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3662, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3730, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3730, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_9Container_20_provide(((struct __pyx_obj_19dependency_injector_9providers_Container *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -70453,7 +71994,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_20_provide int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9Container__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3662, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9Container__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -70822,12 +72363,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Container_24__setsta return __pyx_r; } -/* "dependency_injector/providers.pyx":3698 +/* "dependency_injector/providers.pyx":3766 * """ * - * def __init__(self, selector, **providers): # <<<<<<<<<<<<<< + * def __init__(self, selector=None, **providers): # <<<<<<<<<<<<<< * """Initialize provider.""" - * self.__selector = selector + * self.__selector = None */ /* Python wrapper */ @@ -70850,6 +72391,7 @@ static int __pyx_pw_19dependency_injector_9providers_8Selector_1__init__(PyObjec { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_selector,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -70862,22 +72404,27 @@ static int __pyx_pw_19dependency_injector_9providers_8Selector_1__init__(PyObjec kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_selector)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_selector); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_providers, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3698, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_providers, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3766, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } } __pyx_v_selector = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3698, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3766, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_providers); __pyx_v_providers = 0; __Pyx_AddTraceback("dependency_injector.providers.Selector.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -70903,53 +72450,28 @@ static int __pyx_pf_19dependency_injector_9providers_8Selector___init__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":3700 - * def __init__(self, selector, **providers): + /* "dependency_injector/providers.pyx":3768 + * def __init__(self, selector=None, **providers): * """Initialize provider.""" - * self.__selector = selector # <<<<<<<<<<<<<< - * self.__providers = providers - * super(Selector, self).__init__() + * self.__selector = None # <<<<<<<<<<<<<< + * self.set_selector(selector) + * */ - __Pyx_INCREF(__pyx_v_selector); - __Pyx_GIVEREF(__pyx_v_selector); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->__pyx___selector); __Pyx_DECREF(__pyx_v_self->__pyx___selector); - __pyx_v_self->__pyx___selector = __pyx_v_selector; + __pyx_v_self->__pyx___selector = Py_None; - /* "dependency_injector/providers.pyx":3701 + /* "dependency_injector/providers.pyx":3769 * """Initialize provider.""" - * self.__selector = selector - * self.__providers = providers # <<<<<<<<<<<<<< - * super(Selector, self).__init__() + * self.__selector = None + * self.set_selector(selector) # <<<<<<<<<<<<<< * + * self.__providers = {} */ - __Pyx_INCREF(__pyx_v_providers); - __Pyx_GIVEREF(__pyx_v_providers); - __Pyx_GOTREF(__pyx_v_self->__pyx___providers); - __Pyx_DECREF(__pyx_v_self->__pyx___providers); - __pyx_v_self->__pyx___providers = __pyx_v_providers; - - /* "dependency_injector/providers.pyx":3702 - * self.__selector = selector - * self.__providers = providers - * super(Selector, self).__init__() # <<<<<<<<<<<<<< - * - * def __deepcopy__(self, memo): - */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3702, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_selector); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Selector)); - __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Selector)); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Selector)); - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3702, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3702, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); @@ -70960,19 +72482,86 @@ static int __pyx_pf_19dependency_injector_9providers_8Selector___init__(struct _ __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_selector) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_selector); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3702, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3698 + /* "dependency_injector/providers.pyx":3771 + * self.set_selector(selector) + * + * self.__providers = {} # <<<<<<<<<<<<<< + * self.set_providers(**providers) + * + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->__pyx___providers); + __Pyx_DECREF(__pyx_v_self->__pyx___providers); + __pyx_v_self->__pyx___providers = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":3772 + * + * self.__providers = {} + * self.set_providers(**providers) # <<<<<<<<<<<<<< + * + * super(Selector, self).__init__() + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "dependency_injector/providers.pyx":3774 + * self.set_providers(**providers) + * + * super(Selector, self).__init__() # <<<<<<<<<<<<<< + * + * def __deepcopy__(self, memo): + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Selector)); + __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Selector)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Selector)); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3774, __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); + } + } + __pyx_t_2 = (__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_2)) __PYX_ERR(1, 3774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "dependency_injector/providers.pyx":3766 * """ * - * def __init__(self, selector, **providers): # <<<<<<<<<<<<<< + * def __init__(self, selector=None, **providers): # <<<<<<<<<<<<<< * """Initialize provider.""" - * self.__selector = selector + * self.__selector = None */ /* function exit code */ @@ -70989,7 +72578,7 @@ static int __pyx_pf_19dependency_injector_9providers_8Selector___init__(struct _ return __pyx_r; } -/* "dependency_injector/providers.pyx":3704 +/* "dependency_injector/providers.pyx":3776 * super(Selector, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -71022,22 +72611,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_2__deepcopy int __pyx_t_5; int __pyx_t_6; struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7; - PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":3706 + /* "dependency_injector/providers.pyx":3778 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3706, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3706, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -71052,13 +72640,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_2__deepcopy __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3706, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3707 + /* "dependency_injector/providers.pyx":3779 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -71069,19 +72657,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_2__deepcopy __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":3708 + /* "dependency_injector/providers.pyx":3780 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * copied = self.__class__( + * copied = _memorized_duplicate(self, memo) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_copied); __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3707 + /* "dependency_injector/providers.pyx":3779 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -71090,101 +72678,102 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_2__deepcopy */ } - /* "dependency_injector/providers.pyx":3710 + /* "dependency_injector/providers.pyx":3782 * return copied * - * copied = self.__class__( # <<<<<<<<<<<<<< - * deepcopy(self.__selector, memo), - * **deepcopy(self.__providers, memo), + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_selector(deepcopy(self.__selector, memo)) + * copied.set_providers(**deepcopy(self.__providers, memo)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3710, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3782, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3711 + /* "dependency_injector/providers.pyx":3783 + * + * copied = _memorized_duplicate(self, memo) + * copied.set_selector(deepcopy(self.__selector, memo)) # <<<<<<<<<<<<<< + * copied.set_providers(**deepcopy(self.__providers, memo)) * - * copied = self.__class__( - * deepcopy(self.__selector, memo), # <<<<<<<<<<<<<< - * **deepcopy(self.__providers, memo), - * ) */ - __pyx_t_2 = __pyx_v_self->__pyx___selector; - __Pyx_INCREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3711, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_selector); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3783, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_self->__pyx___selector; + __Pyx_INCREF(__pyx_t_3); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3783, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3711, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3783, __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 && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_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(1, 3783, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3710 - * return copied + /* "dependency_injector/providers.pyx":3784 + * copied = _memorized_duplicate(self, memo) + * copied.set_selector(deepcopy(self.__selector, memo)) + * copied.set_providers(**deepcopy(self.__providers, memo)) # <<<<<<<<<<<<<< * - * copied = self.__class__( # <<<<<<<<<<<<<< - * deepcopy(self.__selector, memo), - * **deepcopy(self.__providers, memo), - */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3710, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); - __pyx_t_3 = 0; - - /* "dependency_injector/providers.pyx":3712 - * copied = self.__class__( - * deepcopy(self.__selector, memo), - * **deepcopy(self.__providers, memo), # <<<<<<<<<<<<<< - * ) * self._copy_overridings(copied, memo) */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_self->__pyx___providers; __Pyx_INCREF(__pyx_t_4); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3712, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3784, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3712, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(__pyx_t_8 == Py_None)) { + if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 3712, __pyx_L1_error) + __PYX_ERR(1, 3784, __pyx_L1_error) } - if (likely(PyDict_CheckExact(__pyx_t_8))) { - __pyx_t_3 = PyDict_Copy(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3712, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (likely(PyDict_CheckExact(__pyx_t_3))) { + __pyx_t_2 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3710, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - - /* "dependency_injector/providers.pyx":3710 - * return copied - * - * copied = self.__class__( # <<<<<<<<<<<<<< - * deepcopy(self.__selector, memo), - * **deepcopy(self.__providers, memo), - */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3710, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_8); - __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":3714 - * **deepcopy(self.__providers, memo), - * ) + /* "dependency_injector/providers.pyx":3786 + * copied.set_providers(**deepcopy(self.__providers, memo)) + * * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< * * return copied */ - if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3714, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3714, __pyx_L1_error) + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3786, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3786, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_Selector *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":3716 + /* "dependency_injector/providers.pyx":3788 * self._copy_overridings(copied, memo) * * return copied # <<<<<<<<<<<<<< @@ -71196,7 +72785,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_2__deepcopy __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3704 + /* "dependency_injector/providers.pyx":3776 * super(Selector, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -71210,7 +72799,6 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_2__deepcopy __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("dependency_injector.providers.Selector.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -71220,7 +72808,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_2__deepcopy return __pyx_r; } -/* "dependency_injector/providers.pyx":3718 +/* "dependency_injector/providers.pyx":3790 * return copied * * def __getattr__(self, name): # <<<<<<<<<<<<<< @@ -71259,14 +72847,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_4__getattr_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":3720 + /* "dependency_injector/providers.pyx":3792 * def __getattr__(self, name): * """Return provider.""" * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< * raise AttributeError( * '\'{cls}\' object has no attribute ' */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3720, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -71278,19 +72866,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_4__getattr_ __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__11); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3720, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 3720, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 3792, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3720, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -71302,72 +72890,72 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_4__getattr_ __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__11); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3720, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 3720, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 3792, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "dependency_injector/providers.pyx":3723 + /* "dependency_injector/providers.pyx":3795 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=name)) * if name not in self.__providers: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3723, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3723, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3723, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3723, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 3723, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 3795, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":3724 + /* "dependency_injector/providers.pyx":3796 * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, * attribute_name=name)) # <<<<<<<<<<<<<< * if name not in self.__providers: * raise AttributeError('Selector has no "{0}" provider'.format(name)) */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_name) < 0) __PYX_ERR(1, 3723, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_name) < 0) __PYX_ERR(1, 3795, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3723 + /* "dependency_injector/providers.pyx":3795 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=name)) * if name not in self.__providers: */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3723, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3721 + /* "dependency_injector/providers.pyx":3793 * """Return provider.""" * if name.startswith('__') and name.endswith('__'): * raise AttributeError( # <<<<<<<<<<<<<< * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3721, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(1, 3721, __pyx_L1_error) + __PYX_ERR(1, 3793, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3720 + /* "dependency_injector/providers.pyx":3792 * def __getattr__(self, name): * """Return provider.""" * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< @@ -71376,7 +72964,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_4__getattr_ */ } - /* "dependency_injector/providers.pyx":3725 + /* "dependency_injector/providers.pyx":3797 * '\'{attribute_name}\''.format(cls=self.__class__.__name__, * attribute_name=name)) * if name not in self.__providers: # <<<<<<<<<<<<<< @@ -71385,20 +72973,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_4__getattr_ */ if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 3725, __pyx_L1_error) + __PYX_ERR(1, 3797, __pyx_L1_error) } - __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_self->__pyx___providers, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3725, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_self->__pyx___providers, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 3797, __pyx_L1_error) __pyx_t_5 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_5)) { - /* "dependency_injector/providers.pyx":3726 + /* "dependency_injector/providers.pyx":3798 * attribute_name=name)) * if name not in self.__providers: * raise AttributeError('Selector has no "{0}" provider'.format(name)) # <<<<<<<<<<<<<< * * return self.__providers[name] */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Selector_has_no_0_provider, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3726, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Selector_has_no_0_provider, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -71412,17 +73000,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_4__getattr_ } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_name); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3726, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3726, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(1, 3726, __pyx_L1_error) + __PYX_ERR(1, 3798, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3725 + /* "dependency_injector/providers.pyx":3797 * '\'{attribute_name}\''.format(cls=self.__class__.__name__, * attribute_name=name)) * if name not in self.__providers: # <<<<<<<<<<<<<< @@ -71431,7 +73019,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_4__getattr_ */ } - /* "dependency_injector/providers.pyx":3728 + /* "dependency_injector/providers.pyx":3800 * raise AttributeError('Selector has no "{0}" provider'.format(name)) * * return self.__providers[name] # <<<<<<<<<<<<<< @@ -71441,15 +73029,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_4__getattr_ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 3728, __pyx_L1_error) + __PYX_ERR(1, 3800, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx___providers, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3728, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx___providers, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3718 + /* "dependency_injector/providers.pyx":3790 * return copied * * def __getattr__(self, name): # <<<<<<<<<<<<<< @@ -71471,7 +73059,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_4__getattr_ return __pyx_r; } -/* "dependency_injector/providers.pyx":3730 +/* "dependency_injector/providers.pyx":3802 * return self.__providers[name] * * def __str__(self): # <<<<<<<<<<<<<< @@ -71497,7 +73085,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_7__str__(Py } static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2generator22(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":3740 +/* "dependency_injector/providers.pyx":3812 * selector=self.__selector, * providers=', '.join(( * '{0}={1}'.format(name, provider) # <<<<<<<<<<<<<< @@ -71517,7 +73105,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_7__str___ge if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_18_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 3740, __pyx_L1_error) + __PYX_ERR(1, 3812, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -71525,7 +73113,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_7__str___ge __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_9providers_8Selector_7__str___2generator22, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3740, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_8Selector_7__str___2generator22, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3812, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -71567,29 +73155,29 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3740, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3812, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3741 + /* "dependency_injector/providers.pyx":3813 * providers=', '.join(( * '{0}={1}'.format(name, provider) * for name, provider in self.__providers.items() # <<<<<<<<<<<<<< * )), * address=hex(id(self)), */ - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(1, 3741, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(1, 3813, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx___providers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(1, 3741, __pyx_L1_error) + __PYX_ERR(1, 3813, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx___providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3741, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx___providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3813, __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, 3741, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3813, __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, 3741, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3813, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -71597,17 +73185,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g 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, 3741, __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, 3813, __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, 3741, __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, 3813, __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, 3741, __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, 3813, __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, 3741, __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, 3813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -71617,7 +73205,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 3741, __pyx_L1_error) + else __PYX_ERR(1, 3813, __pyx_L1_error) } break; } @@ -71629,7 +73217,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 3741, __pyx_L1_error) + __PYX_ERR(1, 3813, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -71642,15 +73230,15 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g __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, 3741, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3741, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3813, __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, 3741, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3813, __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; @@ -71658,7 +73246,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g __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(1, 3741, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 3813, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; @@ -71666,7 +73254,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 3741, __pyx_L1_error) + __PYX_ERR(1, 3813, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name); @@ -71678,14 +73266,14 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":3740 + /* "dependency_injector/providers.pyx":3812 * selector=self.__selector, * providers=', '.join(( * '{0}={1}'.format(name, provider) # <<<<<<<<<<<<<< * for name, provider in self.__providers.items() * )), */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3740, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; __pyx_t_9 = 0; @@ -71702,7 +73290,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_name, __pyx_cur_scope->__pyx_v_provider}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3740, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3812, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -71710,13 +73298,13 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_name, __pyx_cur_scope->__pyx_v_provider}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3740, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3812, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3740, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 3812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -71727,7 +73315,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g __Pyx_INCREF(__pyx_cur_scope->__pyx_v_provider); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_provider); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_cur_scope->__pyx_v_provider); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3740, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -71750,9 +73338,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; __pyx_t_4 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3740, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3812, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3741 + /* "dependency_injector/providers.pyx":3813 * providers=', '.join(( * '{0}={1}'.format(name, provider) * for name, provider in self.__providers.items() # <<<<<<<<<<<<<< @@ -71763,7 +73351,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":3740 + /* "dependency_injector/providers.pyx":3812 * selector=self.__selector, * providers=', '.join(( * '{0}={1}'.format(name, provider) # <<<<<<<<<<<<<< @@ -71792,7 +73380,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7__str___2g return __pyx_r; } -/* "dependency_injector/providers.pyx":3730 +/* "dependency_injector/providers.pyx":3802 * return self.__providers[name] * * def __str__(self): # <<<<<<<<<<<<<< @@ -71817,7 +73405,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_6__str__(st if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_17___str__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 3730, __pyx_L1_error) + __PYX_ERR(1, 3802, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -71825,7 +73413,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_6__str__(st __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "dependency_injector/providers.pyx":3736 + /* "dependency_injector/providers.pyx":3808 * """ * * return '<{provider}({selector}, {providers}) at {address}>'.format( # <<<<<<<<<<<<<< @@ -71833,29 +73421,29 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_6__str__(st * selector=self.__selector, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_provider_selector_providers_at, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3736, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_provider_selector_providers_at, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":3737 + /* "dependency_injector/providers.pyx":3809 * * return '<{provider}({selector}, {providers}) at {address}>'.format( * provider='.'.join(( self.__class__.__module__, self.__class__.__name__)), # <<<<<<<<<<<<<< * selector=self.__selector, * providers=', '.join(( */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3737, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3737, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3737, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3737, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3737, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3737, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); @@ -71863,67 +73451,67 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_6__str__(st PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3737, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provider, __pyx_t_5) < 0) __PYX_ERR(1, 3737, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provider, __pyx_t_5) < 0) __PYX_ERR(1, 3809, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":3738 + /* "dependency_injector/providers.pyx":3810 * return '<{provider}({selector}, {providers}) at {address}>'.format( * provider='.'.join(( self.__class__.__module__, self.__class__.__name__)), * selector=self.__selector, # <<<<<<<<<<<<<< * providers=', '.join(( * '{0}={1}'.format(name, provider) */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_selector, __pyx_cur_scope->__pyx_v_self->__pyx___selector) < 0) __PYX_ERR(1, 3737, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_selector, __pyx_cur_scope->__pyx_v_self->__pyx___selector) < 0) __PYX_ERR(1, 3809, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3740 + /* "dependency_injector/providers.pyx":3812 * selector=self.__selector, * providers=', '.join(( * '{0}={1}'.format(name, provider) # <<<<<<<<<<<<<< * for name, provider in self.__providers.items() * )), */ - __pyx_t_5 = __pyx_pf_19dependency_injector_9providers_8Selector_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3740, __pyx_L1_error) + __pyx_t_5 = __pyx_pf_19dependency_injector_9providers_8Selector_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "dependency_injector/providers.pyx":3739 + /* "dependency_injector/providers.pyx":3811 * provider='.'.join(( self.__class__.__module__, self.__class__.__name__)), * selector=self.__selector, * providers=', '.join(( # <<<<<<<<<<<<<< * '{0}={1}'.format(name, provider) * for name, provider in self.__providers.items() */ - __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__29, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3739, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__28, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_providers, __pyx_t_3) < 0) __PYX_ERR(1, 3737, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_providers, __pyx_t_3) < 0) __PYX_ERR(1, 3809, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":3743 + /* "dependency_injector/providers.pyx":3815 * for name, provider in self.__providers.items() * )), * address=hex(id(self)), # <<<<<<<<<<<<<< * ) * */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3743, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3743, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_address, __pyx_t_5) < 0) __PYX_ERR(1, 3737, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_address, __pyx_t_5) < 0) __PYX_ERR(1, 3809, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":3736 + /* "dependency_injector/providers.pyx":3808 * """ * * return '<{provider}({selector}, {providers}) at {address}>'.format( # <<<<<<<<<<<<<< * provider='.'.join(( self.__class__.__module__, self.__class__.__name__)), * selector=self.__selector, */ - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3736, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -71931,7 +73519,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_6__str__(st __pyx_t_5 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3730 + /* "dependency_injector/providers.pyx":3802 * return self.__providers[name] * * def __str__(self): # <<<<<<<<<<<<<< @@ -71955,7 +73543,127 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_6__str__(st return __pyx_r; } -/* "dependency_injector/providers.pyx":3747 +/* "dependency_injector/providers.pyx":3819 + * + * @property + * def selector(self): # <<<<<<<<<<<<<< + * """Return selector.""" + * return self.__selector + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_8selector_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_8selector_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Selector_8selector___get__(((struct __pyx_obj_19dependency_injector_9providers_Selector *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_8selector___get__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "dependency_injector/providers.pyx":3821 + * def selector(self): + * """Return selector.""" + * return self.__selector # <<<<<<<<<<<<<< + * + * def set_selector(self, selector): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->__pyx___selector); + __pyx_r = __pyx_v_self->__pyx___selector; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":3819 + * + * @property + * def selector(self): # <<<<<<<<<<<<<< + * """Return selector.""" + * return self.__selector + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":3823 + * return self.__selector + * + * def set_selector(self, selector): # <<<<<<<<<<<<<< + * """Set selector.""" + * self.__selector = selector + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_9set_selector(PyObject *__pyx_v_self, PyObject *__pyx_v_selector); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Selector_8set_selector[] = "Set selector."; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_9set_selector(PyObject *__pyx_v_self, PyObject *__pyx_v_selector) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_selector (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Selector_8set_selector(((struct __pyx_obj_19dependency_injector_9providers_Selector *)__pyx_v_self), ((PyObject *)__pyx_v_selector)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_8set_selector(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v_selector) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_selector", 0); + + /* "dependency_injector/providers.pyx":3825 + * def set_selector(self, selector): + * """Set selector.""" + * self.__selector = selector # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_selector); + __Pyx_GIVEREF(__pyx_v_selector); + __Pyx_GOTREF(__pyx_v_self->__pyx___selector); + __Pyx_DECREF(__pyx_v_self->__pyx___selector); + __pyx_v_self->__pyx___selector = __pyx_v_selector; + + /* "dependency_injector/providers.pyx":3826 + * """Set selector.""" + * self.__selector = selector + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":3823 + * return self.__selector + * + * def set_selector(self, selector): # <<<<<<<<<<<<<< + * """Set selector.""" + * self.__selector = selector + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":3829 * * @property * def providers(self): # <<<<<<<<<<<<<< @@ -71985,25 +73693,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_9providers_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3749 + /* "dependency_injector/providers.pyx":3831 * def providers(self): * """Return providers.""" * return dict(self.__providers) # <<<<<<<<<<<<<< * - * @property + * def set_providers(self, **providers: Provider): */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); - __PYX_ERR(1, 3749, __pyx_L1_error) + __PYX_ERR(1, 3831, __pyx_L1_error) } - __pyx_t_1 = PyDict_Copy(__pyx_v_self->__pyx___providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3749, __pyx_L1_error) + __pyx_t_1 = PyDict_Copy(__pyx_v_self->__pyx___providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3747 + /* "dependency_injector/providers.pyx":3829 * * @property * def providers(self): # <<<<<<<<<<<<<< @@ -72021,9 +73729,83 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_9providers_ __Pyx_RefNannyFinishContext(); return __pyx_r; } + +/* "dependency_injector/providers.pyx":3833 + * return dict(self.__providers) + * + * def set_providers(self, **providers: Provider): # <<<<<<<<<<<<<< + * """Set providers.""" + * self.__providers = providers + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_11set_providers(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Selector_10set_providers[] = "Set providers."; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_11set_providers(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_providers = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_providers (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("set_providers", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} + if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_providers", 1))) return NULL; + __pyx_v_providers = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_providers)) return NULL; + __Pyx_GOTREF(__pyx_v_providers); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Selector_10set_providers(((struct __pyx_obj_19dependency_injector_9providers_Selector *)__pyx_v_self), __pyx_v_providers); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_providers); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_10set_providers(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v_providers) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_providers", 0); + + /* "dependency_injector/providers.pyx":3835 + * def set_providers(self, **providers: Provider): + * """Set providers.""" + * self.__providers = providers # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_providers); + __Pyx_GIVEREF(__pyx_v_providers); + __Pyx_GOTREF(__pyx_v_self->__pyx___providers); + __Pyx_DECREF(__pyx_v_self->__pyx___providers); + __pyx_v_self->__pyx___providers = __pyx_v_providers; + + /* "dependency_injector/providers.pyx":3836 + * """Set providers.""" + * self.__providers = providers + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":3833 + * return dict(self.__providers) + * + * def set_providers(self, **providers: Provider): # <<<<<<<<<<<<<< + * """Set providers.""" + * self.__providers = providers + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7related_2generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":3752 +/* "dependency_injector/providers.pyx":3839 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -72056,7 +73838,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_7related___ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_19___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 3752, __pyx_L1_error) + __PYX_ERR(1, 3839, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -72064,7 +73846,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_7related___ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_8Selector_7related_2generator15, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Selector___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3752, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_8Selector_7related_2generator15, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_Selector___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3839, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -72102,23 +73884,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7related_2g return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3752, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3839, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3754 + /* "dependency_injector/providers.pyx":3841 * def related(self): * """Return related providers generator.""" * yield from filter(is_provider, [self.__selector]) # <<<<<<<<<<<<<< * yield from self.providers.values() * yield from super().related */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3754, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3754, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->__pyx___selector); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->__pyx___selector); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_self->__pyx___selector); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3754, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -72126,7 +73908,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7related_2g PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3754, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); @@ -72140,25 +73922,25 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7related_2g __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3754, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3841, __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(1, 3754, __pyx_L1_error) + else __PYX_ERR(1, 3841, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":3755 + /* "dependency_injector/providers.pyx":3842 * """Return related providers generator.""" * yield from filter(is_provider, [self.__selector]) * yield from self.providers.values() # <<<<<<<<<<<<<< * yield from super().related * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3755, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3755, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -72173,7 +73955,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7related_2g } __pyx_t_2 = (__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_2)) __PYX_ERR(1, 3755, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); @@ -72187,23 +73969,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7related_2g __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3755, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3842, __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(1, 3755, __pyx_L1_error) + else __PYX_ERR(1, 3842, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":3756 + /* "dependency_injector/providers.pyx":3843 * yield from filter(is_provider, [self.__selector]) * yield from self.providers.values() * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3756, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Selector)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Selector)); @@ -72211,10 +73993,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7related_2g __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3756, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_related); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3756, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_related); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); @@ -72228,17 +74010,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7related_2g __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L6_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3756, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3843, __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(1, 3756, __pyx_L1_error) + else __PYX_ERR(1, 3843, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":3752 + /* "dependency_injector/providers.pyx":3839 * * @property * def related(self): # <<<<<<<<<<<<<< @@ -72265,7 +74047,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7related_2g return __pyx_r; } -/* "dependency_injector/providers.pyx":3758 +/* "dependency_injector/providers.pyx":3845 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -72273,7 +74055,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_8Selector_7related_2g * selector_value = self.__selector() */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) { PyObject *__pyx_v_selector_value = NULL; PyObject *__pyx_r = NULL; @@ -72299,9 +74081,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3758, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Selector_9_provide)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Selector_13_provide)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -72319,7 +74101,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3758, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3845, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -72327,13 +74109,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3758, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3845, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3758, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -72344,7 +74126,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3758, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -72367,7 +74149,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str #endif } - /* "dependency_injector/providers.pyx":3760 + /* "dependency_injector/providers.pyx":3847 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * selector_value = self.__selector() # <<<<<<<<<<<<<< @@ -72387,13 +74169,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3760, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_selector_value = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3762 + /* "dependency_injector/providers.pyx":3849 * selector_value = self.__selector() * * if selector_value is None: # <<<<<<<<<<<<<< @@ -72404,14 +74186,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str __pyx_t_8 = (__pyx_t_7 != 0); if (unlikely(__pyx_t_8)) { - /* "dependency_injector/providers.pyx":3763 + /* "dependency_injector/providers.pyx":3850 * * if selector_value is None: * raise Error('Selector value is undefined') # <<<<<<<<<<<<<< * * if selector_value not in self.__providers: */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3763, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -72425,14 +74207,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Selector_value_is_undefined) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Selector_value_is_undefined); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3763, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 3763, __pyx_L1_error) + __PYX_ERR(1, 3850, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3762 + /* "dependency_injector/providers.pyx":3849 * selector_value = self.__selector() * * if selector_value is None: # <<<<<<<<<<<<<< @@ -72441,7 +74223,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str */ } - /* "dependency_injector/providers.pyx":3765 + /* "dependency_injector/providers.pyx":3852 * raise Error('Selector value is undefined') * * if selector_value not in self.__providers: # <<<<<<<<<<<<<< @@ -72450,22 +74232,22 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str */ if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 3765, __pyx_L1_error) + __PYX_ERR(1, 3852, __pyx_L1_error) } - __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_v_selector_value, __pyx_v_self->__pyx___providers, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 3765, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_v_selector_value, __pyx_v_self->__pyx___providers, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 3852, __pyx_L1_error) __pyx_t_7 = (__pyx_t_8 != 0); if (unlikely(__pyx_t_7)) { - /* "dependency_injector/providers.pyx":3766 + /* "dependency_injector/providers.pyx":3853 * * if selector_value not in self.__providers: * raise Error('Selector has no "{0}" provider'.format(selector_value)) # <<<<<<<<<<<<<< * * return self.__providers[selector_value](*args, **kwargs) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3766, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Selector_has_no_0_provider, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3766, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Selector_has_no_0_provider, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -72479,7 +74261,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_v_selector_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_selector_value); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3766, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -72495,14 +74277,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3766, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 3766, __pyx_L1_error) + __PYX_ERR(1, 3853, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3765 + /* "dependency_injector/providers.pyx":3852 * raise Error('Selector value is undefined') * * if selector_value not in self.__providers: # <<<<<<<<<<<<<< @@ -72511,7 +74293,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str */ } - /* "dependency_injector/providers.pyx":3768 + /* "dependency_injector/providers.pyx":3855 * raise Error('Selector has no "{0}" provider'.format(selector_value)) * * return self.__providers[selector_value](*args, **kwargs) # <<<<<<<<<<<<<< @@ -72521,26 +74303,26 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 3768, __pyx_L1_error) + __PYX_ERR(1, 3855, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx___providers, __pyx_v_selector_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3768, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx___providers, __pyx_v_selector_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 3768, __pyx_L1_error) + __PYX_ERR(1, 3855, __pyx_L1_error) } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 3768, __pyx_L1_error) + __PYX_ERR(1, 3855, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3768, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3758 + /* "dependency_injector/providers.pyx":3845 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -72565,9 +74347,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Selector__provide(str } /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_8Selector_8_provide[] = "Return single instance."; -static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_8Selector_12_provide[] = "Return single instance."; +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -72599,11 +74381,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_9_provide(P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3758, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3845, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3758, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3845, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -72616,15 +74398,15 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_9_provide(P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3758, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3845, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Selector._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3758, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3758, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Selector_8_provide(((struct __pyx_obj_19dependency_injector_9providers_Selector *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3845, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3845, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Selector_12_provide(((struct __pyx_obj_19dependency_injector_9providers_Selector *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; @@ -72635,7 +74417,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_9_provide(P return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_8_provide(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_12_provide(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -72644,7 +74426,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_8_provide(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Selector__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3758, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Selector__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -72668,19 +74450,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_8_provide(s */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Selector_10__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Selector *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Selector_14__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Selector *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_10__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -72942,19 +74724,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_10__reduce_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Selector_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_8Selector_12__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Selector *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_8Selector_16__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Selector *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_12__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Selector *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -72993,18 +74775,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Selector_12__setstat return __pyx_r; } -/* "dependency_injector/providers.pyx":3802 +/* "dependency_injector/providers.pyx":3889 * """ * - * def __init__(self, provider): # <<<<<<<<<<<<<< - * self.__provider = provider - * super().__init__() + * def __init__(self, provides=None): # <<<<<<<<<<<<<< + * self.__provides = None + * self.set_provides(provides) */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_16ProvidedInstance_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_19dependency_injector_9providers_16ProvidedInstance_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_provider = 0; + PyObject *__pyx_v_provides = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -73012,8 +74794,9 @@ static int __pyx_pw_19dependency_injector_9providers_16ProvidedInstance_1__init_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provider,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -73026,35 +74809,40 @@ static int __pyx_pw_19dependency_injector_9providers_16ProvidedInstance_1__init_ kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3802, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3889, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } } - __pyx_v_provider = values[0]; + __pyx_v_provides = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3802, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3889, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ProvidedInstance.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance___init__(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), __pyx_v_provider); + __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance___init__(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), __pyx_v_provides); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_19dependency_injector_9providers_16ProvidedInstance___init__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_provider) { +static int __pyx_pf_19dependency_injector_9providers_16ProvidedInstance___init__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_provides) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -73065,30 +74853,53 @@ static int __pyx_pf_19dependency_injector_9providers_16ProvidedInstance___init__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":3803 + /* "dependency_injector/providers.pyx":3890 * - * def __init__(self, provider): - * self.__provider = provider # <<<<<<<<<<<<<< + * def __init__(self, provides=None): + * self.__provides = None # <<<<<<<<<<<<<< + * self.set_provides(provides) + * super().__init__() + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = Py_None; + + /* "dependency_injector/providers.pyx":3891 + * def __init__(self, provides=None): + * self.__provides = None + * self.set_provides(provides) # <<<<<<<<<<<<<< * super().__init__() * */ - if (!(likely(((__pyx_v_provider) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_provider, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3803, __pyx_L1_error) - __pyx_t_1 = __pyx_v_provider; - __Pyx_INCREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_self->__pyx___provider); - __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __pyx_v_self->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3891, __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_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_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3804 - * def __init__(self, provider): - * self.__provider = provider + /* "dependency_injector/providers.pyx":3892 + * self.__provides = None + * self.set_provides(provides) * super().__init__() # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3804, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ProvidedInstance)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ProvidedInstance)); @@ -73096,10 +74907,10 @@ static int __pyx_pf_19dependency_injector_9providers_16ProvidedInstance___init__ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3804, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3804, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -73114,17 +74925,17 @@ static int __pyx_pf_19dependency_injector_9providers_16ProvidedInstance___init__ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3804, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3802 + /* "dependency_injector/providers.pyx":3889 * """ * - * def __init__(self, provider): # <<<<<<<<<<<<<< - * self.__provider = provider - * super().__init__() + * def __init__(self, provides=None): # <<<<<<<<<<<<<< + * self.__provides = None + * self.set_provides(provides) */ /* function exit code */ @@ -73141,11 +74952,11 @@ static int __pyx_pf_19dependency_injector_9providers_16ProvidedInstance___init__ return __pyx_r; } -/* "dependency_injector/providers.pyx":3806 +/* "dependency_injector/providers.pyx":3894 * super().__init__() * * def __repr__(self): # <<<<<<<<<<<<<< - * return f'{self.__class__.__name__}(\'{self.__provider}\')' + * return f'{self.__class__.__name__}(\'{self.__provides}\')' * */ @@ -73175,24 +74986,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_2_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "dependency_injector/providers.pyx":3807 + /* "dependency_injector/providers.pyx":3895 * * def __repr__(self): - * return f'{self.__class__.__name__}(\'{self.__provider}\')' # <<<<<<<<<<<<<< + * return f'{self.__class__.__name__}(\'{self.__provides}\')' # <<<<<<<<<<<<<< * - * def __deepcopy__(self, memo=None): + * def __deepcopy__(self, memo): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3807, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3807, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3807, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3807, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -73200,33 +75011,33 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_2_ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__30); + __Pyx_INCREF(__pyx_kp_u__29); __pyx_t_2 += 2; - __Pyx_GIVEREF(__pyx_kp_u__30); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__30); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self->__pyx___provider), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3807, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__29); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__29); + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_self->__pyx___provides, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__31); + __Pyx_INCREF(__pyx_kp_u__30); __pyx_t_2 += 2; - __Pyx_GIVEREF(__pyx_kp_u__31); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__31); - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3807, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__30); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__30); + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3806 + /* "dependency_injector/providers.pyx":3894 * super().__init__() * * def __repr__(self): # <<<<<<<<<<<<<< - * return f'{self.__class__.__name__}(\'{self.__provider}\')' + * return f'{self.__class__.__name__}(\'{self.__provides}\')' * */ @@ -73243,67 +75054,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_2_ return __pyx_r; } -/* "dependency_injector/providers.pyx":3809 - * return f'{self.__class__.__name__}(\'{self.__provider}\')' - * - * def __deepcopy__(self, memo=None): # <<<<<<<<<<<<<< - * cdef ProvidedInstance copied +/* "dependency_injector/providers.pyx":3897 + * return f'{self.__class__.__name__}(\'{self.__provides}\')' * + * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< + * copied = memo.get(id(self)) + * if copied is not None: */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_memo = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memo,0}; - PyObject* values[1] = {0}; - values[0] = ((PyObject *)Py_None); - if (unlikely(__pyx_kwds)) { - Py_ssize_t kw_args; - const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); - switch (pos_args) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = PyDict_Size(__pyx_kwds); - switch (pos_args) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo); - if (value) { values[0] = value; kw_args--; } - } - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deepcopy__") < 0)) __PYX_ERR(1, 3809, __pyx_L3_error) - } - } else { - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - } - __pyx_v_memo = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__deepcopy__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3809, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("dependency_injector.providers.ProvidedInstance.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_4__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), __pyx_v_memo); + __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_4__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), ((PyObject *)__pyx_v_memo)); /* function exit code */ __Pyx_RefNannyFinishContext(); @@ -73311,7 +75076,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_5_ } static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_memo) { - struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_copied = 0; + PyObject *__pyx_v_copied = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -73320,22 +75085,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_4_ PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; - struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":3812 - * cdef ProvidedInstance copied + /* "dependency_injector/providers.pyx":3898 * + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3812, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3812, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -73350,38 +75114,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_4_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3812, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_ProvidedInstance))))) __PYX_ERR(1, 3812, __pyx_L1_error) - __pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_t_1); + __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3813 - * + /* "dependency_injector/providers.pyx":3899 + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied * */ - __pyx_t_5 = (((PyObject *)__pyx_v_copied) != Py_None); + __pyx_t_5 = (__pyx_v_copied != Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":3814 + /* "dependency_injector/providers.pyx":3900 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * return self.__class__( + * copied = _memorized_duplicate(self, memo) */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_copied)); - __pyx_r = ((PyObject *)__pyx_v_copied); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3813 - * + /* "dependency_injector/providers.pyx":3899 + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied @@ -73389,30 +75152,32 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_4_ */ } - /* "dependency_injector/providers.pyx":3816 + /* "dependency_injector/providers.pyx":3902 * return copied * - * return self.__class__( # <<<<<<<<<<<<<< - * deepcopy(self.__provider, memo), - * ) + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * return copied */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3816, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3902, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3817 + /* "dependency_injector/providers.pyx":3903 * - * return self.__class__( - * deepcopy(self.__provider, memo), # <<<<<<<<<<<<<< - * ) + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(_copy_if_provider(self.provides, memo)) # <<<<<<<<<<<<<< + * return copied * */ - __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx___provider); - __Pyx_INCREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3817, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3817, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3903, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers__copy_if_provider(__pyx_t_3, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -73428,19 +75193,29 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_4_ __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(1, 3816, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":3904 + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * return copied # <<<<<<<<<<<<<< + * + * def __getattr__(self, item): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3809 - * return f'{self.__class__.__name__}(\'{self.__provider}\')' - * - * def __deepcopy__(self, memo=None): # <<<<<<<<<<<<<< - * cdef ProvidedInstance copied + /* "dependency_injector/providers.pyx":3897 + * return f'{self.__class__.__name__}(\'{self.__provides}\')' * + * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< + * copied = memo.get(id(self)) + * if copied is not None: */ /* function exit code */ @@ -73452,14 +75227,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_4_ __Pyx_AddTraceback("dependency_injector.providers.ProvidedInstance.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_copied); + __Pyx_XDECREF(__pyx_v_copied); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":3820 - * ) +/* "dependency_injector/providers.pyx":3906 + * return copied * * def __getattr__(self, item): # <<<<<<<<<<<<<< * return AttributeGetter(self, item) @@ -73489,7 +75264,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_6_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":3821 + /* "dependency_injector/providers.pyx":3907 * * def __getattr__(self, item): * return AttributeGetter(self, item) # <<<<<<<<<<<<<< @@ -73497,7 +75272,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_6_ * def __getitem__(self, item): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3821, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -73505,15 +75280,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_6_ __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_item); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3821, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3820 - * ) + /* "dependency_injector/providers.pyx":3906 + * return copied * * def __getattr__(self, item): # <<<<<<<<<<<<<< * return AttributeGetter(self, item) @@ -73532,7 +75307,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_6_ return __pyx_r; } -/* "dependency_injector/providers.pyx":3823 +/* "dependency_injector/providers.pyx":3909 * return AttributeGetter(self, item) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -73563,7 +75338,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_8_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "dependency_injector/providers.pyx":3824 + /* "dependency_injector/providers.pyx":3910 * * def __getitem__(self, item): * return ItemGetter(self, item) # <<<<<<<<<<<<<< @@ -73571,7 +75346,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_8_ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3824, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -73579,14 +75354,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_8_ __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_item); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3824, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3823 + /* "dependency_injector/providers.pyx":3909 * return AttributeGetter(self, item) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -73606,12 +75381,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_8_ return __pyx_r; } -/* "dependency_injector/providers.pyx":3827 +/* "dependency_injector/providers.pyx":3913 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return provider.""" - * return self.__provider + * """Return provider's provides.""" + * return self.__provides */ /* Python wrapper */ @@ -73632,24 +75407,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_8p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3829 + /* "dependency_injector/providers.pyx":3915 * def provides(self): - * """Return provider.""" - * return self.__provider # <<<<<<<<<<<<<< + * """Return provider's provides.""" + * return self.__provides # <<<<<<<<<<<<<< * - * def call(self, *args, **kwargs): + * def set_provides(self, provides): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __pyx_r = ((PyObject *)__pyx_v_self->__pyx___provider); + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __pyx_r = __pyx_v_self->__pyx___provides; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3827 + /* "dependency_injector/providers.pyx":3913 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return provider.""" - * return self.__provider + * """Return provider's provides.""" + * return self.__provides */ /* function exit code */ @@ -73659,8 +75434,75 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_8p return __pyx_r; } -/* "dependency_injector/providers.pyx":3831 - * return self.__provider +/* "dependency_injector/providers.pyx":3917 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_11set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_16ProvidedInstance_10set_provides[] = "Set provider's provides."; +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_11set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_10set_provides(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), ((PyObject *)__pyx_v_provides)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_10set_provides(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides", 0); + + /* "dependency_injector/providers.pyx":3919 + * def set_provides(self, provides): + * """Set provider's provides.""" + * self.__provides = provides # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_provides); + __Pyx_GIVEREF(__pyx_v_provides); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = __pyx_v_provides; + + /* "dependency_injector/providers.pyx":3920 + * """Set provider's provides.""" + * self.__provides = provides + * return self # <<<<<<<<<<<<<< + * + * def call(self, *args, **kwargs): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":3917 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":3922 + * return self * * def call(self, *args, **kwargs): # <<<<<<<<<<<<<< * return MethodCaller(self, *args, **kwargs) @@ -73668,8 +75510,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_8p */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_11call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_11call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; @@ -73684,7 +75526,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_11 } __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_10call(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_12call(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -73693,7 +75535,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_11 return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_10call(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_12call(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -73703,7 +75545,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("call", 0); - /* "dependency_injector/providers.pyx":3832 + /* "dependency_injector/providers.pyx":3923 * * def call(self, *args, **kwargs): * return MethodCaller(self, *args, **kwargs) # <<<<<<<<<<<<<< @@ -73711,23 +75553,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_10 * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3832, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3832, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller), __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3832, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller), __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3831 - * return self.__provider + /* "dependency_injector/providers.pyx":3922 + * return self * * def call(self, *args, **kwargs): # <<<<<<<<<<<<<< * return MethodCaller(self, *args, **kwargs) @@ -73747,12 +75589,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_10 } static PyObject *__pyx_gb_19dependency_injector_9providers_16ProvidedInstance_7related_2generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":3835 +/* "dependency_injector/providers.pyx":3926 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ /* Python wrapper */ @@ -73780,7 +75622,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_7r if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_20___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 3835, __pyx_L1_error) + __PYX_ERR(1, 3926, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -73788,7 +75630,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_7r __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_16ProvidedInstance_7related_2generator16, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ProvidedInstance___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3835, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_16ProvidedInstance_7related_2generator16, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ProvidedInstance___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3926, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -73809,7 +75651,8 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16ProvidedInstance_7r struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_20___get__ *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_20___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -73817,41 +75660,65 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16ProvidedInstance_7r __Pyx_RefNannySetupContext("related", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; - case 1: goto __pyx_L4_resume_from_yield; - case 2: goto __pyx_L5_resume_from_yield_from; + case 1: goto __pyx_L5_resume_from_yield; + case 2: goto __pyx_L6_resume_from_yield_from; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3835, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3926, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3837 + /* "dependency_injector/providers.pyx":3928 * def related(self): * """Return related providers generator.""" - * yield self.__provider # <<<<<<<<<<<<<< + * if is_provider(self.provides): # <<<<<<<<<<<<<< + * yield self.provides + * yield from super().related + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_f_19dependency_injector_9providers_is_provider(__pyx_t_1, 0) != 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "dependency_injector/providers.pyx":3929 + * """Return related providers generator.""" + * if is_provider(self.provides): + * yield self.provides # <<<<<<<<<<<<<< * yield from super().related * */ - __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx___provider)); - __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx___provider); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - __Pyx_Coroutine_ResetAndClearException(__pyx_generator); - /* return from generator, yielding value */ - __pyx_generator->resume_label = 1; - return __pyx_r; - __pyx_L4_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3837, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L5_resume_from_yield:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3929, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3838 + /* "dependency_injector/providers.pyx":3928 + * def related(self): * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): # <<<<<<<<<<<<<< + * yield self.provides + * yield from super().related + */ + } + + /* "dependency_injector/providers.pyx":3930 + * if is_provider(self.provides): + * yield self.provides * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3838, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ProvidedInstance)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ProvidedInstance)); @@ -73859,12 +75726,12 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16ProvidedInstance_7r __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3838, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3838, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_r); @@ -73875,23 +75742,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16ProvidedInstance_7r /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; - __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3838, __pyx_L1_error) + __pyx_L6_resume_from_yield_from:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3930, __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(1, 3838, __pyx_L1_error) + else __PYX_ERR(1, 3930, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":3835 + /* "dependency_injector/providers.pyx":3926 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ /* function exit code */ @@ -73899,7 +75766,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16ProvidedInstance_7r goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("related", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; @@ -73912,15 +75779,15 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_16ProvidedInstance_7r return __pyx_r; } -/* "dependency_injector/providers.pyx":3840 +/* "dependency_injector/providers.pyx":3932 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< - * return self.__provider(*args, **kwargs) + * return self.__provides(*args, **kwargs) * */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_15_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_16ProvidedInstance__provide(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -73943,9 +75810,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16ProvidedInstance__pr if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3840, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13_provide)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_15_provide)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -73963,7 +75830,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16ProvidedInstance__pr #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3840, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3932, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -73971,13 +75838,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16ProvidedInstance__pr #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3840, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3932, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3840, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -73988,7 +75855,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16ProvidedInstance__pr __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3840, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -74011,33 +75878,33 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16ProvidedInstance__pr #endif } - /* "dependency_injector/providers.pyx":3841 + /* "dependency_injector/providers.pyx":3933 * * cpdef object _provide(self, tuple args, dict kwargs): - * return self.__provider(*args, **kwargs) # <<<<<<<<<<<<<< + * return self.__provides(*args, **kwargs) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 3841, __pyx_L1_error) + __PYX_ERR(1, 3933, __pyx_L1_error) } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 3841, __pyx_L1_error) + __PYX_ERR(1, 3933, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx___provider), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3841, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___provides, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3840 + /* "dependency_injector/providers.pyx":3932 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< - * return self.__provider(*args, **kwargs) + * return self.__provides(*args, **kwargs) * */ @@ -74057,8 +75924,8 @@ static PyObject *__pyx_f_19dependency_injector_9providers_16ProvidedInstance__pr } /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_15_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_15_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -74090,11 +75957,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13 case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3840, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3932, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3840, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3932, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -74107,15 +75974,15 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13 } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3840, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3932, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ProvidedInstance._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3840, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3840, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_12_provide(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3932, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3932, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14_provide(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; @@ -74126,7 +75993,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13 return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_12_provide(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14_provide(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -74135,7 +76002,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_12 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_16ProvidedInstance__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3840, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_16ProvidedInstance__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -74159,19 +76026,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_12 */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_16__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_16__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -74191,7 +76058,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.__async_mode, self.__last_overriding, self.__overridden, self.__provider) # <<<<<<<<<<<<<< + * state = (self.__async_mode, self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ @@ -74207,16 +76074,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base.__pyx___overridden); - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___provider)); - PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_self->__pyx___provider)); + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __Pyx_GIVEREF(__pyx_v_self->__pyx___provides); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->__pyx___provides); __pyx_t_1 = 0; __pyx_v_state = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.__async_mode, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__async_mode, self.__last_overriding, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -74227,7 +76094,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 __pyx_t_2 = 0; /* "(tree fragment)":7 - * state = (self.__async_mode, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__async_mode, self.__last_overriding, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -74260,12 +76127,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.__async_mode, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__async_mode, self.__last_overriding, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -74277,9 +76144,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None # <<<<<<<<<<<<<< + * use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_ProvidedInstance, (type(self), 0xfd61095, None), state + * return __pyx_unpickle_ProvidedInstance, (type(self), 0x328787b, None), state */ /*else*/ { __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None); @@ -74296,7 +76163,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 __pyx_t_4 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx___provider) != Py_None); + __pyx_t_3 = (__pyx_v_self->__pyx___provides != Py_None); __pyx_t_5 = (__pyx_t_3 != 0); __pyx_t_4 = __pyx_t_5; __pyx_L4_bool_binop_done:; @@ -74306,20 +76173,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 /* "(tree fragment)":12 * else: - * use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_ProvidedInstance, (type(self), 0xfd61095, None), state + * return __pyx_unpickle_ProvidedInstance, (type(self), 0x328787b, None), state * else: */ __pyx_t_4 = (__pyx_v_use_setstate != 0); if (__pyx_t_4) { /* "(tree fragment)":13 - * use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: - * return __pyx_unpickle_ProvidedInstance, (type(self), 0xfd61095, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_ProvidedInstance, (type(self), 0x328787b, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_ProvidedInstance, (type(self), 0xfd61095, state) + * return __pyx_unpickle_ProvidedInstance, (type(self), 0x328787b, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ProvidedInstance); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) @@ -74329,9 +76196,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_265687189); - __Pyx_GIVEREF(__pyx_int_265687189); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_265687189); + __Pyx_INCREF(__pyx_int_52983931); + __Pyx_GIVEREF(__pyx_int_52983931); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_52983931); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None); @@ -74352,17 +76219,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 /* "(tree fragment)":12 * else: - * use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_ProvidedInstance, (type(self), 0xfd61095, None), state + * return __pyx_unpickle_ProvidedInstance, (type(self), 0x328787b, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_ProvidedInstance, (type(self), 0xfd61095, None), state + * return __pyx_unpickle_ProvidedInstance, (type(self), 0x328787b, None), state * else: - * return __pyx_unpickle_ProvidedInstance, (type(self), 0xfd61095, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_ProvidedInstance, (type(self), 0x328787b, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_ProvidedInstance__set_state(self, __pyx_state) */ @@ -74375,9 +76242,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_265687189); - __Pyx_GIVEREF(__pyx_int_265687189); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_265687189); + __Pyx_INCREF(__pyx_int_52983931); + __Pyx_GIVEREF(__pyx_int_52983931); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_52983931); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state); @@ -74417,25 +76284,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_14 /* "(tree fragment)":16 * else: - * return __pyx_unpickle_ProvidedInstance, (type(self), 0xfd61095, state) + * return __pyx_unpickle_ProvidedInstance, (type(self), 0x328787b, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ProvidedInstance__set_state(self, __pyx_state) */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_16__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_16ProvidedInstance_18__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_18__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -74445,7 +76312,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_16 __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_ProvidedInstance, (type(self), 0xfd61095, state) + * return __pyx_unpickle_ProvidedInstance, (type(self), 0x328787b, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_ProvidedInstance__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -74456,7 +76323,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_16 /* "(tree fragment)":16 * else: - * return __pyx_unpickle_ProvidedInstance, (type(self), 0xfd61095, state) + * return __pyx_unpickle_ProvidedInstance, (type(self), 0x328787b, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ProvidedInstance__set_state(self, __pyx_state) */ @@ -74474,19 +76341,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16ProvidedInstance_16 return __pyx_r; } -/* "dependency_injector/providers.pyx":3850 +/* "dependency_injector/providers.pyx":3942 * """ * - * def __init__(self, provider, attribute): # <<<<<<<<<<<<<< - * self.__provider = provider - * self.__attribute = attribute + * def __init__(self, provides=None, name=None): # <<<<<<<<<<<<<< + * self.__provides = None + * self.set_provides(provides) */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_15AttributeGetter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_19dependency_injector_9providers_15AttributeGetter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_provider = 0; - PyObject *__pyx_v_attribute = 0; + PyObject *__pyx_v_provides = 0; + PyObject *__pyx_v_name = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -74494,8 +76361,10 @@ static int __pyx_pw_19dependency_injector_9providers_15AttributeGetter_1__init__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provider,&__pyx_n_s_attribute,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,&__pyx_n_s_name_2,0}; PyObject* values[2] = {0,0}; + values[0] = ((PyObject *)Py_None); + values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -74510,43 +76379,49 @@ static int __pyx_pw_19dependency_injector_9providers_15AttributeGetter_1__init__ kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } CYTHON_FALLTHROUGH; case 1: - if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attribute)) != 0)) kw_args--; - else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 3850, __pyx_L3_error) + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2); + if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3850, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3942, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } } - __pyx_v_provider = values[0]; - __pyx_v_attribute = values[1]; + __pyx_v_provides = values[0]; + __pyx_v_name = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3850, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3942, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.AttributeGetter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter___init__(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), __pyx_v_provider, __pyx_v_attribute); + __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter___init__(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), __pyx_v_provides, __pyx_v_name); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_19dependency_injector_9providers_15AttributeGetter___init__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_provider, PyObject *__pyx_v_attribute) { +static int __pyx_pf_19dependency_injector_9providers_15AttributeGetter___init__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -74557,43 +76432,92 @@ static int __pyx_pf_19dependency_injector_9providers_15AttributeGetter___init__( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":3851 + /* "dependency_injector/providers.pyx":3943 * - * def __init__(self, provider, attribute): - * self.__provider = provider # <<<<<<<<<<<<<< - * self.__attribute = attribute + * def __init__(self, provides=None, name=None): + * self.__provides = None # <<<<<<<<<<<<<< + * self.set_provides(provides) + * + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = Py_None; + + /* "dependency_injector/providers.pyx":3944 + * def __init__(self, provides=None, name=None): + * self.__provides = None + * self.set_provides(provides) # <<<<<<<<<<<<<< + * + * self.__name = None + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3944, __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_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_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":3946 + * self.set_provides(provides) + * + * self.__name = None # <<<<<<<<<<<<<< + * self.set_name(name) * super().__init__() */ - if (!(likely(((__pyx_v_provider) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_provider, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3851, __pyx_L1_error) - __pyx_t_1 = __pyx_v_provider; - __Pyx_INCREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_self->__pyx___provider); - __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __pyx_v_self->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); - __pyx_t_1 = 0; + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___name); + __Pyx_DECREF(__pyx_v_self->__pyx___name); + __pyx_v_self->__pyx___name = Py_None; - /* "dependency_injector/providers.pyx":3852 - * def __init__(self, provider, attribute): - * self.__provider = provider - * self.__attribute = attribute # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":3947 + * + * self.__name = None + * self.set_name(name) # <<<<<<<<<<<<<< * super().__init__() * */ - __Pyx_INCREF(__pyx_v_attribute); - __Pyx_GIVEREF(__pyx_v_attribute); - __Pyx_GOTREF(__pyx_v_self->__pyx___attribute); - __Pyx_DECREF(__pyx_v_self->__pyx___attribute); - __pyx_v_self->__pyx___attribute = __pyx_v_attribute; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3947, __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_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_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3853 - * self.__provider = provider - * self.__attribute = attribute + /* "dependency_injector/providers.pyx":3948 + * self.__name = None + * self.set_name(name) * super().__init__() # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3853, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter)); @@ -74601,10 +76525,10 @@ static int __pyx_pf_19dependency_injector_9providers_15AttributeGetter___init__( __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3853, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3853, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -74619,17 +76543,17 @@ static int __pyx_pf_19dependency_injector_9providers_15AttributeGetter___init__( } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3853, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3850 + /* "dependency_injector/providers.pyx":3942 * """ * - * def __init__(self, provider, attribute): # <<<<<<<<<<<<<< - * self.__provider = provider - * self.__attribute = attribute + * def __init__(self, provides=None, name=None): # <<<<<<<<<<<<<< + * self.__provides = None + * self.set_provides(provides) */ /* function exit code */ @@ -74646,11 +76570,11 @@ static int __pyx_pf_19dependency_injector_9providers_15AttributeGetter___init__( return __pyx_r; } -/* "dependency_injector/providers.pyx":3855 +/* "dependency_injector/providers.pyx":3950 * super().__init__() * * def __repr__(self): # <<<<<<<<<<<<<< - * return f'{self.__class__.__name__}(\'{self.__attribute}\')' + * return f'{self.__class__.__name__}(\'{self.name}\')' * */ @@ -74680,24 +76604,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_2__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "dependency_injector/providers.pyx":3856 + /* "dependency_injector/providers.pyx":3951 * * def __repr__(self): - * return f'{self.__class__.__name__}(\'{self.__attribute}\')' # <<<<<<<<<<<<<< + * return f'{self.__class__.__name__}(\'{self.name}\')' # <<<<<<<<<<<<<< * - * def __deepcopy__(self, memo=None): + * def __deepcopy__(self, memo): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3856, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3856, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3856, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3856, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -74705,33 +76629,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_2__ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u__29); + __pyx_t_2 += 2; + __Pyx_GIVEREF(__pyx_kp_u__29); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__29); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; + __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5); + __pyx_t_5 = 0; __Pyx_INCREF(__pyx_kp_u__30); __pyx_t_2 += 2; __Pyx_GIVEREF(__pyx_kp_u__30); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__30); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_self->__pyx___attribute, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3856, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__31); - __pyx_t_2 += 2; - __Pyx_GIVEREF(__pyx_kp_u__31); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__31); - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3856, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__30); + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3855 + /* "dependency_injector/providers.pyx":3950 * super().__init__() * * def __repr__(self): # <<<<<<<<<<<<<< - * return f'{self.__class__.__name__}(\'{self.__attribute}\')' + * return f'{self.__class__.__name__}(\'{self.name}\')' * */ @@ -74748,67 +76675,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_2__ return __pyx_r; } -/* "dependency_injector/providers.pyx":3858 - * return f'{self.__class__.__name__}(\'{self.__attribute}\')' - * - * def __deepcopy__(self, memo=None): # <<<<<<<<<<<<<< - * cdef AttributeGetter copied +/* "dependency_injector/providers.pyx":3953 + * return f'{self.__class__.__name__}(\'{self.name}\')' * + * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< + * copied = memo.get(id(self)) + * if copied is not None: */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_memo = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memo,0}; - PyObject* values[1] = {0}; - values[0] = ((PyObject *)Py_None); - if (unlikely(__pyx_kwds)) { - Py_ssize_t kw_args; - const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); - switch (pos_args) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = PyDict_Size(__pyx_kwds); - switch (pos_args) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo); - if (value) { values[0] = value; kw_args--; } - } - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deepcopy__") < 0)) __PYX_ERR(1, 3858, __pyx_L3_error) - } - } else { - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - } - __pyx_v_memo = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__deepcopy__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3858, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("dependency_injector.providers.AttributeGetter.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_4__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), __pyx_v_memo); + __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_4__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), ((PyObject *)__pyx_v_memo)); /* function exit code */ __Pyx_RefNannyFinishContext(); @@ -74816,7 +76697,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_5__ } static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_memo) { - struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_copied = 0; + PyObject *__pyx_v_copied = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -74825,24 +76706,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4__ PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; - struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7; - int __pyx_t_8; - PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":3861 - * cdef AttributeGetter copied + /* "dependency_injector/providers.pyx":3954 * + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3861, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3861, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -74857,38 +76735,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4__ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3861, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_AttributeGetter))))) __PYX_ERR(1, 3861, __pyx_L1_error) - __pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_t_1); + __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3862 - * + /* "dependency_injector/providers.pyx":3955 + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied * */ - __pyx_t_5 = (((PyObject *)__pyx_v_copied) != Py_None); + __pyx_t_5 = (__pyx_v_copied != Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":3863 + /* "dependency_injector/providers.pyx":3956 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * return self.__class__( + * copied = _memorized_duplicate(self, memo) */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_copied)); - __pyx_r = ((PyObject *)__pyx_v_copied); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3862 - * + /* "dependency_injector/providers.pyx":3955 + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied @@ -74896,42 +76773,35 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4__ */ } - /* "dependency_injector/providers.pyx":3865 + /* "dependency_injector/providers.pyx":3958 * return copied * - * return self.__class__( # <<<<<<<<<<<<<< - * deepcopy(self.__provider, memo), - * self.__attribute, + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_name(self.name) */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3865, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3958, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3866 + /* "dependency_injector/providers.pyx":3959 * - * return self.__class__( - * deepcopy(self.__provider, memo), # <<<<<<<<<<<<<< - * self.__attribute, - * ) + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(_copy_if_provider(self.provides, memo)) # <<<<<<<<<<<<<< + * copied.set_name(self.name) + * return copied */ - __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx___provider); - __Pyx_INCREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3866, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3866, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3959, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers__copy_if_provider(__pyx_t_3, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "dependency_injector/providers.pyx":3867 - * return self.__class__( - * deepcopy(self.__provider, memo), - * self.__attribute, # <<<<<<<<<<<<<< - * ) - * - */ __pyx_t_3 = NULL; - __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { @@ -74939,54 +76809,63 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4__ __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_8 = 1; } } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_self->__pyx___attribute}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3865, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_self->__pyx___attribute}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3865, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 3865, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - if (__pyx_t_3) { - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL; - } - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4); - __Pyx_INCREF(__pyx_v_self->__pyx___attribute); - __Pyx_GIVEREF(__pyx_v_self->__pyx___attribute); - PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_self->__pyx___attribute); - __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3865, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } + __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(1, 3959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":3960 + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_name(self.name) # <<<<<<<<<<<<<< + * return copied + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_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(1, 3960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":3961 + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_name(self.name) + * return copied # <<<<<<<<<<<<<< + * + * def __getattr__(self, item): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3858 - * return f'{self.__class__.__name__}(\'{self.__attribute}\')' - * - * def __deepcopy__(self, memo=None): # <<<<<<<<<<<<<< - * cdef AttributeGetter copied + /* "dependency_injector/providers.pyx":3953 + * return f'{self.__class__.__name__}(\'{self.name}\')' * + * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< + * copied = memo.get(id(self)) + * if copied is not None: */ /* function exit code */ @@ -74995,18 +76874,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4__ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("dependency_injector.providers.AttributeGetter.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_copied); + __Pyx_XDECREF(__pyx_v_copied); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":3870 - * ) +/* "dependency_injector/providers.pyx":3963 + * return copied * * def __getattr__(self, item): # <<<<<<<<<<<<<< * return AttributeGetter(self, item) @@ -75036,7 +76914,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_6__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":3871 + /* "dependency_injector/providers.pyx":3964 * * def __getattr__(self, item): * return AttributeGetter(self, item) # <<<<<<<<<<<<<< @@ -75044,7 +76922,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_6__ * def __getitem__(self, item): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3871, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -75052,15 +76930,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_6__ __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_item); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3871, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3870 - * ) + /* "dependency_injector/providers.pyx":3963 + * return copied * * def __getattr__(self, item): # <<<<<<<<<<<<<< * return AttributeGetter(self, item) @@ -75079,7 +76957,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_6__ return __pyx_r; } -/* "dependency_injector/providers.pyx":3873 +/* "dependency_injector/providers.pyx":3966 * return AttributeGetter(self, item) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -75110,7 +76988,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_8__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "dependency_injector/providers.pyx":3874 + /* "dependency_injector/providers.pyx":3967 * * def __getitem__(self, item): * return ItemGetter(self, item) # <<<<<<<<<<<<<< @@ -75118,7 +76996,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_8__ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3874, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -75126,14 +77004,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_8__ __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_item); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3874, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3873 + /* "dependency_injector/providers.pyx":3966 * return AttributeGetter(self, item) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -75153,12 +77031,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_8__ return __pyx_r; } -/* "dependency_injector/providers.pyx":3877 +/* "dependency_injector/providers.pyx":3970 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return provider.""" - * return self.__provider + * """Return provider's provides.""" + * return self.__provides */ /* Python wrapper */ @@ -75179,24 +77057,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_8pr __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3879 + /* "dependency_injector/providers.pyx":3972 * def provides(self): - * """Return provider.""" - * return self.__provider # <<<<<<<<<<<<<< + * """Return provider's provides.""" + * return self.__provides # <<<<<<<<<<<<<< * - * @property + * def set_provides(self, provides): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __pyx_r = ((PyObject *)__pyx_v_self->__pyx___provider); + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __pyx_r = __pyx_v_self->__pyx___provides; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3877 + /* "dependency_injector/providers.pyx":3970 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return provider.""" - * return self.__provider + * """Return provider's provides.""" + * return self.__provides */ /* function exit code */ @@ -75206,12 +77084,79 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_8pr return __pyx_r; } -/* "dependency_injector/providers.pyx":3882 +/* "dependency_injector/providers.pyx":3974 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_11set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_15AttributeGetter_10set_provides[] = "Set provider's provides."; +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_11set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_10set_provides(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), ((PyObject *)__pyx_v_provides)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_10set_provides(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides", 0); + + /* "dependency_injector/providers.pyx":3976 + * def set_provides(self, provides): + * """Set provider's provides.""" + * self.__provides = provides # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_provides); + __Pyx_GIVEREF(__pyx_v_provides); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = __pyx_v_provides; + + /* "dependency_injector/providers.pyx":3977 + * """Set provider's provides.""" + * self.__provides = provides + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":3974 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":3980 * * @property * def name(self): # <<<<<<<<<<<<<< * """Return name of the attribute.""" - * return self.__attribute + * return self.__name */ /* Python wrapper */ @@ -75232,24 +77177,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4na __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3884 + /* "dependency_injector/providers.pyx":3982 * def name(self): * """Return name of the attribute.""" - * return self.__attribute # <<<<<<<<<<<<<< + * return self.__name # <<<<<<<<<<<<<< * - * def call(self, *args, **kwargs): + * def set_name(self, name): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->__pyx___attribute); - __pyx_r = __pyx_v_self->__pyx___attribute; + __Pyx_INCREF(__pyx_v_self->__pyx___name); + __pyx_r = __pyx_v_self->__pyx___name; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3882 + /* "dependency_injector/providers.pyx":3980 * * @property * def name(self): # <<<<<<<<<<<<<< * """Return name of the attribute.""" - * return self.__attribute + * return self.__name */ /* function exit code */ @@ -75259,8 +77204,75 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4na return __pyx_r; } -/* "dependency_injector/providers.pyx":3886 - * return self.__attribute +/* "dependency_injector/providers.pyx":3984 + * return self.__name + * + * def set_name(self, name): # <<<<<<<<<<<<<< + * """Set name of the attribute.""" + * self.__name = name + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13set_name(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_15AttributeGetter_12set_name[] = "Set name of the attribute."; +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13set_name(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_name (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_12set_name(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), ((PyObject *)__pyx_v_name)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_12set_name(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_name", 0); + + /* "dependency_injector/providers.pyx":3986 + * def set_name(self, name): + * """Set name of the attribute.""" + * self.__name = name # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + __Pyx_GOTREF(__pyx_v_self->__pyx___name); + __Pyx_DECREF(__pyx_v_self->__pyx___name); + __pyx_v_self->__pyx___name = __pyx_v_name; + + /* "dependency_injector/providers.pyx":3987 + * """Set name of the attribute.""" + * self.__name = name + * return self # <<<<<<<<<<<<<< + * + * def call(self, *args, **kwargs): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":3984 + * return self.__name + * + * def set_name(self, name): # <<<<<<<<<<<<<< + * """Set name of the attribute.""" + * self.__name = name + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":3989 + * return self * * def call(self, *args, **kwargs): # <<<<<<<<<<<<<< * return MethodCaller(self, *args, **kwargs) @@ -75268,8 +77280,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_4na */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_11call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_11call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_15call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_15call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; @@ -75284,7 +77296,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_11c } __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_10call(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_14call(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -75293,7 +77305,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_11c return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_10call(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14call(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -75303,7 +77315,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_10c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("call", 0); - /* "dependency_injector/providers.pyx":3887 + /* "dependency_injector/providers.pyx":3990 * * def call(self, *args, **kwargs): * return MethodCaller(self, *args, **kwargs) # <<<<<<<<<<<<<< @@ -75311,23 +77323,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_10c * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3887, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3887, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller), __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3887, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller), __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3886 - * return self.__attribute + /* "dependency_injector/providers.pyx":3989 + * return self * * def call(self, *args, **kwargs): # <<<<<<<<<<<<<< * return MethodCaller(self, *args, **kwargs) @@ -75347,12 +77359,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_10c } static PyObject *__pyx_gb_19dependency_injector_9providers_15AttributeGetter_7related_2generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":3890 +/* "dependency_injector/providers.pyx":3993 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ /* Python wrapper */ @@ -75380,7 +77392,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_7re if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_21___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 3890, __pyx_L1_error) + __PYX_ERR(1, 3993, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -75388,7 +77400,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_7re __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_15AttributeGetter_7related_2generator17, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_AttributeGetter___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3890, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_15AttributeGetter_7related_2generator17, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_AttributeGetter___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3993, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -75409,7 +77421,8 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_15AttributeGetter_7re struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_21___get__ *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_21___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -75417,41 +77430,65 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_15AttributeGetter_7re __Pyx_RefNannySetupContext("related", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; - case 1: goto __pyx_L4_resume_from_yield; - case 2: goto __pyx_L5_resume_from_yield_from; + case 1: goto __pyx_L5_resume_from_yield; + case 2: goto __pyx_L6_resume_from_yield_from; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3890, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3993, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3892 + /* "dependency_injector/providers.pyx":3995 * def related(self): * """Return related providers generator.""" - * yield self.__provider # <<<<<<<<<<<<<< + * if is_provider(self.provides): # <<<<<<<<<<<<<< + * yield self.provides + * yield from super().related + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_f_19dependency_injector_9providers_is_provider(__pyx_t_1, 0) != 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "dependency_injector/providers.pyx":3996 + * """Return related providers generator.""" + * if is_provider(self.provides): + * yield self.provides # <<<<<<<<<<<<<< * yield from super().related * */ - __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx___provider)); - __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx___provider); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - __Pyx_Coroutine_ResetAndClearException(__pyx_generator); - /* return from generator, yielding value */ - __pyx_generator->resume_label = 1; - return __pyx_r; - __pyx_L4_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3892, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L5_resume_from_yield:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3996, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3893 + /* "dependency_injector/providers.pyx":3995 + * def related(self): * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): # <<<<<<<<<<<<<< + * yield self.provides + * yield from super().related + */ + } + + /* "dependency_injector/providers.pyx":3997 + * if is_provider(self.provides): + * yield self.provides * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3893, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter)); @@ -75459,12 +77496,12 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_15AttributeGetter_7re __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3893, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3893, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_r); @@ -75475,23 +77512,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_15AttributeGetter_7re /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; - __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3893, __pyx_L1_error) + __pyx_L6_resume_from_yield_from:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3997, __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(1, 3893, __pyx_L1_error) + else __PYX_ERR(1, 3997, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":3890 + /* "dependency_injector/providers.pyx":3993 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ /* function exit code */ @@ -75499,7 +77536,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_15AttributeGetter_7re goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("related", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; @@ -75512,15 +77549,15 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_15AttributeGetter_7re return __pyx_r; } -/* "dependency_injector/providers.pyx":3895 +/* "dependency_injector/providers.pyx":3999 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< - * provided = self.__provider(*args, **kwargs) + * provided = self.provides(*args, **kwargs) * if __is_future_or_coroutine(provided): */ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_17_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__provide(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) { PyObject *__pyx_v_provided = NULL; PyObject *__pyx_v_future_result = NULL; @@ -75548,9 +77585,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3895, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13_provide)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_17_provide)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -75568,7 +77605,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3895, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3999, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -75576,13 +77613,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3895, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3999, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3895, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -75593,7 +77630,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3895, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -75616,29 +77653,32 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro #endif } - /* "dependency_injector/providers.pyx":3896 + /* "dependency_injector/providers.pyx":4000 * * cpdef object _provide(self, tuple args, dict kwargs): - * provided = self.__provider(*args, **kwargs) # <<<<<<<<<<<<<< + * provided = self.provides(*args, **kwargs) # <<<<<<<<<<<<<< * if __is_future_or_coroutine(provided): * future_result = asyncio.Future() */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 3896, __pyx_L1_error) + __PYX_ERR(1, 4000, __pyx_L1_error) } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 3896, __pyx_L1_error) + __PYX_ERR(1, 4000, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx___provider), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3896, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_provided = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_provided = __pyx_t_2; + __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3897 + /* "dependency_injector/providers.pyx":4001 * cpdef object _provide(self, tuple args, dict kwargs): - * provided = self.__provider(*args, **kwargs) + * provided = self.provides(*args, **kwargs) * if __is_future_or_coroutine(provided): # <<<<<<<<<<<<<< * future_result = asyncio.Future() * provided = asyncio.ensure_future(provided) @@ -75646,81 +77686,81 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro __pyx_t_7 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_provided) != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":3898 - * provided = self.__provider(*args, **kwargs) + /* "dependency_injector/providers.pyx":4002 + * provided = self.provides(*args, **kwargs) * if __is_future_or_coroutine(provided): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * provided = asyncio.ensure_future(provided) * provided.add_done_callback(functools.partial(self._async_provide, future_result)) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3898, __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, 3898, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4002, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_2)) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3898, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4002, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_future_result = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_future_result = __pyx_t_2; + __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3899 + /* "dependency_injector/providers.pyx":4003 * if __is_future_or_coroutine(provided): * future_result = asyncio.Future() * provided = asyncio.ensure_future(provided) # <<<<<<<<<<<<<< * provided.add_done_callback(functools.partial(self._async_provide, future_result)) * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3899, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3899, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provided) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provided); + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_provided) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_provided); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3899, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_provided, __pyx_t_1); - __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_provided, __pyx_t_2); + __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3900 + /* "dependency_injector/providers.pyx":4004 * future_result = asyncio.Future() * provided = asyncio.ensure_future(provided) * provided.add_done_callback(functools.partial(self._async_provide, future_result)) # <<<<<<<<<<<<<< * return future_result - * return getattr(provided, self.__attribute) + * return getattr(provided, self.name) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provided, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3900, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3900, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provided, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3900, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_provide); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3900, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_provide); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_5 = 0; @@ -75737,7 +77777,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_v_future_result}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3900, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4004, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -75746,14 +77786,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_v_future_result}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3900, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4004, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 3900, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 4004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -75764,34 +77804,34 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro __Pyx_GIVEREF(__pyx_v_future_result); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_5, __pyx_v_future_result); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3900, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3900, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3901 + /* "dependency_injector/providers.pyx":4005 * provided = asyncio.ensure_future(provided) * provided.add_done_callback(functools.partial(self._async_provide, future_result)) * return future_result # <<<<<<<<<<<<<< - * return getattr(provided, self.__attribute) + * return getattr(provided, self.name) * */ __Pyx_XDECREF(__pyx_r); @@ -75799,37 +77839,37 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3897 + /* "dependency_injector/providers.pyx":4001 * cpdef object _provide(self, tuple args, dict kwargs): - * provided = self.__provider(*args, **kwargs) + * provided = self.provides(*args, **kwargs) * if __is_future_or_coroutine(provided): # <<<<<<<<<<<<<< * future_result = asyncio.Future() * provided = asyncio.ensure_future(provided) */ } - /* "dependency_injector/providers.pyx":3902 + /* "dependency_injector/providers.pyx":4006 * provided.add_done_callback(functools.partial(self._async_provide, future_result)) * return future_result - * return getattr(provided, self.__attribute) # <<<<<<<<<<<<<< + * return getattr(provided, self.name) # <<<<<<<<<<<<<< * * def _async_provide(self, future_result, future): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_v_self->__pyx___attribute; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetAttr(__pyx_v_provided, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3902, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_GetAttr(__pyx_v_provided, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4006, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3895 + /* "dependency_injector/providers.pyx":3999 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< - * provided = self.__provider(*args, **kwargs) + * provided = self.provides(*args, **kwargs) * if __is_future_or_coroutine(provided): */ @@ -75853,8 +77893,8 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AttributeGetter__pro } /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_17_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_17_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -75886,11 +77926,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3895, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3999, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3895, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3999, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -75903,15 +77943,15 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3895, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3999, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.AttributeGetter._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3895, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3895, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_12_provide(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3999, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3999, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_provide(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; @@ -75922,7 +77962,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13_ return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_12_provide(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_provide(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -75931,7 +77971,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_12_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_15AttributeGetter__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3895, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_15AttributeGetter__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -75948,8 +77988,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_12_ return __pyx_r; } -/* "dependency_injector/providers.pyx":3904 - * return getattr(provided, self.__attribute) +/* "dependency_injector/providers.pyx":4008 + * return getattr(provided, self.name) * * def _async_provide(self, future_result, future): # <<<<<<<<<<<<<< * try: @@ -75957,8 +77997,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_12_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_15_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_15_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_19_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_19_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future_result = 0; PyObject *__pyx_v_future = 0; int __pyx_lineno = 0; @@ -75990,11 +78030,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_15_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, 1); __PYX_ERR(1, 3904, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, 1); __PYX_ERR(1, 4008, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_provide") < 0)) __PYX_ERR(1, 3904, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_provide") < 0)) __PYX_ERR(1, 4008, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -76007,22 +78047,23 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_15_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3904, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4008, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.AttributeGetter._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_async_provide(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), __pyx_v_future_result, __pyx_v_future); + __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_18_async_provide(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), __pyx_v_future_result, __pyx_v_future); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_async_provide(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future) { +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_18_async_provide(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future) { PyObject *__pyx_v_provided = NULL; PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_exception = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -76032,17 +78073,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_async_provide", 0); - /* "dependency_injector/providers.pyx":3905 + /* "dependency_injector/providers.pyx":4009 * * def _async_provide(self, future_result, future): * try: # <<<<<<<<<<<<<< * provided = future.result() - * result = getattr(provided, self.__attribute) + * result = getattr(provided, self.name) */ { __Pyx_PyThreadState_declare @@ -76053,14 +78097,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":3906 + /* "dependency_injector/providers.pyx":4010 * def _async_provide(self, future_result, future): * try: * provided = future.result() # <<<<<<<<<<<<<< - * result = getattr(provided, self.__attribute) - * except Exception: + * result = getattr(provided, self.name) + * 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, 3906, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4010, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -76074,45 +78118,45 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_ } __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, 3906, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4010, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_provided = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3907 + /* "dependency_injector/providers.pyx":4011 * try: * provided = future.result() - * result = getattr(provided, self.__attribute) # <<<<<<<<<<<<<< - * except Exception: - * pass + * result = getattr(provided, self.name) # <<<<<<<<<<<<<< + * except Exception as exception: + * future_result.set_exception(exception) */ - __pyx_t_4 = __pyx_v_self->__pyx___attribute; - __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = __Pyx_GetAttr(__pyx_v_provided, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3907, __pyx_L3_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4011, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_GetAttr(__pyx_v_provided, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4011, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":3905 + /* "dependency_injector/providers.pyx":4009 * * def _async_provide(self, future_result, future): * try: # <<<<<<<<<<<<<< * provided = future.result() - * result = getattr(provided, self.__attribute) + * result = getattr(provided, self.name) */ } - /* "dependency_injector/providers.pyx":3911 - * pass + /* "dependency_injector/providers.pyx":4015 + * future_result.set_exception(exception) * else: * future_result.set_result(result) # <<<<<<<<<<<<<< * * */ /*else:*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3911, __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, 4015, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -76126,7 +78170,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_ } __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, 3911, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4015, __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; @@ -76140,27 +78184,62 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":3908 + /* "dependency_injector/providers.pyx":4012 * provided = future.result() - * result = getattr(provided, self.__attribute) - * except Exception: # <<<<<<<<<<<<<< - * pass + * result = getattr(provided, self.name) + * except Exception as exception: # <<<<<<<<<<<<<< + * future_result.set_exception(exception) * else: */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_7) { - __Pyx_ErrRestore(0,0,0); + __Pyx_AddTraceback("dependency_injector.providers.AttributeGetter._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(1, 4012, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_exception = __pyx_t_4; + + /* "dependency_injector/providers.pyx":4013 + * result = getattr(provided, self.name) + * 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, 4013, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_exception); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4013, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":3905 + /* "dependency_injector/providers.pyx":4009 * * def _async_provide(self, future_result, future): * try: # <<<<<<<<<<<<<< * provided = future.result() - * result = getattr(provided, self.__attribute) + * result = getattr(provided, self.name) */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); @@ -76175,8 +78254,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_ __pyx_L8_try_end:; } - /* "dependency_injector/providers.pyx":3904 - * return getattr(provided, self.__attribute) + /* "dependency_injector/providers.pyx":4008 + * return getattr(provided, self.name) * * def _async_provide(self, future_result, future): # <<<<<<<<<<<<<< * try: @@ -76190,11 +78269,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("dependency_injector.providers.AttributeGetter._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_provided); __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_exception); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -76207,19 +78290,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_14_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_16__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_20__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_20__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -76239,7 +78322,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.__async_mode, self.__attribute, self.__last_overriding, self.__overridden, self.__provider) # <<<<<<<<<<<<<< + * state = (self.__async_mode, self.__last_overriding, self.__name, self.__overridden, self.__provides) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ @@ -76249,25 +78332,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_INCREF(__pyx_v_self->__pyx___attribute); - __Pyx_GIVEREF(__pyx_v_self->__pyx___attribute); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx___attribute); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); - PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); + __Pyx_INCREF(__pyx_v_self->__pyx___name); + __Pyx_GIVEREF(__pyx_v_self->__pyx___name); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx___name); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->__pyx_base.__pyx___overridden); - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___provider)); - PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_v_self->__pyx___provider)); + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __Pyx_GIVEREF(__pyx_v_self->__pyx___provides); + PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->__pyx___provides); __pyx_t_1 = 0; __pyx_v_state = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.__async_mode, self.__attribute, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__async_mode, self.__last_overriding, self.__name, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -76278,7 +78361,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ __pyx_t_2 = 0; /* "(tree fragment)":7 - * state = (self.__async_mode, self.__attribute, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__async_mode, self.__last_overriding, self.__name, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -76311,12 +78394,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.__attribute is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.__async_mode, self.__attribute, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__async_mode, self.__last_overriding, self.__name, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -76328,19 +78411,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.__attribute is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None # <<<<<<<<<<<<<< + * use_setstate = self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_AttributeGetter, (type(self), 0x7ec84e3, None), state + * return __pyx_unpickle_AttributeGetter, (type(self), 0x5f11305, None), state */ /*else*/ { - __pyx_t_3 = (__pyx_v_self->__pyx___attribute != Py_None); + __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None); __pyx_t_5 = (__pyx_t_3 != 0); if (!__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx___name != Py_None); __pyx_t_3 = (__pyx_t_5 != 0); if (!__pyx_t_3) { } else { @@ -76354,7 +78437,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx___provider) != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx___provides != Py_None); __pyx_t_3 = (__pyx_t_5 != 0); __pyx_t_4 = __pyx_t_3; __pyx_L4_bool_binop_done:; @@ -76364,20 +78447,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ /* "(tree fragment)":12 * else: - * use_setstate = self.__attribute is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_AttributeGetter, (type(self), 0x7ec84e3, None), state + * return __pyx_unpickle_AttributeGetter, (type(self), 0x5f11305, None), state * else: */ __pyx_t_4 = (__pyx_v_use_setstate != 0); if (__pyx_t_4) { /* "(tree fragment)":13 - * use_setstate = self.__attribute is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: - * return __pyx_unpickle_AttributeGetter, (type(self), 0x7ec84e3, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_AttributeGetter, (type(self), 0x5f11305, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_AttributeGetter, (type(self), 0x7ec84e3, state) + * return __pyx_unpickle_AttributeGetter, (type(self), 0x5f11305, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_AttributeGetter); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) @@ -76387,9 +78470,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_132941027); - __Pyx_GIVEREF(__pyx_int_132941027); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_132941027); + __Pyx_INCREF(__pyx_int_99685125); + __Pyx_GIVEREF(__pyx_int_99685125); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_99685125); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None); @@ -76410,17 +78493,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ /* "(tree fragment)":12 * else: - * use_setstate = self.__attribute is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_AttributeGetter, (type(self), 0x7ec84e3, None), state + * return __pyx_unpickle_AttributeGetter, (type(self), 0x5f11305, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_AttributeGetter, (type(self), 0x7ec84e3, None), state + * return __pyx_unpickle_AttributeGetter, (type(self), 0x5f11305, None), state * else: - * return __pyx_unpickle_AttributeGetter, (type(self), 0x7ec84e3, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_AttributeGetter, (type(self), 0x5f11305, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_AttributeGetter__set_state(self, __pyx_state) */ @@ -76433,9 +78516,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_132941027); - __Pyx_GIVEREF(__pyx_int_132941027); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_132941027); + __Pyx_INCREF(__pyx_int_99685125); + __Pyx_GIVEREF(__pyx_int_99685125); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_99685125); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state); @@ -76475,25 +78558,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_16_ /* "(tree fragment)":16 * else: - * return __pyx_unpickle_AttributeGetter, (type(self), 0x7ec84e3, state) + * return __pyx_unpickle_AttributeGetter, (type(self), 0x5f11305, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_AttributeGetter__set_state(self, __pyx_state) */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_15AttributeGetter_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_18__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_15AttributeGetter_22__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_18__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_22__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -76503,7 +78586,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_18_ __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_AttributeGetter, (type(self), 0x7ec84e3, state) + * return __pyx_unpickle_AttributeGetter, (type(self), 0x5f11305, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_AttributeGetter__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -76514,7 +78597,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_18_ /* "(tree fragment)":16 * else: - * return __pyx_unpickle_AttributeGetter, (type(self), 0x7ec84e3, state) + * return __pyx_unpickle_AttributeGetter, (type(self), 0x5f11305, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_AttributeGetter__set_state(self, __pyx_state) */ @@ -76532,19 +78615,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AttributeGetter_18_ return __pyx_r; } -/* "dependency_injector/providers.pyx":3920 +/* "dependency_injector/providers.pyx":4024 * """ * - * def __init__(self, Provider provider, object item): # <<<<<<<<<<<<<< - * self.__provider = provider - * self.__item = item + * def __init__(self, provides=None, name=None): # <<<<<<<<<<<<<< + * self.__provides = None + * self.set_provides(provides) */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_10ItemGetter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_19dependency_injector_9providers_10ItemGetter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_provider = 0; - PyObject *__pyx_v_item = 0; + PyObject *__pyx_v_provides = 0; + PyObject *__pyx_v_name = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -76552,8 +78635,10 @@ static int __pyx_pw_19dependency_injector_9providers_10ItemGetter_1__init__(PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provider,&__pyx_n_s_item,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,&__pyx_n_s_name_2,0}; PyObject* values[2] = {0,0}; + values[0] = ((PyObject *)Py_None); + values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -76568,48 +78653,49 @@ static int __pyx_pw_19dependency_injector_9providers_10ItemGetter_1__init__(PyOb kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } CYTHON_FALLTHROUGH; case 1: - if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item)) != 0)) kw_args--; - else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 3920, __pyx_L3_error) + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2); + if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 3920, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 4024, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } } - __pyx_v_provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)values[0]); - __pyx_v_item = values[1]; + __pyx_v_provides = values[0]; + __pyx_v_name = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3920, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4024, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ItemGetter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_provider), __pyx_ptype_19dependency_injector_9providers_Provider, 1, "provider", 0))) __PYX_ERR(1, 3920, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter___init__(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), __pyx_v_provider, __pyx_v_item); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter___init__(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), __pyx_v_provides, __pyx_v_name); /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __pyx_r = -1; - __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_19dependency_injector_9providers_10ItemGetter___init__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_provider, PyObject *__pyx_v_item) { +static int __pyx_pf_19dependency_injector_9providers_10ItemGetter___init__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -76620,40 +78706,92 @@ static int __pyx_pf_19dependency_injector_9providers_10ItemGetter___init__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":3921 + /* "dependency_injector/providers.pyx":4025 * - * def __init__(self, Provider provider, object item): - * self.__provider = provider # <<<<<<<<<<<<<< - * self.__item = item + * def __init__(self, provides=None, name=None): + * self.__provides = None # <<<<<<<<<<<<<< + * self.set_provides(provides) + * + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = Py_None; + + /* "dependency_injector/providers.pyx":4026 + * def __init__(self, provides=None, name=None): + * self.__provides = None + * self.set_provides(provides) # <<<<<<<<<<<<<< + * + * self.__name = None + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4026, __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_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_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4028 + * self.set_provides(provides) + * + * self.__name = None # <<<<<<<<<<<<<< + * self.set_name(name) * super().__init__() */ - __Pyx_INCREF(((PyObject *)__pyx_v_provider)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_provider)); - __Pyx_GOTREF(__pyx_v_self->__pyx___provider); - __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __pyx_v_self->__pyx___provider = __pyx_v_provider; + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___name); + __Pyx_DECREF(__pyx_v_self->__pyx___name); + __pyx_v_self->__pyx___name = Py_None; - /* "dependency_injector/providers.pyx":3922 - * def __init__(self, Provider provider, object item): - * self.__provider = provider - * self.__item = item # <<<<<<<<<<<<<< + /* "dependency_injector/providers.pyx":4029 + * + * self.__name = None + * self.set_name(name) # <<<<<<<<<<<<<< * super().__init__() * */ - __Pyx_INCREF(__pyx_v_item); - __Pyx_GIVEREF(__pyx_v_item); - __Pyx_GOTREF(__pyx_v_self->__pyx___item); - __Pyx_DECREF(__pyx_v_self->__pyx___item); - __pyx_v_self->__pyx___item = __pyx_v_item; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4029, __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_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_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3923 - * self.__provider = provider - * self.__item = item + /* "dependency_injector/providers.pyx":4030 + * self.__name = None + * self.set_name(name) * super().__init__() # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3923, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter)); @@ -76661,10 +78799,10 @@ static int __pyx_pf_19dependency_injector_9providers_10ItemGetter___init__(struc __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3923, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3923, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -76679,17 +78817,17 @@ static int __pyx_pf_19dependency_injector_9providers_10ItemGetter___init__(struc } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3923, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3920 + /* "dependency_injector/providers.pyx":4024 * """ * - * def __init__(self, Provider provider, object item): # <<<<<<<<<<<<<< - * self.__provider = provider - * self.__item = item + * def __init__(self, provides=None, name=None): # <<<<<<<<<<<<<< + * self.__provides = None + * self.set_provides(provides) */ /* function exit code */ @@ -76706,11 +78844,11 @@ static int __pyx_pf_19dependency_injector_9providers_10ItemGetter___init__(struc return __pyx_r; } -/* "dependency_injector/providers.pyx":3925 +/* "dependency_injector/providers.pyx":4032 * super().__init__() * * def __repr__(self): # <<<<<<<<<<<<<< - * return f'{self.__class__.__name__}(\'{self.__item}\')' + * return f'{self.__class__.__name__}(\'{self.name}\')' * */ @@ -76740,24 +78878,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_2__repr_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "dependency_injector/providers.pyx":3926 + /* "dependency_injector/providers.pyx":4033 * * def __repr__(self): - * return f'{self.__class__.__name__}(\'{self.__item}\')' # <<<<<<<<<<<<<< + * return f'{self.__class__.__name__}(\'{self.name}\')' # <<<<<<<<<<<<<< * - * def __deepcopy__(self, memo=None): + * def __deepcopy__(self, memo): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3926, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3926, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3926, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3926, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -76765,33 +78903,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_2__repr_ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u__29); + __pyx_t_2 += 2; + __Pyx_GIVEREF(__pyx_kp_u__29); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__29); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; + __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5); + __pyx_t_5 = 0; __Pyx_INCREF(__pyx_kp_u__30); __pyx_t_2 += 2; __Pyx_GIVEREF(__pyx_kp_u__30); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__30); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_self->__pyx___item, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3926, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__31); - __pyx_t_2 += 2; - __Pyx_GIVEREF(__pyx_kp_u__31); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__31); - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3926, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__30); + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3925 + /* "dependency_injector/providers.pyx":4032 * super().__init__() * * def __repr__(self): # <<<<<<<<<<<<<< - * return f'{self.__class__.__name__}(\'{self.__item}\')' + * return f'{self.__class__.__name__}(\'{self.name}\')' * */ @@ -76808,67 +78949,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_2__repr_ return __pyx_r; } -/* "dependency_injector/providers.pyx":3928 - * return f'{self.__class__.__name__}(\'{self.__item}\')' - * - * def __deepcopy__(self, memo=None): # <<<<<<<<<<<<<< - * cdef ItemGetter copied +/* "dependency_injector/providers.pyx":4035 + * return f'{self.__class__.__name__}(\'{self.name}\')' * + * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< + * copied = memo.get(id(self)) + * if copied is not None: */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_memo = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memo,0}; - PyObject* values[1] = {0}; - values[0] = ((PyObject *)Py_None); - if (unlikely(__pyx_kwds)) { - Py_ssize_t kw_args; - const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); - switch (pos_args) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = PyDict_Size(__pyx_kwds); - switch (pos_args) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo); - if (value) { values[0] = value; kw_args--; } - } - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deepcopy__") < 0)) __PYX_ERR(1, 3928, __pyx_L3_error) - } - } else { - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - } - __pyx_v_memo = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__deepcopy__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3928, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("dependency_injector.providers.ItemGetter.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_4__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), __pyx_v_memo); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_4__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), ((PyObject *)__pyx_v_memo)); /* function exit code */ __Pyx_RefNannyFinishContext(); @@ -76876,7 +78971,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_5__deepc } static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_memo) { - struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_copied = 0; + PyObject *__pyx_v_copied = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -76885,24 +78980,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4__deepc PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; - struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7; - int __pyx_t_8; - PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":3931 - * cdef ItemGetter copied + /* "dependency_injector/providers.pyx":4036 * + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3931, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3931, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -76917,38 +79009,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4__deepc __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3931, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_ItemGetter))))) __PYX_ERR(1, 3931, __pyx_L1_error) - __pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_t_1); + __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3932 - * + /* "dependency_injector/providers.pyx":4037 + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied * */ - __pyx_t_5 = (((PyObject *)__pyx_v_copied) != Py_None); + __pyx_t_5 = (__pyx_v_copied != Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":3933 + /* "dependency_injector/providers.pyx":4038 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * return self.__class__( + * copied = _memorized_duplicate(self, memo) */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_copied)); - __pyx_r = ((PyObject *)__pyx_v_copied); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3932 - * + /* "dependency_injector/providers.pyx":4037 + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied @@ -76956,42 +79047,35 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4__deepc */ } - /* "dependency_injector/providers.pyx":3935 + /* "dependency_injector/providers.pyx":4040 * return copied * - * return self.__class__( # <<<<<<<<<<<<<< - * deepcopy(self.__provider, memo), - * self.__item, + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_name(self.name) */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3935, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4040, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3936 + /* "dependency_injector/providers.pyx":4041 * - * return self.__class__( - * deepcopy(self.__provider, memo), # <<<<<<<<<<<<<< - * self.__item, - * ) + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(_copy_if_provider(self.provides, memo)) # <<<<<<<<<<<<<< + * copied.set_name(self.name) + * return copied */ - __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx___provider); - __Pyx_INCREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 3936, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3936, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4041, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4041, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4041, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers__copy_if_provider(__pyx_t_3, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "dependency_injector/providers.pyx":3937 - * return self.__class__( - * deepcopy(self.__provider, memo), - * self.__item, # <<<<<<<<<<<<<< - * ) - * - */ __pyx_t_3 = NULL; - __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { @@ -76999,54 +79083,63 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4__deepc __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_8 = 1; } } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_self->__pyx___item}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3935, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_self->__pyx___item}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3935, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 3935, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - if (__pyx_t_3) { - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL; - } - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4); - __Pyx_INCREF(__pyx_v_self->__pyx___item); - __Pyx_GIVEREF(__pyx_v_self->__pyx___item); - PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_self->__pyx___item); - __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3935, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } + __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(1, 4041, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4042 + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_name(self.name) # <<<<<<<<<<<<<< + * return copied + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_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(1, 4042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4043 + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_name(self.name) + * return copied # <<<<<<<<<<<<<< + * + * def __getattr__(self, item): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3928 - * return f'{self.__class__.__name__}(\'{self.__item}\')' - * - * def __deepcopy__(self, memo=None): # <<<<<<<<<<<<<< - * cdef ItemGetter copied + /* "dependency_injector/providers.pyx":4035 + * return f'{self.__class__.__name__}(\'{self.name}\')' * + * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< + * copied = memo.get(id(self)) + * if copied is not None: */ /* function exit code */ @@ -77055,18 +79148,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4__deepc __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("dependency_injector.providers.ItemGetter.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_copied); + __Pyx_XDECREF(__pyx_v_copied); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":3940 - * ) +/* "dependency_injector/providers.pyx":4045 + * return copied * * def __getattr__(self, item): # <<<<<<<<<<<<<< * return AttributeGetter(self, item) @@ -77096,7 +79188,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_6__getat int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":3941 + /* "dependency_injector/providers.pyx":4046 * * def __getattr__(self, item): * return AttributeGetter(self, item) # <<<<<<<<<<<<<< @@ -77104,7 +79196,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_6__getat * def __getitem__(self, item): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3941, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -77112,15 +79204,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_6__getat __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_item); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3941, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3940 - * ) + /* "dependency_injector/providers.pyx":4045 + * return copied * * def __getattr__(self, item): # <<<<<<<<<<<<<< * return AttributeGetter(self, item) @@ -77139,7 +79231,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_6__getat return __pyx_r; } -/* "dependency_injector/providers.pyx":3943 +/* "dependency_injector/providers.pyx":4048 * return AttributeGetter(self, item) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -77170,7 +79262,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_8__getit int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "dependency_injector/providers.pyx":3944 + /* "dependency_injector/providers.pyx":4049 * * def __getitem__(self, item): * return ItemGetter(self, item) # <<<<<<<<<<<<<< @@ -77178,7 +79270,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_8__getit * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3944, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -77186,14 +79278,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_8__getit __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_item); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3944, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3943 + /* "dependency_injector/providers.pyx":4048 * return AttributeGetter(self, item) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -77213,12 +79305,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_8__getit return __pyx_r; } -/* "dependency_injector/providers.pyx":3947 +/* "dependency_injector/providers.pyx":4052 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return provider.""" - * return self.__provider + * """Return provider's provides.""" + * return self.__provides */ /* Python wrapper */ @@ -77239,24 +79331,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_8provide __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3949 + /* "dependency_injector/providers.pyx":4054 * def provides(self): - * """Return provider.""" - * return self.__provider # <<<<<<<<<<<<<< + * """Return provider's provides.""" + * return self.__provides # <<<<<<<<<<<<<< * - * @property + * def set_provides(self, provides): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __pyx_r = ((PyObject *)__pyx_v_self->__pyx___provider); + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __pyx_r = __pyx_v_self->__pyx___provides; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3947 + /* "dependency_injector/providers.pyx":4052 * * @property * def provides(self): # <<<<<<<<<<<<<< - * """Return provider.""" - * return self.__provider + * """Return provider's provides.""" + * return self.__provides */ /* function exit code */ @@ -77266,12 +79358,79 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_8provide return __pyx_r; } -/* "dependency_injector/providers.pyx":3952 +/* "dependency_injector/providers.pyx":4056 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_11set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_10ItemGetter_10set_provides[] = "Set provider's provides."; +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_11set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_10set_provides(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), ((PyObject *)__pyx_v_provides)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_10set_provides(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides", 0); + + /* "dependency_injector/providers.pyx":4058 + * def set_provides(self, provides): + * """Set provider's provides.""" + * self.__provides = provides # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_provides); + __Pyx_GIVEREF(__pyx_v_provides); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = __pyx_v_provides; + + /* "dependency_injector/providers.pyx":4059 + * """Set provider's provides.""" + * self.__provides = provides + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4056 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":4062 * * @property * def name(self): # <<<<<<<<<<<<<< * """Return name of the item.""" - * return self.__item + * return self.__name */ /* Python wrapper */ @@ -77292,24 +79451,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4name___ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":3954 + /* "dependency_injector/providers.pyx":4064 * def name(self): * """Return name of the item.""" - * return self.__item # <<<<<<<<<<<<<< + * return self.__name # <<<<<<<<<<<<<< * - * def call(self, *args, **kwargs): + * def set_name(self, name): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->__pyx___item); - __pyx_r = __pyx_v_self->__pyx___item; + __Pyx_INCREF(__pyx_v_self->__pyx___name); + __pyx_r = __pyx_v_self->__pyx___name; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3952 + /* "dependency_injector/providers.pyx":4062 * * @property * def name(self): # <<<<<<<<<<<<<< * """Return name of the item.""" - * return self.__item + * return self.__name */ /* function exit code */ @@ -77319,8 +79478,75 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4name___ return __pyx_r; } -/* "dependency_injector/providers.pyx":3956 - * return self.__item +/* "dependency_injector/providers.pyx":4066 + * return self.__name + * + * def set_name(self, name): # <<<<<<<<<<<<<< + * """Set name of the item.""" + * self.__name = name + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_13set_name(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_10ItemGetter_12set_name[] = "Set name of the item."; +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_13set_name(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_name (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_12set_name(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), ((PyObject *)__pyx_v_name)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_12set_name(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_name", 0); + + /* "dependency_injector/providers.pyx":4068 + * def set_name(self, name): + * """Set name of the item.""" + * self.__name = name # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + __Pyx_GOTREF(__pyx_v_self->__pyx___name); + __Pyx_DECREF(__pyx_v_self->__pyx___name); + __pyx_v_self->__pyx___name = __pyx_v_name; + + /* "dependency_injector/providers.pyx":4069 + * """Set name of the item.""" + * self.__name = name + * return self # <<<<<<<<<<<<<< + * + * def call(self, *args, **kwargs): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4066 + * return self.__name + * + * def set_name(self, name): # <<<<<<<<<<<<<< + * """Set name of the item.""" + * self.__name = name + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":4071 + * return self * * def call(self, *args, **kwargs): # <<<<<<<<<<<<<< * return MethodCaller(self, *args, **kwargs) @@ -77328,8 +79554,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_4name___ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_11call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_11call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_15call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_15call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; @@ -77344,7 +79570,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_11call(P } __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_10call(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_14call(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -77353,7 +79579,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_11call(P return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_10call(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_14call(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -77363,7 +79589,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_10call(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("call", 0); - /* "dependency_injector/providers.pyx":3957 + /* "dependency_injector/providers.pyx":4072 * * def call(self, *args, **kwargs): * return MethodCaller(self, *args, **kwargs) # <<<<<<<<<<<<<< @@ -77371,23 +79597,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_10call(s * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3957, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3957, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller), __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3957, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller), __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3956 - * return self.__item + /* "dependency_injector/providers.pyx":4071 + * return self * * def call(self, *args, **kwargs): # <<<<<<<<<<<<<< * return MethodCaller(self, *args, **kwargs) @@ -77407,12 +79633,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_10call(s } static PyObject *__pyx_gb_19dependency_injector_9providers_10ItemGetter_7related_2generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":3960 +/* "dependency_injector/providers.pyx":4075 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ /* Python wrapper */ @@ -77440,7 +79666,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_7related if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_22___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 3960, __pyx_L1_error) + __PYX_ERR(1, 4075, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -77448,7 +79674,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_7related __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_10ItemGetter_7related_2generator18, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ItemGetter___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 3960, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_10ItemGetter_7related_2generator18, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_ItemGetter___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 4075, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -77469,7 +79695,8 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10ItemGetter_7related struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_22___get__ *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_22___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -77477,41 +79704,65 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10ItemGetter_7related __Pyx_RefNannySetupContext("related", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; - case 1: goto __pyx_L4_resume_from_yield; - case 2: goto __pyx_L5_resume_from_yield_from; + case 1: goto __pyx_L5_resume_from_yield; + case 2: goto __pyx_L6_resume_from_yield_from; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3960, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4075, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3962 + /* "dependency_injector/providers.pyx":4077 * def related(self): * """Return related providers generator.""" - * yield self.__provider # <<<<<<<<<<<<<< + * if is_provider(self.provides): # <<<<<<<<<<<<<< + * yield self.provides + * yield from super().related + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_f_19dependency_injector_9providers_is_provider(__pyx_t_1, 0) != 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "dependency_injector/providers.pyx":4078 + * """Return related providers generator.""" + * if is_provider(self.provides): + * yield self.provides # <<<<<<<<<<<<<< * yield from super().related * */ - __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx___provider)); - __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx___provider); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - __Pyx_Coroutine_ResetAndClearException(__pyx_generator); - /* return from generator, yielding value */ - __pyx_generator->resume_label = 1; - return __pyx_r; - __pyx_L4_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3962, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4078, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L5_resume_from_yield:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4078, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3963 + /* "dependency_injector/providers.pyx":4077 + * def related(self): * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): # <<<<<<<<<<<<<< + * yield self.provides + * yield from super().related + */ + } + + /* "dependency_injector/providers.pyx":4079 + * if is_provider(self.provides): + * yield self.provides * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3963, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter)); @@ -77519,12 +79770,12 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10ItemGetter_7related __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3963, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4079, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3963, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_r); @@ -77535,23 +79786,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10ItemGetter_7related /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; - __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 3963, __pyx_L1_error) + __pyx_L6_resume_from_yield_from:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4079, __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(1, 3963, __pyx_L1_error) + else __PYX_ERR(1, 4079, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":3960 + /* "dependency_injector/providers.pyx":4075 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ /* function exit code */ @@ -77559,7 +79810,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10ItemGetter_7related goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("related", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; @@ -77572,15 +79823,15 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_10ItemGetter_7related return __pyx_r; } -/* "dependency_injector/providers.pyx":3965 +/* "dependency_injector/providers.pyx":4081 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< - * provided = self.__provider(*args, **kwargs) + * provided = self.provides(*args, **kwargs) * if __is_future_or_coroutine(provided): */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_17_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) { PyObject *__pyx_v_provided = NULL; PyObject *__pyx_v_future_result = NULL; @@ -77608,9 +79859,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3965, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_10ItemGetter_13_provide)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_10ItemGetter_17_provide)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -77628,7 +79879,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3965, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4081, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -77636,13 +79887,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3965, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4081, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3965, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -77653,7 +79904,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3965, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -77676,29 +79927,32 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( #endif } - /* "dependency_injector/providers.pyx":3966 + /* "dependency_injector/providers.pyx":4082 * * cpdef object _provide(self, tuple args, dict kwargs): - * provided = self.__provider(*args, **kwargs) # <<<<<<<<<<<<<< + * provided = self.provides(*args, **kwargs) # <<<<<<<<<<<<<< * if __is_future_or_coroutine(provided): * future_result = asyncio.Future() */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4082, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 3966, __pyx_L1_error) + __PYX_ERR(1, 4082, __pyx_L1_error) } if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 3966, __pyx_L1_error) + __PYX_ERR(1, 4082, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx___provider), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3966, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_provided = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4082, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_provided = __pyx_t_2; + __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3967 + /* "dependency_injector/providers.pyx":4083 * cpdef object _provide(self, tuple args, dict kwargs): - * provided = self.__provider(*args, **kwargs) + * provided = self.provides(*args, **kwargs) * if __is_future_or_coroutine(provided): # <<<<<<<<<<<<<< * future_result = asyncio.Future() * provided = asyncio.ensure_future(provided) @@ -77706,81 +79960,81 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( __pyx_t_7 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_provided) != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":3968 - * provided = self.__provider(*args, **kwargs) + /* "dependency_injector/providers.pyx":4084 + * provided = self.provides(*args, **kwargs) * if __is_future_or_coroutine(provided): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * provided = asyncio.ensure_future(provided) * provided.add_done_callback(functools.partial(self._async_provide, future_result)) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3968, __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, 3968, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4084, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_2)) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3968, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4084, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_future_result = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_future_result = __pyx_t_2; + __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3969 + /* "dependency_injector/providers.pyx":4085 * if __is_future_or_coroutine(provided): * future_result = asyncio.Future() * provided = asyncio.ensure_future(provided) # <<<<<<<<<<<<<< * provided.add_done_callback(functools.partial(self._async_provide, future_result)) * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3969, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provided) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provided); + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_provided) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_provided); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_provided, __pyx_t_1); - __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_provided, __pyx_t_2); + __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3970 + /* "dependency_injector/providers.pyx":4086 * future_result = asyncio.Future() * provided = asyncio.ensure_future(provided) * provided.add_done_callback(functools.partial(self._async_provide, future_result)) # <<<<<<<<<<<<<< * return future_result - * return provided[self.__item] + * return provided[self.name] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provided, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3970, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3970, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provided, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3970, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_provide); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 3970, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_provide); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_5 = 0; @@ -77797,7 +80051,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_v_future_result}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3970, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4086, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -77806,14 +80060,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_v_future_result}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3970, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4086, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 3970, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 4086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -77824,34 +80078,34 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( __Pyx_GIVEREF(__pyx_v_future_result); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_5, __pyx_v_future_result); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3970, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3970, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3971 + /* "dependency_injector/providers.pyx":4087 * provided = asyncio.ensure_future(provided) * provided.add_done_callback(functools.partial(self._async_provide, future_result)) * return future_result # <<<<<<<<<<<<<< - * return provided[self.__item] + * return provided[self.name] * */ __Pyx_XDECREF(__pyx_r); @@ -77859,34 +80113,37 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3967 + /* "dependency_injector/providers.pyx":4083 * cpdef object _provide(self, tuple args, dict kwargs): - * provided = self.__provider(*args, **kwargs) + * provided = self.provides(*args, **kwargs) * if __is_future_or_coroutine(provided): # <<<<<<<<<<<<<< * future_result = asyncio.Future() * provided = asyncio.ensure_future(provided) */ } - /* "dependency_injector/providers.pyx":3972 + /* "dependency_injector/providers.pyx":4088 * provided.add_done_callback(functools.partial(self._async_provide, future_result)) * return future_result - * return provided[self.__item] # <<<<<<<<<<<<<< + * return provided[self.name] # <<<<<<<<<<<<<< * * def _async_provide(self, future_result, future): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_provided, __pyx_v_self->__pyx___item); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3972, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_provided, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3965 + /* "dependency_injector/providers.pyx":4081 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< - * provided = self.__provider(*args, **kwargs) + * provided = self.provides(*args, **kwargs) * if __is_future_or_coroutine(provided): */ @@ -77910,8 +80167,8 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10ItemGetter__provide( } /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_17_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_17_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -77943,11 +80200,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_13_provi case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 3965, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 4081, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 3965, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 4081, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -77960,15 +80217,15 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_13_provi } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3965, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4081, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ItemGetter._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 3965, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 3965, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_12_provide(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 4081, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 4081, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_16_provide(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; @@ -77979,7 +80236,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_13_provi return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_12_provide(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16_provide(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -77988,7 +80245,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_12_provi int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_10ItemGetter__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3965, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_10ItemGetter__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -78005,17 +80262,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_12_provi return __pyx_r; } -/* "dependency_injector/providers.pyx":3974 - * return provided[self.__item] +/* "dependency_injector/providers.pyx":4090 + * return provided[self.name] * * def _async_provide(self, future_result, future): # <<<<<<<<<<<<<< - * provided = future.result() - * result = provided[self.__item] + * try: + * provided = future.result() */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_15_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_15_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_19_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_19_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future_result = 0; PyObject *__pyx_v_future = 0; int __pyx_lineno = 0; @@ -78047,11 +80304,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_15_async case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, 1); __PYX_ERR(1, 3974, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, 1); __PYX_ERR(1, 4090, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_provide") < 0)) __PYX_ERR(1, 3974, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_provide") < 0)) __PYX_ERR(1, 4090, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -78064,117 +80321,237 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_15_async } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3974, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4090, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ItemGetter._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_14_async_provide(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), __pyx_v_future_result, __pyx_v_future); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_18_async_provide(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), __pyx_v_future_result, __pyx_v_future); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_14_async_provide(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_18_async_provide(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future) { PyObject *__pyx_v_provided = NULL; PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_exception = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_async_provide", 0); - /* "dependency_injector/providers.pyx":3975 + /* "dependency_injector/providers.pyx":4091 * * def _async_provide(self, future_result, future): - * provided = future.result() # <<<<<<<<<<<<<< - * result = provided[self.__item] - * future_result.set_result(result) + * try: # <<<<<<<<<<<<<< + * provided = future.result() + * result = provided[self.name] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3975, __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_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3975, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_provided = __pyx_t_1; - __pyx_t_1 = 0; + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { - /* "dependency_injector/providers.pyx":3976 + /* "dependency_injector/providers.pyx":4092 * def _async_provide(self, future_result, future): - * provided = future.result() - * result = provided[self.__item] # <<<<<<<<<<<<<< - * future_result.set_result(result) - * + * try: + * provided = future.result() # <<<<<<<<<<<<<< + * result = provided[self.name] + * except Exception as exception: */ - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_provided, __pyx_v_self->__pyx___item); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3976, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_result = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4092, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4092, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_provided = __pyx_t_4; + __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":3977 - * provided = future.result() - * result = provided[self.__item] - * future_result.set_result(result) # <<<<<<<<<<<<<< - * - * + /* "dependency_injector/providers.pyx":4093 + * try: + * provided = future.result() + * result = provided[self.name] # <<<<<<<<<<<<<< + * except Exception as exception: + * future_result.set_exception(exception) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4093, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_provided, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4093, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_result = __pyx_t_5; + __pyx_t_5 = 0; + + /* "dependency_injector/providers.pyx":4091 + * + * def _async_provide(self, future_result, future): + * try: # <<<<<<<<<<<<<< + * provided = future.result() + * result = provided[self.name] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3977, __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_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_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_result); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3977, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3974 - * return provided[self.__item] + /* "dependency_injector/providers.pyx":4097 + * future_result.set_exception(exception) + * else: + * future_result.set_result(result) # <<<<<<<<<<<<<< + * + * + */ + /*else:*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4097, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4097, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "dependency_injector/providers.pyx":4094 + * provided = future.result() + * result = provided[self.name] + * except Exception as exception: # <<<<<<<<<<<<<< + * future_result.set_exception(exception) + * else: + */ + __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_7) { + __Pyx_AddTraceback("dependency_injector.providers.ItemGetter._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(1, 4094, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_exception = __pyx_t_4; + + /* "dependency_injector/providers.pyx":4095 + * result = provided[self.name] + * 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, 4095, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_exception); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4095, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "dependency_injector/providers.pyx":4091 + * + * def _async_provide(self, future_result, future): + * try: # <<<<<<<<<<<<<< + * provided = future.result() + * result = provided[self.name] + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "dependency_injector/providers.pyx":4090 + * return provided[self.name] * * def _async_provide(self, future_result, future): # <<<<<<<<<<<<<< - * provided = future.result() - * result = provided[self.__item] + * try: + * provided = future.result() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("dependency_injector.providers.ItemGetter._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_provided); __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_exception); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -78187,19 +80564,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_14_async */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_16__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_20__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_20__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -78219,7 +80596,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.__async_mode, self.__item, self.__last_overriding, self.__overridden, self.__provider) # <<<<<<<<<<<<<< + * state = (self.__async_mode, self.__last_overriding, self.__name, self.__overridden, self.__provides) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ @@ -78229,25 +80606,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_INCREF(__pyx_v_self->__pyx___item); - __Pyx_GIVEREF(__pyx_v_self->__pyx___item); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx___item); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); - PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding)); + __Pyx_INCREF(__pyx_v_self->__pyx___name); + __Pyx_GIVEREF(__pyx_v_self->__pyx___name); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx___name); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->__pyx_base.__pyx___overridden); - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___provider)); - PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_v_self->__pyx___provider)); + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __Pyx_GIVEREF(__pyx_v_self->__pyx___provides); + PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->__pyx___provides); __pyx_t_1 = 0; __pyx_v_state = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.__async_mode, self.__item, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__async_mode, self.__last_overriding, self.__name, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -78258,7 +80635,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu __pyx_t_2 = 0; /* "(tree fragment)":7 - * state = (self.__async_mode, self.__item, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__async_mode, self.__last_overriding, self.__name, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -78291,12 +80668,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.__item is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.__async_mode, self.__item, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__async_mode, self.__last_overriding, self.__name, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -78308,19 +80685,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.__item is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None # <<<<<<<<<<<<<< + * use_setstate = self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_ItemGetter, (type(self), 0xa0575be, None), state + * return __pyx_unpickle_ItemGetter, (type(self), 0x5f11305, None), state */ /*else*/ { - __pyx_t_3 = (__pyx_v_self->__pyx___item != Py_None); + __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None); __pyx_t_5 = (__pyx_t_3 != 0); if (!__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx___name != Py_None); __pyx_t_3 = (__pyx_t_5 != 0); if (!__pyx_t_3) { } else { @@ -78334,7 +80711,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx___provider) != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx___provides != Py_None); __pyx_t_3 = (__pyx_t_5 != 0); __pyx_t_4 = __pyx_t_3; __pyx_L4_bool_binop_done:; @@ -78344,20 +80721,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu /* "(tree fragment)":12 * else: - * use_setstate = self.__item is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_ItemGetter, (type(self), 0xa0575be, None), state + * return __pyx_unpickle_ItemGetter, (type(self), 0x5f11305, None), state * else: */ __pyx_t_4 = (__pyx_v_use_setstate != 0); if (__pyx_t_4) { /* "(tree fragment)":13 - * use_setstate = self.__item is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: - * return __pyx_unpickle_ItemGetter, (type(self), 0xa0575be, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_ItemGetter, (type(self), 0x5f11305, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_ItemGetter, (type(self), 0xa0575be, state) + * return __pyx_unpickle_ItemGetter, (type(self), 0x5f11305, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ItemGetter); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) @@ -78367,9 +80744,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_168129982); - __Pyx_GIVEREF(__pyx_int_168129982); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_168129982); + __Pyx_INCREF(__pyx_int_99685125); + __Pyx_GIVEREF(__pyx_int_99685125); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_99685125); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None); @@ -78390,17 +80767,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu /* "(tree fragment)":12 * else: - * use_setstate = self.__item is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_ItemGetter, (type(self), 0xa0575be, None), state + * return __pyx_unpickle_ItemGetter, (type(self), 0x5f11305, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_ItemGetter, (type(self), 0xa0575be, None), state + * return __pyx_unpickle_ItemGetter, (type(self), 0x5f11305, None), state * else: - * return __pyx_unpickle_ItemGetter, (type(self), 0xa0575be, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_ItemGetter, (type(self), 0x5f11305, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_ItemGetter__set_state(self, __pyx_state) */ @@ -78413,9 +80790,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_168129982); - __Pyx_GIVEREF(__pyx_int_168129982); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_168129982); + __Pyx_INCREF(__pyx_int_99685125); + __Pyx_GIVEREF(__pyx_int_99685125); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_99685125); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state); @@ -78455,25 +80832,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_16__redu /* "(tree fragment)":16 * else: - * return __pyx_unpickle_ItemGetter, (type(self), 0xa0575be, state) + * return __pyx_unpickle_ItemGetter, (type(self), 0x5f11305, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ItemGetter__set_state(self, __pyx_state) */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_10ItemGetter_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_18__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_10ItemGetter_22__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_18__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_22__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ItemGetter *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -78483,7 +80860,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_18__sets __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_ItemGetter, (type(self), 0xa0575be, state) + * return __pyx_unpickle_ItemGetter, (type(self), 0x5f11305, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_ItemGetter__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -78494,7 +80871,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_18__sets /* "(tree fragment)":16 * else: - * return __pyx_unpickle_ItemGetter, (type(self), 0xa0575be, state) + * return __pyx_unpickle_ItemGetter, (type(self), 0x5f11305, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_ItemGetter__set_state(self, __pyx_state) */ @@ -78512,18 +80889,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10ItemGetter_18__sets return __pyx_r; } -/* "dependency_injector/providers.pyx":3986 +/* "dependency_injector/providers.pyx":4106 * """ * - * def __init__(self, provider, *args, **kwargs): # <<<<<<<<<<<<<< - * self.__provider = provider - * + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< + * self.__provides = None + * self.set_provides(provides) */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_12MethodCaller_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_19dependency_injector_9providers_12MethodCaller_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_provider = 0; + PyObject *__pyx_v_provides = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -78546,8 +80923,9 @@ static int __pyx_pw_19dependency_injector_9providers_12MethodCaller_1__init__(Py __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provider,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0}; PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -78560,23 +80938,26 @@ static int __pyx_pw_19dependency_injector_9providers_12MethodCaller_1__init__(Py kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides); + if (value) { values[0] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 3986, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 4106, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } } - __pyx_v_provider = values[0]; + __pyx_v_provides = values[0]; } goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 3986, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -78584,7 +80965,7 @@ static int __pyx_pw_19dependency_injector_9providers_12MethodCaller_1__init__(Py __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller___init__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), __pyx_v_provider, __pyx_v_args, __pyx_v_kwargs); + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller___init__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), __pyx_v_provides, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); @@ -78593,42 +80974,64 @@ static int __pyx_pw_19dependency_injector_9providers_12MethodCaller_1__init__(Py return __pyx_r; } -static int __pyx_pf_19dependency_injector_9providers_12MethodCaller___init__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_provider, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static int __pyx_pf_19dependency_injector_9providers_12MethodCaller___init__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; + 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("__init__", 0); - /* "dependency_injector/providers.pyx":3987 + /* "dependency_injector/providers.pyx":4107 * - * def __init__(self, provider, *args, **kwargs): - * self.__provider = provider # <<<<<<<<<<<<<< + * def __init__(self, provides=None, *args, **kwargs): + * self.__provides = None # <<<<<<<<<<<<<< + * self.set_provides(provides) * - * self.__args = parse_positional_injections(args) */ - if (!(likely(((__pyx_v_provider) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_provider, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 3987, __pyx_L1_error) - __pyx_t_1 = __pyx_v_provider; - __Pyx_INCREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_self->__pyx___provider); - __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __pyx_v_self->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); - __pyx_t_1 = 0; + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = Py_None; - /* "dependency_injector/providers.pyx":3989 - * self.__provider = provider - * - * self.__args = parse_positional_injections(args) # <<<<<<<<<<<<<< - * self.__args_len = len(self.__args) + /* "dependency_injector/providers.pyx":4108 + * def __init__(self, provides=None, *args, **kwargs): + * self.__provides = None + * self.set_provides(provides) # <<<<<<<<<<<<<< * + * self.__args = tuple() */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3989, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4108, __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_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_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provides); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4110 + * self.set_provides(provides) + * + * self.__args = tuple() # <<<<<<<<<<<<<< + * self.__args_len = 0 + * self.set_args(*args) + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -78636,99 +81039,111 @@ static int __pyx_pf_19dependency_injector_9providers_12MethodCaller___init__(str __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3990 + /* "dependency_injector/providers.pyx":4111 * - * self.__args = parse_positional_injections(args) - * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< + * self.__args = tuple() + * self.__args_len = 0 # <<<<<<<<<<<<<< + * self.set_args(*args) * - * self.__kwargs = parse_named_injections(kwargs) */ - __pyx_t_1 = __pyx_v_self->__pyx___args; - __Pyx_INCREF(__pyx_t_1); - if (unlikely(__pyx_t_1 == Py_None)) { - PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3990, __pyx_L1_error) - } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3990, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_self->__pyx___args_len = __pyx_t_2; + __pyx_v_self->__pyx___args_len = 0; - /* "dependency_injector/providers.pyx":3992 - * self.__args_len = len(self.__args) - * - * self.__kwargs = parse_named_injections(kwargs) # <<<<<<<<<<<<<< - * self.__kwargs_len = len(self.__kwargs) + /* "dependency_injector/providers.pyx":4112 + * self.__args = tuple() + * self.__args_len = 0 + * self.set_args(*args) # <<<<<<<<<<<<<< * + * self.__kwargs = tuple() */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3992, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "dependency_injector/providers.pyx":4114 + * self.set_args(*args) + * + * self.__kwargs = tuple() # <<<<<<<<<<<<<< + * self.__kwargs_len = 0 + * self.set_kwargs(**kwargs) + */ + __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); __Pyx_DECREF(__pyx_v_self->__pyx___kwargs); - __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":3993 + /* "dependency_injector/providers.pyx":4115 * - * self.__kwargs = parse_named_injections(kwargs) - * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< + * self.__kwargs = tuple() + * self.__kwargs_len = 0 # <<<<<<<<<<<<<< + * self.set_kwargs(**kwargs) + * + */ + __pyx_v_self->__pyx___kwargs_len = 0; + + /* "dependency_injector/providers.pyx":4116 + * self.__kwargs = tuple() + * self.__kwargs_len = 0 + * self.set_kwargs(**kwargs) # <<<<<<<<<<<<<< * * super().__init__() */ - __pyx_t_1 = __pyx_v_self->__pyx___kwargs; - __Pyx_INCREF(__pyx_t_1); - if (unlikely(__pyx_t_1 == Py_None)) { - PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 3993, __pyx_L1_error) - } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 3993, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4116, __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; - __pyx_v_self->__pyx___kwargs_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":3995 - * self.__kwargs_len = len(self.__kwargs) + /* "dependency_injector/providers.pyx":4118 + * self.set_kwargs(**kwargs) * * super().__init__() # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3995, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3995, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3995, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_1 = (__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_1)) __PYX_ERR(1, 3995, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":3986 + /* "dependency_injector/providers.pyx":4106 * """ * - * def __init__(self, provider, *args, **kwargs): # <<<<<<<<<<<<<< - * self.__provider = provider - * + * def __init__(self, provides=None, *args, **kwargs): # <<<<<<<<<<<<<< + * self.__provides = None + * self.set_provides(provides) */ /* function exit code */ @@ -78736,8 +81151,8 @@ static int __pyx_pf_19dependency_injector_9providers_12MethodCaller___init__(str goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("dependency_injector.providers.MethodCaller.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -78745,11 +81160,11 @@ static int __pyx_pf_19dependency_injector_9providers_12MethodCaller___init__(str return __pyx_r; } -/* "dependency_injector/providers.pyx":3997 +/* "dependency_injector/providers.pyx":4120 * super().__init__() * * def __repr__(self): # <<<<<<<<<<<<<< - * return f'{self.__class__.__name__}({self.__provider})' + * return f'{self.__class__.__name__}({self.provides})' * */ @@ -78779,24 +81194,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_2__rep int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "dependency_injector/providers.pyx":3998 + /* "dependency_injector/providers.pyx":4121 * * def __repr__(self): - * return f'{self.__class__.__name__}({self.__provider})' # <<<<<<<<<<<<<< + * return f'{self.__class__.__name__}({self.provides})' # <<<<<<<<<<<<<< * - * def __deepcopy__(self, memo=None): + * def __deepcopy__(self, memo): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3998, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3998, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3998, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3998, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -78804,33 +81219,36 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_2__rep __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__8); + __Pyx_INCREF(__pyx_kp_u__7); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__8); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__8); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_self->__pyx___provider), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3998, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__7); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__32); + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; + __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__31); __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__32); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__32); - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3998, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_kp_u__31); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__31); + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":3997 + /* "dependency_injector/providers.pyx":4120 * super().__init__() * * def __repr__(self): # <<<<<<<<<<<<<< - * return f'{self.__class__.__name__}({self.__provider})' + * return f'{self.__class__.__name__}({self.provides})' * */ @@ -78847,67 +81265,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_2__rep return __pyx_r; } -/* "dependency_injector/providers.pyx":4000 - * return f'{self.__class__.__name__}({self.__provider})' - * - * def __deepcopy__(self, memo=None): # <<<<<<<<<<<<<< - * cdef MethodCaller copied +/* "dependency_injector/providers.pyx":4123 + * return f'{self.__class__.__name__}({self.provides})' * + * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< + * copied = memo.get(id(self)) + * if copied is not None: */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_memo = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memo,0}; - PyObject* values[1] = {0}; - values[0] = ((PyObject *)Py_None); - if (unlikely(__pyx_kwds)) { - Py_ssize_t kw_args; - const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); - switch (pos_args) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = PyDict_Size(__pyx_kwds); - switch (pos_args) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo); - if (value) { values[0] = value; kw_args--; } - } - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deepcopy__") < 0)) __PYX_ERR(1, 4000, __pyx_L3_error) - } - } else { - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - } - __pyx_v_memo = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__deepcopy__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4000, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("dependency_injector.providers.MethodCaller.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_4__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), __pyx_v_memo); + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_4__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), ((PyObject *)__pyx_v_memo)); /* function exit code */ __Pyx_RefNannyFinishContext(); @@ -78915,7 +81287,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_5__dee } static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_memo) { - struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_copied = 0; + PyObject *__pyx_v_copied = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -78925,22 +81297,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4__dee int __pyx_t_5; int __pyx_t_6; struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7; - int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":4003 - * cdef MethodCaller copied + /* "dependency_injector/providers.pyx":4124 * + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4003, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4003, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -78955,38 +81326,37 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4__dee __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4003, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_MethodCaller))))) __PYX_ERR(1, 4003, __pyx_L1_error) - __pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_t_1); + __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4004 - * + /* "dependency_injector/providers.pyx":4125 + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied * */ - __pyx_t_5 = (((PyObject *)__pyx_v_copied) != Py_None); + __pyx_t_5 = (__pyx_v_copied != Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":4005 + /* "dependency_injector/providers.pyx":4126 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< * - * copied = self.__class__(deepcopy(self.__provider, memo)) + * copied = _memorized_duplicate(self, memo) */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_copied)); - __pyx_r = ((PyObject *)__pyx_v_copied); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4004 - * + /* "dependency_injector/providers.pyx":4125 + * def __deepcopy__(self, memo): * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< * return copied @@ -78994,21 +81364,32 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4__dee */ } - /* "dependency_injector/providers.pyx":4007 + /* "dependency_injector/providers.pyx":4128 * return copied * - * copied = self.__class__(deepcopy(self.__provider, memo)) # <<<<<<<<<<<<<< - * copied.__args = deepcopy(self.__args, memo) - * copied.__args_len = self.__args_len + * copied = _memorized_duplicate(self, memo) # <<<<<<<<<<<<<< + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_args(*deepcopy(self.args, memo)) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4007, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4128, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4129 + * + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(_copy_if_provider(self.provides, memo)) # <<<<<<<<<<<<<< + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = ((PyObject *)__pyx_v_self->__pyx___provider); - __Pyx_INCREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4007, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4007, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4129, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers__copy_if_provider(__pyx_t_3, ((PyObject*)__pyx_v_memo), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -79024,105 +81405,102 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4__dee __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(1, 4007, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_MethodCaller))))) __PYX_ERR(1, 4007, __pyx_L1_error) - __Pyx_DECREF_SET(__pyx_v_copied, ((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":4008 - * - * copied = self.__class__(deepcopy(self.__provider, memo)) - * copied.__args = deepcopy(self.__args, memo) # <<<<<<<<<<<<<< - * copied.__args_len = self.__args_len - * copied.__kwargs = deepcopy(self.__kwargs, memo) - */ - __pyx_t_1 = __pyx_v_self->__pyx___args; - __Pyx_INCREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4008, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4008, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 4008, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_v_copied->__pyx___args); - __Pyx_DECREF(__pyx_v_copied->__pyx___args); - __pyx_v_copied->__pyx___args = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":4009 - * copied = self.__class__(deepcopy(self.__provider, memo)) - * copied.__args = deepcopy(self.__args, memo) - * copied.__args_len = self.__args_len # <<<<<<<<<<<<<< - * copied.__kwargs = deepcopy(self.__kwargs, memo) - * copied.__kwargs_len = self.__kwargs_len - */ - __pyx_t_8 = __pyx_v_self->__pyx___args_len; - __pyx_v_copied->__pyx___args_len = __pyx_t_8; - - /* "dependency_injector/providers.pyx":4010 - * copied.__args = deepcopy(self.__args, memo) - * copied.__args_len = self.__args_len - * copied.__kwargs = deepcopy(self.__kwargs, memo) # <<<<<<<<<<<<<< - * copied.__kwargs_len = self.__kwargs_len - * - */ - __pyx_t_2 = __pyx_v_self->__pyx___kwargs; - __Pyx_INCREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4010, __pyx_L1_error) - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4010, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 4010, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_copied->__pyx___kwargs); - __Pyx_DECREF(__pyx_v_copied->__pyx___kwargs); - __pyx_v_copied->__pyx___kwargs = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":4011 - * copied.__args_len = self.__args_len - * copied.__kwargs = deepcopy(self.__kwargs, memo) - * copied.__kwargs_len = self.__kwargs_len # <<<<<<<<<<<<<< - * + /* "dependency_injector/providers.pyx":4130 + * copied = _memorized_duplicate(self, memo) + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_args(*deepcopy(self.args, memo)) # <<<<<<<<<<<<<< + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) * self._copy_overridings(copied, memo) */ - __pyx_t_8 = __pyx_v_self->__pyx___kwargs_len; - __pyx_v_copied->__pyx___kwargs_len = __pyx_t_8; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4130, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":4013 - * copied.__kwargs_len = self.__kwargs_len - * - * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< - * + /* "dependency_injector/providers.pyx":4131 + * copied.set_provides(_copy_if_provider(self.provides, memo)) + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< + * self._copy_overridings(copied, memo) * return copied */ - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4013, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4131, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_3 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(1, 4131, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_t_3))) { + __pyx_t_2 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "dependency_injector/providers.pyx":4132 + * copied.set_args(*deepcopy(self.args, memo)) + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) + * self._copy_overridings(copied, memo) # <<<<<<<<<<<<<< + * return copied + * + */ + if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 4132, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4132, __pyx_L1_error) ((struct __pyx_vtabstruct_19dependency_injector_9providers_MethodCaller *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0); - /* "dependency_injector/providers.pyx":4015 + /* "dependency_injector/providers.pyx":4133 + * copied.set_kwargs(**deepcopy(self.kwargs, memo)) * self._copy_overridings(copied, memo) - * * return copied # <<<<<<<<<<<<<< * * def __getattr__(self, item): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_copied)); - __pyx_r = ((PyObject *)__pyx_v_copied); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4000 - * return f'{self.__class__.__name__}({self.__provider})' - * - * def __deepcopy__(self, memo=None): # <<<<<<<<<<<<<< - * cdef MethodCaller copied + /* "dependency_injector/providers.pyx":4123 + * return f'{self.__class__.__name__}({self.provides})' * + * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< + * copied = memo.get(id(self)) + * if copied is not None: */ /* function exit code */ @@ -79134,13 +81512,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4__dee __Pyx_AddTraceback("dependency_injector.providers.MethodCaller.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_copied); + __Pyx_XDECREF(__pyx_v_copied); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/providers.pyx":4017 +/* "dependency_injector/providers.pyx":4135 * return copied * * def __getattr__(self, item): # <<<<<<<<<<<<<< @@ -79171,7 +81549,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_6__get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":4018 + /* "dependency_injector/providers.pyx":4136 * * def __getattr__(self, item): * return AttributeGetter(self, item) # <<<<<<<<<<<<<< @@ -79179,7 +81557,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_6__get * def __getitem__(self, item): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4018, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -79187,14 +81565,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_6__get __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_item); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4018, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AttributeGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4017 + /* "dependency_injector/providers.pyx":4135 * return copied * * def __getattr__(self, item): # <<<<<<<<<<<<<< @@ -79214,7 +81592,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_6__get return __pyx_r; } -/* "dependency_injector/providers.pyx":4020 +/* "dependency_injector/providers.pyx":4138 * return AttributeGetter(self, item) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -79245,15 +81623,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_8__get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "dependency_injector/providers.pyx":4021 + /* "dependency_injector/providers.pyx":4139 * * def __getitem__(self, item): * return ItemGetter(self, item) # <<<<<<<<<<<<<< * - * @property + * def call(self, *args, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4021, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -79261,14 +81639,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_8__get __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_item); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4021, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ItemGetter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4020 + /* "dependency_injector/providers.pyx":4138 * return AttributeGetter(self, item) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -79288,310 +81666,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_8__get return __pyx_r; } -/* "dependency_injector/providers.pyx":4024 - * - * @property - * def provides(self): # <<<<<<<<<<<<<< - * """Return provider.""" - * return self.__provider - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_8provides_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_8provides_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_8provides___get__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__", 0); - - /* "dependency_injector/providers.pyx":4026 - * def provides(self): - * """Return provider.""" - * return self.__provider # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __pyx_r = ((PyObject *)__pyx_v_self->__pyx___provider); - goto __pyx_L0; - - /* "dependency_injector/providers.pyx":4024 - * - * @property - * def provides(self): # <<<<<<<<<<<<<< - * """Return provider.""" - * return self.__provider - */ - - /* function exit code */ - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "dependency_injector/providers.pyx":4029 - * - * @property - * def args(self): # <<<<<<<<<<<<<< - * """Return positional argument injections.""" - * cdef int index - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_4args_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_4args_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_4args___get__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4args___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self) { - int __pyx_v_index; - struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_arg = 0; - PyObject *__pyx_v_args = 0; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - int __pyx_t_4; - int __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "dependency_injector/providers.pyx":4035 - * cdef list args - * - * args = list() # <<<<<<<<<<<<<< - * for index in range(self.__args_len): - * arg = self.__args[index] - */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4035, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_args = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":4036 - * - * args = list() - * for index in range(self.__args_len): # <<<<<<<<<<<<<< - * arg = self.__args[index] - * args.append(arg.__value) - */ - __pyx_t_2 = __pyx_v_self->__pyx___args_len; - __pyx_t_3 = __pyx_t_2; - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { - __pyx_v_index = __pyx_t_4; - - /* "dependency_injector/providers.pyx":4037 - * args = list() - * for index in range(self.__args_len): - * arg = self.__args[index] # <<<<<<<<<<<<<< - * args.append(arg.__value) - * return tuple(args) - */ - if (unlikely(__pyx_v_self->__pyx___args == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 4037, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4037, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_PositionalInjection))))) __PYX_ERR(1, 4037, __pyx_L1_error) - __Pyx_XDECREF_SET(__pyx_v_arg, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":4038 - * for index in range(self.__args_len): - * arg = self.__args[index] - * args.append(arg.__value) # <<<<<<<<<<<<<< - * return tuple(args) - * - */ - __pyx_t_1 = __pyx_v_arg->__pyx_base.__pyx___value; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 4038, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - - /* "dependency_injector/providers.pyx":4039 - * arg = self.__args[index] - * args.append(arg.__value) - * return tuple(args) # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4039, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "dependency_injector/providers.pyx":4029 - * - * @property - * def args(self): # <<<<<<<<<<<<<< - * """Return positional argument injections.""" - * cdef int index - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("dependency_injector.providers.MethodCaller.args.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_arg); - __Pyx_XDECREF(__pyx_v_args); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "dependency_injector/providers.pyx":4042 - * - * @property - * def kwargs(self): # <<<<<<<<<<<<<< - * """Return keyword argument injections.""" - * cdef int index - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_6kwargs_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_6kwargs_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_6kwargs___get__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self) { - int __pyx_v_index; - struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_kwarg = 0; - PyObject *__pyx_v_kwargs = 0; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - int __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "dependency_injector/providers.pyx":4048 - * cdef dict kwargs - * - * kwargs = dict() # <<<<<<<<<<<<<< - * for index in range(self.__kwargs_len): - * kwarg = self.__kwargs[index] - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4048, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_kwargs = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":4049 - * - * kwargs = dict() - * for index in range(self.__kwargs_len): # <<<<<<<<<<<<<< - * kwarg = self.__kwargs[index] - * kwargs[kwarg.__name] = kwarg.__value - */ - __pyx_t_2 = __pyx_v_self->__pyx___kwargs_len; - __pyx_t_3 = __pyx_t_2; - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { - __pyx_v_index = __pyx_t_4; - - /* "dependency_injector/providers.pyx":4050 - * kwargs = dict() - * for index in range(self.__kwargs_len): - * kwarg = self.__kwargs[index] # <<<<<<<<<<<<<< - * kwargs[kwarg.__name] = kwarg.__value - * return kwargs - */ - if (unlikely(__pyx_v_self->__pyx___kwargs == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 4050, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4050, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 4050, __pyx_L1_error) - __Pyx_XDECREF_SET(__pyx_v_kwarg, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "dependency_injector/providers.pyx":4051 - * for index in range(self.__kwargs_len): - * kwarg = self.__kwargs[index] - * kwargs[kwarg.__name] = kwarg.__value # <<<<<<<<<<<<<< - * return kwargs - * - */ - __pyx_t_1 = __pyx_v_kwarg->__pyx_base.__pyx___value; - __Pyx_INCREF(__pyx_t_1); - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 4051, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - - /* "dependency_injector/providers.pyx":4052 - * kwarg = self.__kwargs[index] - * kwargs[kwarg.__name] = kwarg.__value - * return kwargs # <<<<<<<<<<<<<< - * - * def call(self, *args, **kwargs): - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_kwargs); - __pyx_r = __pyx_v_kwargs; - goto __pyx_L0; - - /* "dependency_injector/providers.pyx":4042 - * - * @property - * def kwargs(self): # <<<<<<<<<<<<<< - * """Return keyword argument injections.""" - * cdef int index - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("dependency_injector.providers.MethodCaller.kwargs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_kwarg); - __Pyx_XDECREF(__pyx_v_kwargs); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "dependency_injector/providers.pyx":4054 - * return kwargs +/* "dependency_injector/providers.pyx":4141 + * return ItemGetter(self, item) * * def call(self, *args, **kwargs): # <<<<<<<<<<<<<< * return MethodCaller(self, *args, **kwargs) @@ -79634,7 +81710,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_10call int __pyx_clineno = 0; __Pyx_RefNannySetupContext("call", 0); - /* "dependency_injector/providers.pyx":4055 + /* "dependency_injector/providers.pyx":4142 * * def call(self, *args, **kwargs): * return MethodCaller(self, *args, **kwargs) # <<<<<<<<<<<<<< @@ -79642,23 +81718,23 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_10call * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4055, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4055, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller), __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4055, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller), __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4054 - * return kwargs + /* "dependency_injector/providers.pyx":4141 + * return ItemGetter(self, item) * * def call(self, *args, **kwargs): # <<<<<<<<<<<<<< * return MethodCaller(self, *args, **kwargs) @@ -79676,14 +81752,585 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_10call __Pyx_RefNannyFinishContext(); return __pyx_r; } + +/* "dependency_injector/providers.pyx":4145 + * + * @property + * def provides(self): # <<<<<<<<<<<<<< + * """Return provider's provides.""" + * return self.__provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_8provides_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_8provides_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_8provides___get__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "dependency_injector/providers.pyx":4147 + * def provides(self): + * """Return provider's provides.""" + * return self.__provides # <<<<<<<<<<<<<< + * + * def set_provides(self, provides): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __pyx_r = __pyx_v_self->__pyx___provides; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4145 + * + * @property + * def provides(self): # <<<<<<<<<<<<<< + * """Return provider's provides.""" + * return self.__provides + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":4149 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_13set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_12MethodCaller_12set_provides[] = "Set provider's provides."; +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_13set_provides(PyObject *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_12set_provides(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), ((PyObject *)__pyx_v_provides)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_12set_provides(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_provides) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_provides", 0); + + /* "dependency_injector/providers.pyx":4151 + * def set_provides(self, provides): + * """Set provider's provides.""" + * self.__provides = provides # <<<<<<<<<<<<<< + * return self + * + */ + __Pyx_INCREF(__pyx_v_provides); + __Pyx_GIVEREF(__pyx_v_provides); + __Pyx_GOTREF(__pyx_v_self->__pyx___provides); + __Pyx_DECREF(__pyx_v_self->__pyx___provides); + __pyx_v_self->__pyx___provides = __pyx_v_provides; + + /* "dependency_injector/providers.pyx":4152 + * """Set provider's provides.""" + * self.__provides = provides + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4149 + * return self.__provides + * + * def set_provides(self, provides): # <<<<<<<<<<<<<< + * """Set provider's provides.""" + * self.__provides = provides + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":4155 + * + * @property + * def args(self): # <<<<<<<<<<<<<< + * """Return positional argument injections.""" + * cdef int index + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_4args_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_4args_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_4args___get__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_4args___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self) { + int __pyx_v_index; + struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_arg = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "dependency_injector/providers.pyx":4161 + * cdef list args + * + * args = list() # <<<<<<<<<<<<<< + * for index in range(self.__args_len): + * arg = self.__args[index] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4162 + * + * args = list() + * for index in range(self.__args_len): # <<<<<<<<<<<<<< + * arg = self.__args[index] + * args.append(arg.__value) + */ + __pyx_t_2 = __pyx_v_self->__pyx___args_len; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_index = __pyx_t_4; + + /* "dependency_injector/providers.pyx":4163 + * args = list() + * for index in range(self.__args_len): + * arg = self.__args[index] # <<<<<<<<<<<<<< + * args.append(arg.__value) + * return tuple(args) + */ + if (unlikely(__pyx_v_self->__pyx___args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 4163, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_PositionalInjection))))) __PYX_ERR(1, 4163, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_arg, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4164 + * for index in range(self.__args_len): + * arg = self.__args[index] + * args.append(arg.__value) # <<<<<<<<<<<<<< + * return tuple(args) + * + */ + __pyx_t_1 = __pyx_v_arg->__pyx_base.__pyx___value; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 4164, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "dependency_injector/providers.pyx":4165 + * arg = self.__args[index] + * args.append(arg.__value) + * return tuple(args) # <<<<<<<<<<<<<< + * + * def set_args(self, *args): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4155 + * + * @property + * def args(self): # <<<<<<<<<<<<<< + * """Return positional argument injections.""" + * cdef int index + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers.MethodCaller.args.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_arg); + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":4167 + * return tuple(args) + * + * def set_args(self, *args): # <<<<<<<<<<<<<< + * """Set positional argument injections. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_15set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_12MethodCaller_14set_args[] = "Set positional argument injections.\n\n Existing positional argument injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_15set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_args (wrapper)", 0); + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_args", 0))) return NULL; + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_14set_args(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), __pyx_v_args); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_14set_args(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_args) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_args", 0); + + /* "dependency_injector/providers.pyx":4174 + * :return: Reference ``self`` + * """ + * self.__args = parse_positional_injections(args) # <<<<<<<<<<<<<< + * self.__args_len = len(self.__args) + * return self + */ + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->__pyx___args); + __Pyx_DECREF(__pyx_v_self->__pyx___args); + __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4175 + * """ + * self.__args = parse_positional_injections(args) + * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< + * return self + * + */ + __pyx_t_1 = __pyx_v_self->__pyx___args; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 4175, __pyx_L1_error) + } + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 4175, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->__pyx___args_len = __pyx_t_2; + + /* "dependency_injector/providers.pyx":4176 + * self.__args = parse_positional_injections(args) + * self.__args_len = len(self.__args) + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4167 + * return tuple(args) + * + * def set_args(self, *args): # <<<<<<<<<<<<<< + * """Set positional argument injections. + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers.MethodCaller.set_args", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":4179 + * + * @property + * def kwargs(self): # <<<<<<<<<<<<<< + * """Return keyword argument injections.""" + * cdef int index + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_6kwargs_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_6kwargs_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_6kwargs___get__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self) { + int __pyx_v_index; + struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_kwarg = 0; + PyObject *__pyx_v_kwargs = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "dependency_injector/providers.pyx":4185 + * cdef dict kwargs + * + * kwargs = dict() # <<<<<<<<<<<<<< + * for index in range(self.__kwargs_len): + * kwarg = self.__kwargs[index] + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_kwargs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4186 + * + * kwargs = dict() + * for index in range(self.__kwargs_len): # <<<<<<<<<<<<<< + * kwarg = self.__kwargs[index] + * kwargs[kwarg.__name] = kwarg.__value + */ + __pyx_t_2 = __pyx_v_self->__pyx___kwargs_len; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_index = __pyx_t_4; + + /* "dependency_injector/providers.pyx":4187 + * kwargs = dict() + * for index in range(self.__kwargs_len): + * kwarg = self.__kwargs[index] # <<<<<<<<<<<<<< + * kwargs[kwarg.__name] = kwarg.__value + * return kwargs + */ + if (unlikely(__pyx_v_self->__pyx___kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 4187, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 4187, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_kwarg, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4188 + * for index in range(self.__kwargs_len): + * kwarg = self.__kwargs[index] + * kwargs[kwarg.__name] = kwarg.__value # <<<<<<<<<<<<<< + * return kwargs + * + */ + __pyx_t_1 = __pyx_v_kwarg->__pyx_base.__pyx___value; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 4188, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "dependency_injector/providers.pyx":4189 + * kwarg = self.__kwargs[index] + * kwargs[kwarg.__name] = kwarg.__value + * return kwargs # <<<<<<<<<<<<<< + * + * def set_kwargs(self, **kwargs): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_kwargs); + __pyx_r = __pyx_v_kwargs; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4179 + * + * @property + * def kwargs(self): # <<<<<<<<<<<<<< + * """Return keyword argument injections.""" + * cdef int index + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers.MethodCaller.kwargs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_kwarg); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":4191 + * return kwargs + * + * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< + * """Set keyword argument injections. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_17set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_12MethodCaller_16set_kwargs[] = "Set keyword argument injections.\n\n Existing keyword argument injections are dropped.\n\n :return: Reference ``self``\n "; +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_17set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_kwargs = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_kwargs (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("set_kwargs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} + if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_kwargs", 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_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_16set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), __pyx_v_kwargs); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16set_kwargs(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_kwargs", 0); + + /* "dependency_injector/providers.pyx":4198 + * :return: Reference ``self`` + * """ + * self.__kwargs = parse_named_injections(kwargs) # <<<<<<<<<<<<<< + * self.__kwargs_len = len(self.__kwargs) + * return self + */ + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); + __Pyx_DECREF(__pyx_v_self->__pyx___kwargs); + __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4199 + * """ + * self.__kwargs = parse_named_injections(kwargs) + * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< + * return self + * + */ + __pyx_t_1 = __pyx_v_self->__pyx___kwargs; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 4199, __pyx_L1_error) + } + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 4199, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->__pyx___kwargs_len = __pyx_t_2; + + /* "dependency_injector/providers.pyx":4200 + * self.__kwargs = parse_named_injections(kwargs) + * self.__kwargs_len = len(self.__kwargs) + * return self # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4191 + * return kwargs + * + * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< + * """Set keyword argument injections. + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers.MethodCaller.set_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} static PyObject *__pyx_gb_19dependency_injector_9providers_12MethodCaller_7related_2generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":4058 +/* "dependency_injector/providers.pyx":4203 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ /* Python wrapper */ @@ -79711,7 +82358,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_7relat if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_23___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 4058, __pyx_L1_error) + __PYX_ERR(1, 4203, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -79719,7 +82366,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_7relat __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_12MethodCaller_7related_2generator19, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_MethodCaller___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 4058, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_12MethodCaller_7related_2generator19, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get_2, __pyx_n_s_MethodCaller___get, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 4203, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -79740,9 +82387,10 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_12MethodCaller_7relat struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_23___get__ *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_23___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -79750,59 +82398,83 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_12MethodCaller_7relat __Pyx_RefNannySetupContext("related", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; - case 1: goto __pyx_L4_resume_from_yield; - case 2: goto __pyx_L5_resume_from_yield_from; - case 3: goto __pyx_L6_resume_from_yield_from; - case 4: goto __pyx_L7_resume_from_yield_from; + case 1: goto __pyx_L5_resume_from_yield; + case 2: goto __pyx_L6_resume_from_yield_from; + case 3: goto __pyx_L7_resume_from_yield_from; + case 4: goto __pyx_L8_resume_from_yield_from; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4058, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4203, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4060 + /* "dependency_injector/providers.pyx":4205 * def related(self): * """Return related providers generator.""" - * yield self.__provider # <<<<<<<<<<<<<< + * if is_provider(self.provides): # <<<<<<<<<<<<<< + * yield self.provides + * yield from filter(is_provider, self.args) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_f_19dependency_injector_9providers_is_provider(__pyx_t_1, 0) != 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "dependency_injector/providers.pyx":4206 + * """Return related providers generator.""" + * if is_provider(self.provides): + * yield self.provides # <<<<<<<<<<<<<< * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) */ - __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx___provider)); - __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_self->__pyx___provider); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - __Pyx_Coroutine_ResetAndClearException(__pyx_generator); - /* return from generator, yielding value */ - __pyx_generator->resume_label = 1; - return __pyx_r; - __pyx_L4_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4060, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L5_resume_from_yield:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4206, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4061 + /* "dependency_injector/providers.pyx":4205 + * def related(self): * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): # <<<<<<<<<<<<<< + * yield self.provides + * yield from filter(is_provider, self.args) + */ + } + + /* "dependency_injector/providers.pyx":4207 + * if is_provider(self.provides): + * yield self.provides * yield from filter(is_provider, self.args) # <<<<<<<<<<<<<< * yield from filter(is_provider, self.kwargs.values()) * yield from super().related */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4061, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4061, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4061, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_1 = 0; - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4061, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); @@ -79811,58 +82483,58 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_12MethodCaller_7relat /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; - __pyx_L5_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4061, __pyx_L1_error) + __pyx_L6_resume_from_yield_from:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4207, __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(1, 4061, __pyx_L1_error) + else __PYX_ERR(1, 4207, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":4062 - * yield self.__provider + /* "dependency_injector/providers.pyx":4208 + * yield self.provides * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) # <<<<<<<<<<<<<< * yield from super().related * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4062, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4062, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4062, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + 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_4); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_5, function); } } - __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __pyx_t_4 = (__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_3)) __PYX_ERR(1, 4062, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4062, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); - __pyx_t_2 = 0; + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4062, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); @@ -79871,39 +82543,39 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_12MethodCaller_7relat /* return from generator, yielding value */ __pyx_generator->resume_label = 3; return __pyx_r; - __pyx_L6_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4062, __pyx_L1_error) + __pyx_L7_resume_from_yield_from:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4208, __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(1, 4062, __pyx_L1_error) + else __PYX_ERR(1, 4208, __pyx_L1_error) } } - /* "dependency_injector/providers.pyx":4063 + /* "dependency_injector/providers.pyx":4209 * yield from filter(is_provider, self.args) * yield from filter(is_provider, self.kwargs.values()) * yield from super().related # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4063, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_MethodCaller)); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4063, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_related); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4063, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_related); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __Pyx_Generator_Yield_From(__pyx_generator, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); @@ -79912,23 +82584,23 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_12MethodCaller_7relat /* return from generator, yielding value */ __pyx_generator->resume_label = 4; return __pyx_r; - __pyx_L7_resume_from_yield_from:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4063, __pyx_L1_error) + __pyx_L8_resume_from_yield_from:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4209, __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(1, 4063, __pyx_L1_error) + else __PYX_ERR(1, 4209, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":4058 + /* "dependency_injector/providers.pyx":4203 * * @property * def related(self): # <<<<<<<<<<<<<< * """Return related providers generator.""" - * yield self.__provider + * if is_provider(self.provides): */ /* function exit code */ @@ -79936,9 +82608,9 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_12MethodCaller_7relat goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("related", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; @@ -79951,15 +82623,15 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_12MethodCaller_7relat return __pyx_r; } -/* "dependency_injector/providers.pyx":4065 +/* "dependency_injector/providers.pyx":4211 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< - * call = self.__provider() + * call = self.provides() * if __is_future_or_coroutine(call): */ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provide(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) { PyObject *__pyx_v_call = NULL; PyObject *__pyx_v_future_result = NULL; @@ -79987,9 +82659,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4065, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_12MethodCaller_13_provide)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_12MethodCaller_19_provide)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -80007,7 +82679,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4065, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4211, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -80015,13 +82687,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4065, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4211, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4065, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -80032,7 +82704,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4065, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -80055,15 +82727,16 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid #endif } - /* "dependency_injector/providers.pyx":4066 + /* "dependency_injector/providers.pyx":4212 * * cpdef object _provide(self, tuple args, dict kwargs): - * call = self.__provider() # <<<<<<<<<<<<<< + * call = self.provides() # <<<<<<<<<<<<<< * if __is_future_or_coroutine(call): * future_result = asyncio.Future() */ - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx___provider); __pyx_t_3 = NULL; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4212, __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)) { @@ -80075,15 +82748,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4066, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_call = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4067 + /* "dependency_injector/providers.pyx":4213 * cpdef object _provide(self, tuple args, dict kwargs): - * call = self.__provider() + * call = self.provides() * if __is_future_or_coroutine(call): # <<<<<<<<<<<<<< * future_result = asyncio.Future() * call = asyncio.ensure_future(call) @@ -80091,16 +82764,16 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid __pyx_t_7 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_call) != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":4068 - * call = self.__provider() + /* "dependency_injector/providers.pyx":4214 + * call = self.provides() * if __is_future_or_coroutine(call): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * call = asyncio.ensure_future(call) * call.add_done_callback(functools.partial(self._async_provide, future_result, args, kwargs)) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4068, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4214, __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, 4068, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -80115,22 +82788,22 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid } __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, 4068, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_future_result = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4069 + /* "dependency_injector/providers.pyx":4215 * if __is_future_or_coroutine(call): * future_result = asyncio.Future() * call = asyncio.ensure_future(call) # <<<<<<<<<<<<<< * call.add_done_callback(functools.partial(self._async_provide, future_result, args, kwargs)) * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4069, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4069, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -80145,27 +82818,27 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_call) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_call); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4069, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_call, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4070 + /* "dependency_injector/providers.pyx":4216 * future_result = asyncio.Future() * call = asyncio.ensure_future(call) * call.add_done_callback(functools.partial(self._async_provide, future_result, args, kwargs)) # <<<<<<<<<<<<<< * return future_result * return __call( */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_call, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4070, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_call, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4070, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_functools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4070, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_provide); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4070, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_async_provide); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_5 = 0; @@ -80182,7 +82855,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_6, __pyx_v_future_result, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4070, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4216, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -80191,14 +82864,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_6, __pyx_v_future_result, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4070, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4216, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 4070, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 4216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -80215,7 +82888,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_5, __pyx_v_kwargs); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4070, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -80233,12 +82906,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4070, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4071 + /* "dependency_injector/providers.pyx":4217 * call = asyncio.ensure_future(call) * call.add_done_callback(functools.partial(self._async_provide, future_result, args, kwargs)) * return future_result # <<<<<<<<<<<<<< @@ -80250,16 +82923,16 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4067 + /* "dependency_injector/providers.pyx":4213 * cpdef object _provide(self, tuple args, dict kwargs): - * call = self.__provider() + * call = self.provides() * if __is_future_or_coroutine(call): # <<<<<<<<<<<<<< * future_result = asyncio.Future() * call = asyncio.ensure_future(call) */ } - /* "dependency_injector/providers.pyx":4072 + /* "dependency_injector/providers.pyx":4218 * call.add_done_callback(functools.partial(self._async_provide, future_result, args, kwargs)) * return future_result * return __call( # <<<<<<<<<<<<<< @@ -80268,7 +82941,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid */ __Pyx_XDECREF(__pyx_r); - /* "dependency_injector/providers.pyx":4075 + /* "dependency_injector/providers.pyx":4221 * call, * args, * self.__args, # <<<<<<<<<<<<<< @@ -80278,7 +82951,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid __pyx_t_1 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":4078 + /* "dependency_injector/providers.pyx":4224 * self.__args_len, * kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -80288,14 +82961,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid __pyx_t_2 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pyx":4072 + /* "dependency_injector/providers.pyx":4218 * call.add_done_callback(functools.partial(self._async_provide, future_result, args, kwargs)) * return future_result * return __call( # <<<<<<<<<<<<<< * call, * args, */ - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___call(__pyx_v_call, __pyx_v_args, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4072, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___call(__pyx_v_call, __pyx_v_args, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -80303,11 +82976,11 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4065 + /* "dependency_injector/providers.pyx":4211 * yield from super().related * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< - * call = self.__provider() + * call = self.provides() * if __is_future_or_coroutine(call): */ @@ -80331,8 +83004,8 @@ static PyObject *__pyx_f_19dependency_injector_9providers_12MethodCaller__provid } /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_lineno = 0; @@ -80364,11 +83037,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_13_pro case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 4065, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 4211, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 4065, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 4211, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -80381,15 +83054,15 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_13_pro } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4065, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4211, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.MethodCaller._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 4065, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 4065, __pyx_L1_error) - __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_12_provide(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 4211, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 4211, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_18_provide(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ goto __pyx_L0; @@ -80400,7 +83073,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_13_pro return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_12_provide(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_18_provide(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -80409,7 +83082,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_12_pro int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_12MethodCaller__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4065, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_12MethodCaller__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -80426,17 +83099,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_12_pro return __pyx_r; } -/* "dependency_injector/providers.pyx":4082 +/* "dependency_injector/providers.pyx":4228 * ) * * def _async_provide(self, future_result, args, kwargs, future): # <<<<<<<<<<<<<< - * call = future.result() - * result = __call( + * try: + * call = future.result() */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_15_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_15_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_21_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_21_async_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future_result = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; @@ -80474,23 +83147,23 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_15_asy case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 4, 4, 1); __PYX_ERR(1, 4082, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 4, 4, 1); __PYX_ERR(1, 4228, __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_provide", 1, 4, 4, 2); __PYX_ERR(1, 4082, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 4, 4, 2); __PYX_ERR(1, 4228, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 4, 4, 3); __PYX_ERR(1, 4082, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 4, 4, 3); __PYX_ERR(1, 4228, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_provide") < 0)) __PYX_ERR(1, 4082, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_provide") < 0)) __PYX_ERR(1, 4228, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -80507,157 +83180,274 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_15_asy } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4082, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_provide", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4228, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.MethodCaller._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_14_async_provide(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), __pyx_v_future_result, __pyx_v_args, __pyx_v_kwargs, __pyx_v_future); + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_20_async_provide(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), __pyx_v_future_result, __pyx_v_args, __pyx_v_kwargs, __pyx_v_future); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_14_async_provide(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, PyObject *__pyx_v_future) { +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_20_async_provide(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, PyObject *__pyx_v_future) { PyObject *__pyx_v_call = NULL; PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_exception = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_async_provide", 0); - /* "dependency_injector/providers.pyx":4083 + /* "dependency_injector/providers.pyx":4229 * * def _async_provide(self, future_result, args, kwargs, future): - * call = future.result() # <<<<<<<<<<<<<< - * result = __call( - * call, + * try: # <<<<<<<<<<<<<< + * call = future.result() + * result = __call( */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4083, __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_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4083, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_call = __pyx_t_1; - __pyx_t_1 = 0; + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { - /* "dependency_injector/providers.pyx":4086 - * result = __call( - * call, - * args, # <<<<<<<<<<<<<< - * self.__args, - * self.__args_len, - */ - if (!(likely(PyTuple_CheckExact(__pyx_v_args))||((__pyx_v_args) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_args)->tp_name), 0))) __PYX_ERR(1, 4086, __pyx_L1_error) - - /* "dependency_injector/providers.pyx":4087 - * call, - * args, - * self.__args, # <<<<<<<<<<<<<< - * self.__args_len, - * kwargs, - */ - __pyx_t_1 = __pyx_v_self->__pyx___args; - __Pyx_INCREF(__pyx_t_1); - - /* "dependency_injector/providers.pyx":4089 - * self.__args, - * self.__args_len, - * kwargs, # <<<<<<<<<<<<<< - * self.__kwargs, - * self.__kwargs_len, - */ - if (!(likely(PyDict_CheckExact(__pyx_v_kwargs))||((__pyx_v_kwargs) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_kwargs)->tp_name), 0))) __PYX_ERR(1, 4089, __pyx_L1_error) - - /* "dependency_injector/providers.pyx":4090 - * self.__args_len, - * kwargs, - * self.__kwargs, # <<<<<<<<<<<<<< - * self.__kwargs_len, - * ) - */ - __pyx_t_2 = __pyx_v_self->__pyx___kwargs; - __Pyx_INCREF(__pyx_t_2); - - /* "dependency_injector/providers.pyx":4084 + /* "dependency_injector/providers.pyx":4230 * def _async_provide(self, future_result, args, kwargs, future): - * call = future.result() - * result = __call( # <<<<<<<<<<<<<< - * call, - * args, + * try: + * call = future.result() # <<<<<<<<<<<<<< + * result = __call( + * call, */ - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___call(__pyx_v_call, ((PyObject*)__pyx_v_args), ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len, ((PyObject*)__pyx_v_kwargs), ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4084, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_result = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4230, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4230, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_call = __pyx_t_4; + __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":4093 - * self.__kwargs_len, - * ) - * future_result.set_result(result) # <<<<<<<<<<<<<< - * - * + /* "dependency_injector/providers.pyx":4233 + * result = __call( + * call, + * args, # <<<<<<<<<<<<<< + * self.__args, + * self.__args_len, + */ + if (!(likely(PyTuple_CheckExact(__pyx_v_args))||((__pyx_v_args) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_args)->tp_name), 0))) __PYX_ERR(1, 4233, __pyx_L3_error) + + /* "dependency_injector/providers.pyx":4234 + * call, + * args, + * self.__args, # <<<<<<<<<<<<<< + * self.__args_len, + * kwargs, + */ + __pyx_t_4 = __pyx_v_self->__pyx___args; + __Pyx_INCREF(__pyx_t_4); + + /* "dependency_injector/providers.pyx":4236 + * self.__args, + * self.__args_len, + * kwargs, # <<<<<<<<<<<<<< + * self.__kwargs, + * self.__kwargs_len, + */ + if (!(likely(PyDict_CheckExact(__pyx_v_kwargs))||((__pyx_v_kwargs) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_kwargs)->tp_name), 0))) __PYX_ERR(1, 4236, __pyx_L3_error) + + /* "dependency_injector/providers.pyx":4237 + * self.__args_len, + * kwargs, + * self.__kwargs, # <<<<<<<<<<<<<< + * self.__kwargs_len, + * ) + */ + __pyx_t_5 = __pyx_v_self->__pyx___kwargs; + __Pyx_INCREF(__pyx_t_5); + + /* "dependency_injector/providers.pyx":4231 + * try: + * call = future.result() + * result = __call( # <<<<<<<<<<<<<< + * call, + * args, + */ + __pyx_t_6 = __pyx_f_19dependency_injector_9providers___call(__pyx_v_call, ((PyObject*)__pyx_v_args), ((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___args_len, ((PyObject*)__pyx_v_kwargs), ((PyObject*)__pyx_t_5), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4231, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_result = __pyx_t_6; + __pyx_t_6 = 0; + + /* "dependency_injector/providers.pyx":4229 + * + * def _async_provide(self, future_result, args, kwargs, future): + * try: # <<<<<<<<<<<<<< + * call = future.result() + * result = __call( */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4093, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); } - } - __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_result); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4093, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":4082 + /* "dependency_injector/providers.pyx":4243 + * future_result.set_exception(exception) + * else: + * future_result.set_result(result) # <<<<<<<<<<<<<< + * + * + */ + /*else:*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4243, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4243, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "dependency_injector/providers.pyx":4240 + * self.__kwargs_len, + * ) + * except Exception as exception: # <<<<<<<<<<<<<< + * future_result.set_exception(exception) + * else: + */ + __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_7) { + __Pyx_AddTraceback("dependency_injector.providers.MethodCaller._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(1, 4240, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __pyx_v_exception = __pyx_t_5; + + /* "dependency_injector/providers.pyx":4241 + * ) + * 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, 4241, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_exception); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4241, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "dependency_injector/providers.pyx":4229 + * + * def _async_provide(self, future_result, args, kwargs, future): + * try: # <<<<<<<<<<<<<< + * call = future.result() + * result = __call( + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "dependency_injector/providers.pyx":4228 * ) * * def _async_provide(self, future_result, args, kwargs, future): # <<<<<<<<<<<<<< - * call = future.result() - * result = __call( + * try: + * call = future.result() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("dependency_injector.providers.MethodCaller._async_provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_call); __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_exception); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -80670,19 +83460,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_14_asy */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_16__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_22__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self) { +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_22__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -80703,7 +83493,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.__args, self.__args_len, self.__async_mode, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provider) # <<<<<<<<<<<<<< + * state = (self.__args, self.__args_len, self.__async_mode, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ @@ -80733,9 +83523,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden); PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_self->__pyx_base.__pyx___overridden); - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___provider)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___provider)); - PyTuple_SET_ITEM(__pyx_t_4, 7, ((PyObject *)__pyx_v_self->__pyx___provider)); + __Pyx_INCREF(__pyx_v_self->__pyx___provides); + __Pyx_GIVEREF(__pyx_v_self->__pyx___provides); + PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_v_self->__pyx___provides); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; @@ -80744,7 +83534,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.__args, self.__args_len, self.__async_mode, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__args, self.__args_len, self.__async_mode, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -80755,7 +83545,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re __pyx_t_4 = 0; /* "(tree fragment)":7 - * state = (self.__args, self.__args_len, self.__async_mode, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__args, self.__args_len, self.__async_mode, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -80788,12 +83578,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.__args, self.__args_len, self.__async_mode, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provider) + * state = (self.__args, self.__args_len, self.__async_mode, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -80805,9 +83595,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None # <<<<<<<<<<<<<< + * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_MethodCaller, (type(self), 0xe57552f, None), state + * return __pyx_unpickle_MethodCaller, (type(self), 0x3e02ba6, None), state */ /*else*/ { __pyx_t_5 = (__pyx_v_self->__pyx___args != ((PyObject*)Py_None)); @@ -80838,7 +83628,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re __pyx_t_6 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx___provider) != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx___provides != Py_None); __pyx_t_7 = (__pyx_t_5 != 0); __pyx_t_6 = __pyx_t_7; __pyx_L4_bool_binop_done:; @@ -80848,20 +83638,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re /* "(tree fragment)":12 * else: - * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_MethodCaller, (type(self), 0xe57552f, None), state + * return __pyx_unpickle_MethodCaller, (type(self), 0x3e02ba6, None), state * else: */ __pyx_t_6 = (__pyx_v_use_setstate != 0); if (__pyx_t_6) { /* "(tree fragment)":13 - * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: - * return __pyx_unpickle_MethodCaller, (type(self), 0xe57552f, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_MethodCaller, (type(self), 0x3e02ba6, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_MethodCaller, (type(self), 0xe57552f, state) + * return __pyx_unpickle_MethodCaller, (type(self), 0x3e02ba6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_MethodCaller); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) @@ -80871,9 +83661,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_240604463); - __Pyx_GIVEREF(__pyx_int_240604463); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_240604463); + __Pyx_INCREF(__pyx_int_65022886); + __Pyx_GIVEREF(__pyx_int_65022886); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_65022886); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None); @@ -80894,17 +83684,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re /* "(tree fragment)":12 * else: - * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provider is not None + * use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_MethodCaller, (type(self), 0xe57552f, None), state + * return __pyx_unpickle_MethodCaller, (type(self), 0x3e02ba6, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_MethodCaller, (type(self), 0xe57552f, None), state + * return __pyx_unpickle_MethodCaller, (type(self), 0x3e02ba6, None), state * else: - * return __pyx_unpickle_MethodCaller, (type(self), 0xe57552f, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_MethodCaller, (type(self), 0x3e02ba6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_MethodCaller__set_state(self, __pyx_state) */ @@ -80917,9 +83707,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_240604463); - __Pyx_GIVEREF(__pyx_int_240604463); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_240604463); + __Pyx_INCREF(__pyx_int_65022886); + __Pyx_GIVEREF(__pyx_int_65022886); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_65022886); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state); @@ -80960,25 +83750,25 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_16__re /* "(tree fragment)":16 * else: - * return __pyx_unpickle_MethodCaller, (type(self), 0xe57552f, state) + * return __pyx_unpickle_MethodCaller, (type(self), 0x3e02ba6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_MethodCaller__set_state(self, __pyx_state) */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_12MethodCaller_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_18__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_19dependency_injector_9providers_12MethodCaller_24__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_18__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_24__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_MethodCaller *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -80988,7 +83778,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_18__se __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_MethodCaller, (type(self), 0xe57552f, state) + * return __pyx_unpickle_MethodCaller, (type(self), 0x3e02ba6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_MethodCaller__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -80999,7 +83789,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12MethodCaller_18__se /* "(tree fragment)":16 * else: - * return __pyx_unpickle_MethodCaller, (type(self), 0xe57552f, state) + * return __pyx_unpickle_MethodCaller, (type(self), 0x3e02ba6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_MethodCaller__set_state(self, __pyx_state) */ @@ -81327,7 +84117,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Injection_2__setstat return __pyx_r; } -/* "dependency_injector/providers.pyx":4103 +/* "dependency_injector/providers.pyx":4253 * """Positional injection class.""" * * def __init__(self, value): # <<<<<<<<<<<<<< @@ -81368,7 +84158,7 @@ static int __pyx_pw_19dependency_injector_9providers_19PositionalInjection_1__in else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 4103, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 4253, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -81379,7 +84169,7 @@ static int __pyx_pw_19dependency_injector_9providers_19PositionalInjection_1__in } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4103, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4253, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.PositionalInjection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -81405,7 +84195,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":4105 + /* "dependency_injector/providers.pyx":4255 * def __init__(self, value): * """Initializer.""" * self.__value = value # <<<<<<<<<<<<<< @@ -81418,7 +84208,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___value); __pyx_v_self->__pyx_base.__pyx___value = __pyx_v_value; - /* "dependency_injector/providers.pyx":4106 + /* "dependency_injector/providers.pyx":4256 * """Initializer.""" * self.__value = value * self.__is_provider = is_provider(value) # <<<<<<<<<<<<<< @@ -81427,7 +84217,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini */ __pyx_v_self->__pyx_base.__pyx___is_provider = ((int)__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":4107 + /* "dependency_injector/providers.pyx":4257 * self.__value = value * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) # <<<<<<<<<<<<<< @@ -81436,7 +84226,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini */ __pyx_v_self->__pyx_base.__pyx___is_delegated = ((int)__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":4108 + /* "dependency_injector/providers.pyx":4258 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -81450,7 +84240,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":4109 + /* "dependency_injector/providers.pyx":4259 * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) # <<<<<<<<<<<<<< @@ -81461,7 +84251,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; - /* "dependency_injector/providers.pyx":4108 + /* "dependency_injector/providers.pyx":4258 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -81470,14 +84260,14 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini */ __pyx_v_self->__pyx_base.__pyx___call = ((int)__pyx_t_1); - /* "dependency_injector/providers.pyx":4110 + /* "dependency_injector/providers.pyx":4260 * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) * super(PositionalInjection, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4110, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection)); @@ -81485,10 +84275,10 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4110, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4110, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -81503,12 +84293,12 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4110, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":4103 + /* "dependency_injector/providers.pyx":4253 * """Positional injection class.""" * * def __init__(self, value): # <<<<<<<<<<<<<< @@ -81530,7 +84320,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini return __pyx_r; } -/* "dependency_injector/providers.pyx":4112 +/* "dependency_injector/providers.pyx":4262 * super(PositionalInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -81568,16 +84358,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":4114 + /* "dependency_injector/providers.pyx":4264 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4114, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4114, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -81592,13 +84382,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4114, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4115 + /* "dependency_injector/providers.pyx":4265 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -81609,7 +84399,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":4116 + /* "dependency_injector/providers.pyx":4266 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -81621,7 +84411,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4115 + /* "dependency_injector/providers.pyx":4265 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -81630,7 +84420,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection */ } - /* "dependency_injector/providers.pyx":4117 + /* "dependency_injector/providers.pyx":4267 * if copied is not None: * return copied * return self.__class__(deepcopy(self.__value, memo)) # <<<<<<<<<<<<<< @@ -81638,14 +84428,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection * def get_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4117, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_v_self->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4117, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4267, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4117, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -81661,14 +84451,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __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(1, 4117, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4112 + /* "dependency_injector/providers.pyx":4262 * super(PositionalInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -81691,7 +84481,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection return __pyx_r; } -/* "dependency_injector/providers.pyx":4119 +/* "dependency_injector/providers.pyx":4269 * return self.__class__(deepcopy(self.__value, memo)) * * def get_value(self): # <<<<<<<<<<<<<< @@ -81722,7 +84512,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value", 0); - /* "dependency_injector/providers.pyx":4121 + /* "dependency_injector/providers.pyx":4271 * def get_value(self): * """Return injection value.""" * return __get_value(self) # <<<<<<<<<<<<<< @@ -81730,13 +84520,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection * def get_original_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4121, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4119 + /* "dependency_injector/providers.pyx":4269 * return self.__class__(deepcopy(self.__value, memo)) * * def get_value(self): # <<<<<<<<<<<<<< @@ -81755,7 +84545,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection return __pyx_r; } -/* "dependency_injector/providers.pyx":4123 +/* "dependency_injector/providers.pyx":4273 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -81782,7 +84572,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_original_value", 0); - /* "dependency_injector/providers.pyx":4125 + /* "dependency_injector/providers.pyx":4275 * def get_original_value(self): * """Return original value.""" * return self.__value # <<<<<<<<<<<<<< @@ -81794,7 +84584,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_r = __pyx_v_self->__pyx_base.__pyx___value; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4123 + /* "dependency_injector/providers.pyx":4273 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -82119,7 +84909,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection return __pyx_r; } -/* "dependency_injector/providers.pyx":4131 +/* "dependency_injector/providers.pyx":4281 * """Keyword injection class.""" * * def __init__(self, name, value): # <<<<<<<<<<<<<< @@ -82165,11 +84955,11 @@ static int __pyx_pw_19dependency_injector_9providers_14NamedInjection_1__init__( case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 4131, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 4281, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 4131, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 4281, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -82182,7 +84972,7 @@ static int __pyx_pw_19dependency_injector_9providers_14NamedInjection_1__init__( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4131, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4281, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.NamedInjection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -82208,7 +84998,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":4133 + /* "dependency_injector/providers.pyx":4283 * def __init__(self, name, value): * """Initializer.""" * self.__name = name # <<<<<<<<<<<<<< @@ -82221,7 +85011,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __Pyx_DECREF(__pyx_v_self->__pyx___name); __pyx_v_self->__pyx___name = __pyx_v_name; - /* "dependency_injector/providers.pyx":4134 + /* "dependency_injector/providers.pyx":4284 * """Initializer.""" * self.__name = name * self.__value = value # <<<<<<<<<<<<<< @@ -82234,7 +85024,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___value); __pyx_v_self->__pyx_base.__pyx___value = __pyx_v_value; - /* "dependency_injector/providers.pyx":4135 + /* "dependency_injector/providers.pyx":4285 * self.__name = name * self.__value = value * self.__is_provider = is_provider(value) # <<<<<<<<<<<<<< @@ -82243,7 +85033,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s */ __pyx_v_self->__pyx_base.__pyx___is_provider = ((int)__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":4136 + /* "dependency_injector/providers.pyx":4286 * self.__value = value * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) # <<<<<<<<<<<<<< @@ -82252,7 +85042,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s */ __pyx_v_self->__pyx_base.__pyx___is_delegated = ((int)__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":4137 + /* "dependency_injector/providers.pyx":4287 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -82266,7 +85056,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":4138 + /* "dependency_injector/providers.pyx":4288 * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) # <<<<<<<<<<<<<< @@ -82277,7 +85067,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; - /* "dependency_injector/providers.pyx":4137 + /* "dependency_injector/providers.pyx":4287 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -82286,14 +85076,14 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s */ __pyx_v_self->__pyx_base.__pyx___call = ((int)__pyx_t_1); - /* "dependency_injector/providers.pyx":4139 + /* "dependency_injector/providers.pyx":4289 * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) * super(NamedInjection, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4139, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection)); @@ -82301,10 +85091,10 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4139, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4139, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -82319,12 +85109,12 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4139, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":4131 + /* "dependency_injector/providers.pyx":4281 * """Keyword injection class.""" * * def __init__(self, name, value): # <<<<<<<<<<<<<< @@ -82346,7 +85136,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s return __pyx_r; } -/* "dependency_injector/providers.pyx":4141 +/* "dependency_injector/providers.pyx":4291 * super(NamedInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -82387,16 +85177,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":4143 + /* "dependency_injector/providers.pyx":4293 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4143, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4143, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -82411,13 +85201,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4143, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4144 + /* "dependency_injector/providers.pyx":4294 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -82428,7 +85218,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":4145 + /* "dependency_injector/providers.pyx":4295 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -82440,7 +85230,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4144 + /* "dependency_injector/providers.pyx":4294 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -82449,7 +85239,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d */ } - /* "dependency_injector/providers.pyx":4146 + /* "dependency_injector/providers.pyx":4296 * if copied is not None: * return copied * return self.__class__(deepcopy(self.__name, memo), # <<<<<<<<<<<<<< @@ -82457,18 +85247,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4146, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_v_self->__pyx___name; __Pyx_INCREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4146, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4296, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4146, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":4147 + /* "dependency_injector/providers.pyx":4297 * return copied * return self.__class__(deepcopy(self.__name, memo), * deepcopy(self.__value, memo)) # <<<<<<<<<<<<<< @@ -82477,10 +85267,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d */ __pyx_t_3 = __pyx_v_self->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4147, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 4297, __pyx_L1_error) __pyx_t_7.__pyx_n = 1; __pyx_t_7.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4147, __pyx_L1_error) + __pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -82498,7 +85288,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_8}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4146, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4296, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -82508,7 +85298,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_8}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4146, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4296, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -82516,7 +85306,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 4146, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 4296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -82527,7 +85317,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_8); __pyx_t_4 = 0; __pyx_t_8 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4146, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -82536,7 +85326,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4141 + /* "dependency_injector/providers.pyx":4291 * super(NamedInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -82561,7 +85351,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d return __pyx_r; } -/* "dependency_injector/providers.pyx":4149 +/* "dependency_injector/providers.pyx":4299 * deepcopy(self.__value, memo)) * * def get_name(self): # <<<<<<<<<<<<<< @@ -82592,7 +85382,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_name", 0); - /* "dependency_injector/providers.pyx":4151 + /* "dependency_injector/providers.pyx":4301 * def get_name(self): * """Return injection value.""" * return __get_name(self) # <<<<<<<<<<<<<< @@ -82600,13 +85390,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get * def get_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4151, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4149 + /* "dependency_injector/providers.pyx":4299 * deepcopy(self.__value, memo)) * * def get_name(self): # <<<<<<<<<<<<<< @@ -82625,7 +85415,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get return __pyx_r; } -/* "dependency_injector/providers.pyx":4153 +/* "dependency_injector/providers.pyx":4303 * return __get_name(self) * * def get_value(self): # <<<<<<<<<<<<<< @@ -82656,7 +85446,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value", 0); - /* "dependency_injector/providers.pyx":4155 + /* "dependency_injector/providers.pyx":4305 * def get_value(self): * """Return injection value.""" * return __get_value(self) # <<<<<<<<<<<<<< @@ -82664,13 +85454,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get * def get_original_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4155, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4153 + /* "dependency_injector/providers.pyx":4303 * return __get_name(self) * * def get_value(self): # <<<<<<<<<<<<<< @@ -82689,7 +85479,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get return __pyx_r; } -/* "dependency_injector/providers.pyx":4157 +/* "dependency_injector/providers.pyx":4307 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -82716,7 +85506,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_8get __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_original_value", 0); - /* "dependency_injector/providers.pyx":4159 + /* "dependency_injector/providers.pyx":4309 * def get_original_value(self): * """Return original value.""" * return self.__value # <<<<<<<<<<<<<< @@ -82728,7 +85518,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_8get __pyx_r = __pyx_v_self->__pyx_base.__pyx___value; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4157 + /* "dependency_injector/providers.pyx":4307 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -83067,7 +85857,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_12__ return __pyx_r; } -/* "dependency_injector/providers.pyx":4164 +/* "dependency_injector/providers.pyx":4314 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_positional_injections(tuple args): # <<<<<<<<<<<<<< @@ -83095,19 +85885,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_positional_injections", 0); - /* "dependency_injector/providers.pyx":4166 + /* "dependency_injector/providers.pyx":4316 * cpdef tuple parse_positional_injections(tuple args): * """Parse positional injections.""" * cdef list injections = list() # <<<<<<<<<<<<<< * cdef int args_len = len(args) * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4166, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_injections = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4167 + /* "dependency_injector/providers.pyx":4317 * """Parse positional injections.""" * cdef list injections = list() * cdef int args_len = len(args) # <<<<<<<<<<<<<< @@ -83116,12 +85906,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec */ if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 4167, __pyx_L1_error) + __PYX_ERR(1, 4317, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 4167, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 4317, __pyx_L1_error) __pyx_v_args_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":4173 + /* "dependency_injector/providers.pyx":4323 * cdef PositionalInjection injection * * for index in range(args_len): # <<<<<<<<<<<<<< @@ -83133,7 +85923,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_index = __pyx_t_5; - /* "dependency_injector/providers.pyx":4174 + /* "dependency_injector/providers.pyx":4324 * * for index in range(args_len): * arg = args[index] # <<<<<<<<<<<<<< @@ -83142,36 +85932,36 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec */ if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 4174, __pyx_L1_error) + __PYX_ERR(1, 4324, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_args, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4175 + /* "dependency_injector/providers.pyx":4325 * for index in range(args_len): * arg = args[index] * injection = PositionalInjection(arg) # <<<<<<<<<<<<<< * injections.append(injection) * */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection), __pyx_v_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4175, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection), __pyx_v_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4176 + /* "dependency_injector/providers.pyx":4326 * arg = args[index] * injection = PositionalInjection(arg) * injections.append(injection) # <<<<<<<<<<<<<< * * return tuple(injections) */ - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 4176, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 4326, __pyx_L1_error) } - /* "dependency_injector/providers.pyx":4178 + /* "dependency_injector/providers.pyx":4328 * injections.append(injection) * * return tuple(injections) # <<<<<<<<<<<<<< @@ -83179,13 +85969,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4178, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4164 + /* "dependency_injector/providers.pyx":4314 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_positional_injections(tuple args): # <<<<<<<<<<<<<< @@ -83217,7 +86007,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7parse_positional_inj PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_positional_injections (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 4164, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 4314, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_6parse_positional_injections(__pyx_self, ((PyObject*)__pyx_v_args)); /* function exit code */ @@ -83238,7 +86028,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6parse_positional_inj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_positional_injections", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4164, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -83255,7 +86045,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6parse_positional_inj return __pyx_r; } -/* "dependency_injector/providers.pyx":4183 +/* "dependency_injector/providers.pyx":4333 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_named_injections(dict kwargs): # <<<<<<<<<<<<<< @@ -83285,19 +86075,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_named_injections", 0); - /* "dependency_injector/providers.pyx":4185 + /* "dependency_injector/providers.pyx":4335 * cpdef tuple parse_named_injections(dict kwargs): * """Parse named injections.""" * cdef list injections = list() # <<<<<<<<<<<<<< * * cdef object name */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4185, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_injections = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4191 + /* "dependency_injector/providers.pyx":4341 * cdef NamedInjection injection * * for name, arg in kwargs.items(): # <<<<<<<<<<<<<< @@ -83306,17 +86096,17 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections */ if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(1, 4191, __pyx_L1_error) + __PYX_ERR(1, 4341, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4191, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4341, __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, 4191, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4341, __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, 4191, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4341, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -83324,17 +86114,17 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 4191, __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, 4341, __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, 4191, __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, 4341, __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, 4191, __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, 4341, __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, 4191, __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, 4341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -83344,7 +86134,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 4191, __pyx_L1_error) + else __PYX_ERR(1, 4341, __pyx_L1_error) } break; } @@ -83356,7 +86146,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 4191, __pyx_L1_error) + __PYX_ERR(1, 4341, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -83369,15 +86159,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4191, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4191, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4341, __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, 4191, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 4341, __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; @@ -83385,7 +86175,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 4191, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 4341, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -83393,7 +86183,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 4191, __pyx_L1_error) + __PYX_ERR(1, 4341, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -83401,14 +86191,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":4192 + /* "dependency_injector/providers.pyx":4342 * * for name, arg in kwargs.items(): * injection = NamedInjection(name, arg) # <<<<<<<<<<<<<< * injections.append(injection) * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4192, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -83416,22 +86206,22 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_arg); - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4192, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_6)); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":4193 + /* "dependency_injector/providers.pyx":4343 * for name, arg in kwargs.items(): * injection = NamedInjection(name, arg) * injections.append(injection) # <<<<<<<<<<<<<< * * return tuple(injections) */ - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 4193, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 4343, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4191 + /* "dependency_injector/providers.pyx":4341 * cdef NamedInjection injection * * for name, arg in kwargs.items(): # <<<<<<<<<<<<<< @@ -83441,7 +86231,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":4195 + /* "dependency_injector/providers.pyx":4345 * injections.append(injection) * * return tuple(injections) # <<<<<<<<<<<<<< @@ -83449,13 +86239,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4195, __pyx_L1_error) + __pyx_t_2 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4183 + /* "dependency_injector/providers.pyx":4333 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_named_injections(dict kwargs): # <<<<<<<<<<<<<< @@ -83492,7 +86282,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9parse_named_injectio PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_named_injections (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 4183, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 4333, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_8parse_named_injections(__pyx_self, ((PyObject*)__pyx_v_kwargs)); /* function exit code */ @@ -83513,7 +86303,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8parse_named_injectio int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_named_injections", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4183, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -83530,7 +86320,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8parse_named_injectio return __pyx_r; } -/* "dependency_injector/providers.pyx":4212 +/* "dependency_injector/providers.pyx":4362 * """ * * def __init__(self, Provider overridden, Provider overriding): # <<<<<<<<<<<<<< @@ -83576,11 +86366,11 @@ static int __pyx_pw_19dependency_injector_9providers_17OverridingContext_1__init case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_overriding)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 4212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 4362, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 4212, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 4362, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -83593,14 +86383,14 @@ static int __pyx_pw_19dependency_injector_9providers_17OverridingContext_1__init } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4362, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.OverridingContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_overridden), __pyx_ptype_19dependency_injector_9providers_Provider, 1, "overridden", 0))) __PYX_ERR(1, 4212, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_overriding), __pyx_ptype_19dependency_injector_9providers_Provider, 1, "overriding", 0))) __PYX_ERR(1, 4212, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_overridden), __pyx_ptype_19dependency_injector_9providers_Provider, 1, "overridden", 0))) __PYX_ERR(1, 4362, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_overriding), __pyx_ptype_19dependency_injector_9providers_Provider, 1, "overriding", 0))) __PYX_ERR(1, 4362, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_17OverridingContext___init__(((struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)__pyx_v_self), __pyx_v_overridden, __pyx_v_overriding); /* function exit code */ @@ -83623,7 +86413,7 @@ static int __pyx_pf_19dependency_injector_9providers_17OverridingContext___init_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":4221 + /* "dependency_injector/providers.pyx":4371 * :type overriding: :py:class:`Provider` * """ * self.__overridden = overridden # <<<<<<<<<<<<<< @@ -83636,7 +86426,7 @@ static int __pyx_pf_19dependency_injector_9providers_17OverridingContext___init_ __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___overridden)); __pyx_v_self->__pyx___overridden = __pyx_v_overridden; - /* "dependency_injector/providers.pyx":4222 + /* "dependency_injector/providers.pyx":4372 * """ * self.__overridden = overridden * self.__overriding = overriding # <<<<<<<<<<<<<< @@ -83649,14 +86439,14 @@ static int __pyx_pf_19dependency_injector_9providers_17OverridingContext___init_ __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___overriding)); __pyx_v_self->__pyx___overriding = __pyx_v_overriding; - /* "dependency_injector/providers.pyx":4223 + /* "dependency_injector/providers.pyx":4373 * self.__overridden = overridden * self.__overriding = overriding * super(OverridingContext, self).__init__() # <<<<<<<<<<<<<< * * def __enter__(self): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4223, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_OverridingContext)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_OverridingContext)); @@ -83664,10 +86454,10 @@ static int __pyx_pf_19dependency_injector_9providers_17OverridingContext___init_ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4223, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4223, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -83682,12 +86472,12 @@ static int __pyx_pf_19dependency_injector_9providers_17OverridingContext___init_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4223, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4212 + /* "dependency_injector/providers.pyx":4362 * """ * * def __init__(self, Provider overridden, Provider overriding): # <<<<<<<<<<<<<< @@ -83709,7 +86499,7 @@ static int __pyx_pf_19dependency_injector_9providers_17OverridingContext___init_ return __pyx_r; } -/* "dependency_injector/providers.pyx":4225 +/* "dependency_injector/providers.pyx":4375 * super(OverridingContext, self).__init__() * * def __enter__(self): # <<<<<<<<<<<<<< @@ -83736,7 +86526,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_2 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "dependency_injector/providers.pyx":4227 + /* "dependency_injector/providers.pyx":4377 * def __enter__(self): * """Do nothing.""" * return self.__overriding # <<<<<<<<<<<<<< @@ -83748,7 +86538,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_2 __pyx_r = ((PyObject *)__pyx_v_self->__pyx___overriding); goto __pyx_L0; - /* "dependency_injector/providers.pyx":4225 + /* "dependency_injector/providers.pyx":4375 * super(OverridingContext, self).__init__() * * def __enter__(self): # <<<<<<<<<<<<<< @@ -83763,7 +86553,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_2 return __pyx_r; } -/* "dependency_injector/providers.pyx":4229 +/* "dependency_injector/providers.pyx":4379 * return self.__overriding * * def __exit__(self, *_): # <<<<<<<<<<<<<< @@ -83801,14 +86591,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "dependency_injector/providers.pyx":4231 + /* "dependency_injector/providers.pyx":4381 * def __exit__(self, *_): * """Exit overriding context.""" * self.__overridden.reset_last_overriding() # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___overridden), __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4231, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___overridden), __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -83822,12 +86612,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_4 } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4231, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4229 + /* "dependency_injector/providers.pyx":4379 * return self.__overriding * * def __exit__(self, *_): # <<<<<<<<<<<<<< @@ -84157,7 +86947,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_8 return __pyx_r; } -/* "dependency_injector/providers.pyx":4236 +/* "dependency_injector/providers.pyx":4386 * cdef class BaseSingletonResetContext(object): * * def __init__(self, Provider provider): # <<<<<<<<<<<<<< @@ -84194,7 +86984,7 @@ static int __pyx_pw_19dependency_injector_9providers_25BaseSingletonResetContext else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 4236, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 4386, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -84205,13 +86995,13 @@ static int __pyx_pw_19dependency_injector_9providers_25BaseSingletonResetContext } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4236, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4386, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.BaseSingletonResetContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_provider), __pyx_ptype_19dependency_injector_9providers_Provider, 1, "provider", 0))) __PYX_ERR(1, 4236, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_provider), __pyx_ptype_19dependency_injector_9providers_Provider, 1, "provider", 0))) __PYX_ERR(1, 4386, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_25BaseSingletonResetContext___init__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingletonResetContext *)__pyx_v_self), __pyx_v_provider); /* function exit code */ @@ -84234,7 +87024,7 @@ static int __pyx_pf_19dependency_injector_9providers_25BaseSingletonResetContext int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":4237 + /* "dependency_injector/providers.pyx":4387 * * def __init__(self, Provider provider): * self.__singleton = provider # <<<<<<<<<<<<<< @@ -84247,14 +87037,14 @@ static int __pyx_pf_19dependency_injector_9providers_25BaseSingletonResetContext __Pyx_DECREF(__pyx_v_self->__pyx___singleton); __pyx_v_self->__pyx___singleton = ((PyObject *)__pyx_v_provider); - /* "dependency_injector/providers.pyx":4238 + /* "dependency_injector/providers.pyx":4388 * def __init__(self, Provider provider): * self.__singleton = provider * super().__init__() # <<<<<<<<<<<<<< * * def __enter__(self): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4238, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext)); @@ -84262,10 +87052,10 @@ static int __pyx_pf_19dependency_injector_9providers_25BaseSingletonResetContext __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4238, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4238, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -84280,12 +87070,12 @@ static int __pyx_pf_19dependency_injector_9providers_25BaseSingletonResetContext } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4238, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4236 + /* "dependency_injector/providers.pyx":4386 * cdef class BaseSingletonResetContext(object): * * def __init__(self, Provider provider): # <<<<<<<<<<<<<< @@ -84307,7 +87097,7 @@ static int __pyx_pf_19dependency_injector_9providers_25BaseSingletonResetContext return __pyx_r; } -/* "dependency_injector/providers.pyx":4240 +/* "dependency_injector/providers.pyx":4390 * super().__init__() * * def __enter__(self): # <<<<<<<<<<<<<< @@ -84333,7 +87123,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_25BaseSingletonResetC __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); - /* "dependency_injector/providers.pyx":4241 + /* "dependency_injector/providers.pyx":4391 * * def __enter__(self): * return self.__singleton # <<<<<<<<<<<<<< @@ -84345,7 +87135,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_25BaseSingletonResetC __pyx_r = __pyx_v_self->__pyx___singleton; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4240 + /* "dependency_injector/providers.pyx":4390 * super().__init__() * * def __enter__(self): # <<<<<<<<<<<<<< @@ -84360,7 +87150,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_25BaseSingletonResetC return __pyx_r; } -/* "dependency_injector/providers.pyx":4243 +/* "dependency_injector/providers.pyx":4393 * return self.__singleton * * def __exit__(self, *_): # <<<<<<<<<<<<<< @@ -84395,20 +87185,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_25BaseSingletonResetC int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "dependency_injector/providers.pyx":4244 + /* "dependency_injector/providers.pyx":4394 * * def __exit__(self, *_): * raise NotImplementedError() # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4244, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 4244, __pyx_L1_error) + __PYX_ERR(1, 4394, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4243 + /* "dependency_injector/providers.pyx":4393 * return self.__singleton * * def __exit__(self, *_): # <<<<<<<<<<<<<< @@ -84719,7 +87509,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_25BaseSingletonResetC return __pyx_r; } -/* "dependency_injector/providers.pyx":4249 +/* "dependency_injector/providers.pyx":4399 * cdef class SingletonResetContext(BaseSingletonResetContext): * * def __exit__(self, *_): # <<<<<<<<<<<<<< @@ -84756,7 +87546,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21SingletonResetConte int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "dependency_injector/providers.pyx":4250 + /* "dependency_injector/providers.pyx":4400 * * def __exit__(self, *_): * return self.__singleton.reset() # <<<<<<<<<<<<<< @@ -84764,7 +87554,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21SingletonResetConte * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx___singleton, __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4250, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx___singleton, __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -84778,14 +87568,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21SingletonResetConte } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4250, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4249 + /* "dependency_injector/providers.pyx":4399 * cdef class SingletonResetContext(BaseSingletonResetContext): * * def __exit__(self, *_): # <<<<<<<<<<<<<< @@ -85099,7 +87889,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_21SingletonResetConte return __pyx_r; } -/* "dependency_injector/providers.pyx":4255 +/* "dependency_injector/providers.pyx":4405 * cdef class SingletonFullResetContext(BaseSingletonResetContext): * * def __exit__(self, *_): # <<<<<<<<<<<<<< @@ -85136,7 +87926,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_25SingletonFullResetC int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); - /* "dependency_injector/providers.pyx":4256 + /* "dependency_injector/providers.pyx":4406 * * def __exit__(self, *_): * return self.__singleton.full_reset() # <<<<<<<<<<<<<< @@ -85144,7 +87934,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_25SingletonFullResetC * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx___singleton, __pyx_n_s_full_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4256, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx___singleton, __pyx_n_s_full_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -85158,14 +87948,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_25SingletonFullResetC } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4256, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4255 + /* "dependency_injector/providers.pyx":4405 * cdef class SingletonFullResetContext(BaseSingletonResetContext): * * def __exit__(self, *_): # <<<<<<<<<<<<<< @@ -85479,7 +88269,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_25SingletonFullResetC return __pyx_r; } -/* "dependency_injector/providers.pyx":4262 +/* "dependency_injector/providers.pyx":4412 * * * cpdef bint is_provider(object instance): # <<<<<<<<<<<<<< @@ -85500,7 +88290,7 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_provider", 0); - /* "dependency_injector/providers.pyx":4270 + /* "dependency_injector/providers.pyx":4420 * :rtype: bool * """ * return (not isinstance(instance, CLASS_TYPES) and # <<<<<<<<<<<<<< @@ -85509,7 +88299,7 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ */ __pyx_t_2 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 4270, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 4420, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { @@ -85518,14 +88308,14 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":4271 + /* "dependency_injector/providers.pyx":4421 * """ * return (not isinstance(instance, CLASS_TYPES) and * getattr(instance, '__IS_PROVIDER__', False) is True) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_PROVIDER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4271, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_PROVIDER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 == Py_True); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -85535,7 +88325,7 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4262 + /* "dependency_injector/providers.pyx":4412 * * * cpdef bint is_provider(object instance): # <<<<<<<<<<<<<< @@ -85576,7 +88366,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10is_provider(CYTHON_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_provider", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4262, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -85593,7 +88383,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10is_provider(CYTHON_ return __pyx_r; } -/* "dependency_injector/providers.pyx":4274 +/* "dependency_injector/providers.pyx":4424 * * * cpdef object ensure_is_provider(object instance): # <<<<<<<<<<<<<< @@ -85617,7 +88407,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_is_provider", 0); - /* "dependency_injector/providers.pyx":4285 + /* "dependency_injector/providers.pyx":4435 * :rtype: :py:class:`dependency_injector.providers.Provider` * """ * if not is_provider(instance): # <<<<<<<<<<<<<< @@ -85627,26 +88417,26 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO __pyx_t_1 = ((!(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "dependency_injector/providers.pyx":4286 + /* "dependency_injector/providers.pyx":4436 * """ * if not is_provider(instance): * raise Error('Expected provider instance, ' # <<<<<<<<<<<<<< * 'got {0}'.format(str(instance))) * return instance */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4286, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":4287 + /* "dependency_injector/providers.pyx":4437 * if not is_provider(instance): * raise Error('Expected provider instance, ' * 'got {0}'.format(str(instance))) # <<<<<<<<<<<<<< * return instance * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Expected_provider_instance_got_0, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4287, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Expected_provider_instance_got_0, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_instance); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4287, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_instance); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -85661,7 +88451,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4287, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -85677,14 +88467,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4286, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(1, 4286, __pyx_L1_error) + __PYX_ERR(1, 4436, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4285 + /* "dependency_injector/providers.pyx":4435 * :rtype: :py:class:`dependency_injector.providers.Provider` * """ * if not is_provider(instance): # <<<<<<<<<<<<<< @@ -85693,7 +88483,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO */ } - /* "dependency_injector/providers.pyx":4288 + /* "dependency_injector/providers.pyx":4438 * raise Error('Expected provider instance, ' * 'got {0}'.format(str(instance))) * return instance # <<<<<<<<<<<<<< @@ -85705,7 +88495,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO __pyx_r = __pyx_v_instance; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4274 + /* "dependency_injector/providers.pyx":4424 * * * cpdef object ensure_is_provider(object instance): # <<<<<<<<<<<<<< @@ -85752,7 +88542,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12ensure_is_provider( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ensure_is_provider", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_ensure_is_provider(__pyx_v_instance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4274, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_ensure_is_provider(__pyx_v_instance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -85769,7 +88559,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12ensure_is_provider( return __pyx_r; } -/* "dependency_injector/providers.pyx":4291 +/* "dependency_injector/providers.pyx":4441 * * * cpdef bint is_delegated(object instance): # <<<<<<<<<<<<<< @@ -85790,7 +88580,7 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_delegated", 0); - /* "dependency_injector/providers.pyx":4299 + /* "dependency_injector/providers.pyx":4449 * :rtype: bool * """ * return (not isinstance(instance, CLASS_TYPES) and # <<<<<<<<<<<<<< @@ -85799,7 +88589,7 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx */ __pyx_t_2 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 4299, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 4449, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { @@ -85808,14 +88598,14 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":4300 + /* "dependency_injector/providers.pyx":4450 * """ * return (not isinstance(instance, CLASS_TYPES) and * getattr(instance, '__IS_DELEGATED__', False) is True) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_DELEGATED, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4300, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_DELEGATED, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 == Py_True); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -85825,7 +88615,7 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4291 + /* "dependency_injector/providers.pyx":4441 * * * cpdef bint is_delegated(object instance): # <<<<<<<<<<<<<< @@ -85866,7 +88656,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14is_delegated(CYTHON int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_delegated", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4291, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -85883,7 +88673,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14is_delegated(CYTHON return __pyx_r; } -/* "dependency_injector/providers.pyx":4303 +/* "dependency_injector/providers.pyx":4453 * * * cpdef str represent_provider(object provider, object provides): # <<<<<<<<<<<<<< @@ -85906,7 +88696,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("represent_provider", 0); - /* "dependency_injector/providers.pyx":4315 + /* "dependency_injector/providers.pyx":4465 * :rtype: str * """ * return '<{provider}({provides}) at {address}>'.format( # <<<<<<<<<<<<<< @@ -85914,45 +88704,45 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO * provider.__class__.__name__)), */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_provider_provides_at_address, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4315, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_provider_provides_at_address, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":4316 + /* "dependency_injector/providers.pyx":4466 * """ * return '<{provider}({provides}) at {address}>'.format( * provider='.'.join((provider.__class__.__module__, # <<<<<<<<<<<<<< * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4316, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4316, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4316, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":4317 + /* "dependency_injector/providers.pyx":4467 * return '<{provider}({provides}) at {address}>'.format( * provider='.'.join((provider.__class__.__module__, * provider.__class__.__name__)), # <<<<<<<<<<<<<< * provides=repr(provides) if provides is not None else '', * address=hex(id(provider))) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4317, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4317, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":4316 + /* "dependency_injector/providers.pyx":4466 * """ * return '<{provider}({provides}) at {address}>'.format( * provider='.'.join((provider.__class__.__module__, # <<<<<<<<<<<<<< * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4316, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); @@ -85960,13 +88750,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4316, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provider, __pyx_t_5) < 0) __PYX_ERR(1, 4316, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provider, __pyx_t_5) < 0) __PYX_ERR(1, 4466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":4318 + /* "dependency_injector/providers.pyx":4468 * provider='.'.join((provider.__class__.__module__, * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', # <<<<<<<<<<<<<< @@ -85975,49 +88765,49 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO */ __pyx_t_6 = (__pyx_v_provides != Py_None); if ((__pyx_t_6 != 0)) { - __pyx_t_3 = PyObject_Repr(__pyx_v_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4318, __pyx_L1_error) + __pyx_t_3 = PyObject_Repr(__pyx_v_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; } else { - __Pyx_INCREF(__pyx_kp_s__10); - __pyx_t_5 = __pyx_kp_s__10; + __Pyx_INCREF(__pyx_kp_s__9); + __pyx_t_5 = __pyx_kp_s__9; } - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provides, __pyx_t_5) < 0) __PYX_ERR(1, 4316, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provides, __pyx_t_5) < 0) __PYX_ERR(1, 4466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":4319 + /* "dependency_injector/providers.pyx":4469 * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', * address=hex(id(provider))) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_provider); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4319, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_provider); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4319, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_address, __pyx_t_3) < 0) __PYX_ERR(1, 4316, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_address, __pyx_t_3) < 0) __PYX_ERR(1, 4466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":4315 + /* "dependency_injector/providers.pyx":4465 * :rtype: str * """ * return '<{provider}({provides}) at {address}>'.format( # <<<<<<<<<<<<<< * provider='.'.join((provider.__class__.__module__, * provider.__class__.__name__)), */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4315, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 4315, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 4465, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4303 + /* "dependency_injector/providers.pyx":4453 * * * cpdef str represent_provider(object provider, object provides): # <<<<<<<<<<<<<< @@ -86075,11 +88865,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_17represent_provider( case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, 1); __PYX_ERR(1, 4303, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, 1); __PYX_ERR(1, 4453, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "represent_provider") < 0)) __PYX_ERR(1, 4303, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "represent_provider") < 0)) __PYX_ERR(1, 4453, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -86092,7 +88882,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_17represent_provider( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4303, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4453, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.represent_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -86114,7 +88904,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16represent_provider( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("represent_provider", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(__pyx_v_provider, __pyx_v_provides, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4303, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(__pyx_v_provider, __pyx_v_provides, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -86131,7 +88921,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16represent_provider( return __pyx_r; } -/* "dependency_injector/providers.pyx":4322 +/* "dependency_injector/providers.pyx":4472 * * * cpdef bint is_container_instance(object instance): # <<<<<<<<<<<<<< @@ -86152,7 +88942,7 @@ static int __pyx_f_19dependency_injector_9providers_is_container_instance(PyObje int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_container_instance", 0); - /* "dependency_injector/providers.pyx":4330 + /* "dependency_injector/providers.pyx":4480 * :rtype: bool * """ * return (not isinstance(instance, CLASS_TYPES) and # <<<<<<<<<<<<<< @@ -86161,7 +88951,7 @@ static int __pyx_f_19dependency_injector_9providers_is_container_instance(PyObje */ __pyx_t_2 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 4330, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 4480, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { @@ -86170,14 +88960,14 @@ static int __pyx_f_19dependency_injector_9providers_is_container_instance(PyObje goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":4331 + /* "dependency_injector/providers.pyx":4481 * """ * return (not isinstance(instance, CLASS_TYPES) and * getattr(instance, '__IS_CONTAINER__', False) is True) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_CONTAINER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4331, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_CONTAINER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 == Py_True); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -86187,7 +88977,7 @@ static int __pyx_f_19dependency_injector_9providers_is_container_instance(PyObje __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4322 + /* "dependency_injector/providers.pyx":4472 * * * cpdef bint is_container_instance(object instance): # <<<<<<<<<<<<<< @@ -86228,7 +89018,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_18is_container_instan int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_container_instance", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_container_instance(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_container_instance(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -86245,7 +89035,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_18is_container_instan return __pyx_r; } -/* "dependency_injector/providers.pyx":4334 +/* "dependency_injector/providers.pyx":4484 * * * cpdef bint is_container_class(object instance): # <<<<<<<<<<<<<< @@ -86266,7 +89056,7 @@ static int __pyx_f_19dependency_injector_9providers_is_container_class(PyObject int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_container_class", 0); - /* "dependency_injector/providers.pyx":4342 + /* "dependency_injector/providers.pyx":4492 * :rtype: bool * """ * return (isinstance(instance, CLASS_TYPES) and # <<<<<<<<<<<<<< @@ -86275,7 +89065,7 @@ static int __pyx_f_19dependency_injector_9providers_is_container_class(PyObject */ __pyx_t_2 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 4342, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 4492, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -86284,14 +89074,14 @@ static int __pyx_f_19dependency_injector_9providers_is_container_class(PyObject goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":4343 + /* "dependency_injector/providers.pyx":4493 * """ * return (isinstance(instance, CLASS_TYPES) and * getattr(instance, '__IS_CONTAINER__', False) is True) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_CONTAINER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4343, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_CONTAINER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 == Py_True); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -86301,7 +89091,7 @@ static int __pyx_f_19dependency_injector_9providers_is_container_class(PyObject __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4334 + /* "dependency_injector/providers.pyx":4484 * * * cpdef bint is_container_class(object instance): # <<<<<<<<<<<<<< @@ -86342,7 +89132,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20is_container_class( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_container_class", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_container_class(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4334, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_container_class(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -86359,7 +89149,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20is_container_class( return __pyx_r; } -/* "dependency_injector/providers.pyx":4346 +/* "dependency_injector/providers.pyx":4496 * * * cpdef object deepcopy(object instance, dict memo=None): # <<<<<<<<<<<<<< @@ -86390,7 +89180,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p } __Pyx_INCREF(__pyx_v_memo); - /* "dependency_injector/providers.pyx":4348 + /* "dependency_injector/providers.pyx":4498 * cpdef object deepcopy(object instance, dict memo=None): * """Return full copy of provider or container with providers.""" * if memo is None: # <<<<<<<<<<<<<< @@ -86401,19 +89191,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":4349 + /* "dependency_injector/providers.pyx":4499 * """Return full copy of provider or container with providers.""" * if memo is None: * memo = dict() # <<<<<<<<<<<<<< * * __add_sys_streams(memo) */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4349, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_memo, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":4348 + /* "dependency_injector/providers.pyx":4498 * cpdef object deepcopy(object instance, dict memo=None): * """Return full copy of provider or container with providers.""" * if memo is None: # <<<<<<<<<<<<<< @@ -86422,14 +89212,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p */ } - /* "dependency_injector/providers.pyx":4351 + /* "dependency_injector/providers.pyx":4501 * memo = dict() * * __add_sys_streams(memo) # <<<<<<<<<<<<<< * * return copy.deepcopy(instance, memo) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_add_sys_streams); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4351, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_add_sys_streams); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -86443,12 +89233,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_memo) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_memo); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4351, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":4353 + /* "dependency_injector/providers.pyx":4503 * __add_sys_streams(memo) * * return copy.deepcopy(instance, memo) # <<<<<<<<<<<<<< @@ -86456,9 +89246,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4353, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4353, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -86476,7 +89266,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_instance, __pyx_v_memo}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4353, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4503, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -86484,13 +89274,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_instance, __pyx_v_memo}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4353, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4503, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 4353, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 4503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -86501,7 +89291,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p __Pyx_INCREF(__pyx_v_memo); __Pyx_GIVEREF(__pyx_v_memo); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_memo); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4353, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -86510,7 +89300,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4346 + /* "dependency_injector/providers.pyx":4496 * * * cpdef object deepcopy(object instance, dict memo=None): # <<<<<<<<<<<<<< @@ -86573,7 +89363,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_23deepcopy(PyObject * } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deepcopy") < 0)) __PYX_ERR(1, 4346, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deepcopy") < 0)) __PYX_ERR(1, 4496, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -86589,13 +89379,13 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_23deepcopy(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("deepcopy", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("deepcopy", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4496, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.deepcopy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4346, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4496, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_22deepcopy(__pyx_self, __pyx_v_instance, __pyx_v_memo); /* function exit code */ @@ -86619,7 +89409,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_22deepcopy(CYTHON_UNU __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.memo = __pyx_v_memo; - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_instance, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4346, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_instance, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -86636,7 +89426,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_22deepcopy(CYTHON_UNU return __pyx_r; } -/* "dependency_injector/providers.pyx":4356 +/* "dependency_injector/providers.pyx":4506 * * * def __add_sys_streams(memo): # <<<<<<<<<<<<<< @@ -86670,79 +89460,79 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_24__add_sys_streams(C int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add_sys_streams", 0); - /* "dependency_injector/providers.pyx":4362 + /* "dependency_injector/providers.pyx":4512 * objects graph. * """ * memo[id(sys.stdin)] = sys.stdin # <<<<<<<<<<<<<< * memo[id(sys.stdout)] = sys.stdout * memo[id(sys.stderr)] = sys.stderr */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4362, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdin); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4362, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdin); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4362, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdin); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4362, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdin); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4362, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(1, 4362, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(1, 4512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":4363 + /* "dependency_injector/providers.pyx":4513 * """ * memo[id(sys.stdin)] = sys.stdin * memo[id(sys.stdout)] = sys.stdout # <<<<<<<<<<<<<< * memo[id(sys.stderr)] = sys.stderr * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4363, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4363, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4363, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4363, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4363, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(1, 4363, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(1, 4513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4364 + /* "dependency_injector/providers.pyx":4514 * memo[id(sys.stdin)] = sys.stdin * memo[id(sys.stdout)] = sys.stdout * memo[id(sys.stderr)] = sys.stderr # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4364, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4364, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4364, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4364, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4364, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(1, 4364, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(1, 4514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":4356 + /* "dependency_injector/providers.pyx":4506 * * * def __add_sys_streams(memo): # <<<<<<<<<<<<<< @@ -86765,7 +89555,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_24__add_sys_streams(C return __pyx_r; } -/* "dependency_injector/providers.pyx":4367 +/* "dependency_injector/providers.pyx":4517 * * * def merge_dicts(dict1, dict2): # <<<<<<<<<<<<<< @@ -86809,11 +89599,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_27merge_dicts(PyObjec case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dict2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("merge_dicts", 1, 2, 2, 1); __PYX_ERR(1, 4367, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("merge_dicts", 1, 2, 2, 1); __PYX_ERR(1, 4517, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_dicts") < 0)) __PYX_ERR(1, 4367, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_dicts") < 0)) __PYX_ERR(1, 4517, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -86826,7 +89616,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_27merge_dicts(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("merge_dicts", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4367, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("merge_dicts", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4517, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.merge_dicts", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -86863,14 +89653,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("merge_dicts", 0); - /* "dependency_injector/providers.pyx":4379 + /* "dependency_injector/providers.pyx":4529 * :rtype: dict * """ * for key, value in dict1.items(): # <<<<<<<<<<<<<< * if key in dict2: * if isinstance(value, dict) and isinstance(dict2[key], dict): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dict1, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4379, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dict1, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -86884,16 +89674,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4379, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4379, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4379, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4529, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -86901,17 +89691,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 4379, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 4529, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4379, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 4379, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 4529, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4379, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -86921,7 +89711,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 4379, __pyx_L1_error) + else __PYX_ERR(1, 4529, __pyx_L1_error) } break; } @@ -86933,7 +89723,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 4379, __pyx_L1_error) + __PYX_ERR(1, 4529, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -86946,15 +89736,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4379, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4379, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4529, __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, 4379, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 4529, __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; @@ -86962,7 +89752,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ __Pyx_GOTREF(__pyx_t_3); 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, 4379, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 4529, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -86970,7 +89760,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 4379, __pyx_L1_error) + __PYX_ERR(1, 4529, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3); @@ -86978,18 +89768,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":4380 + /* "dependency_injector/providers.pyx":4530 * """ * for key, value in dict1.items(): * if key in dict2: # <<<<<<<<<<<<<< * if isinstance(value, dict) and isinstance(dict2[key], dict): * dict2[key] = merge_dicts(value, dict2[key]) */ - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_dict2, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 4380, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_dict2, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 4530, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "dependency_injector/providers.pyx":4381 + /* "dependency_injector/providers.pyx":4531 * for key, value in dict1.items(): * if key in dict2: * if isinstance(value, dict) and isinstance(dict2[key], dict): # <<<<<<<<<<<<<< @@ -87003,7 +89793,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ __pyx_t_10 = __pyx_t_11; goto __pyx_L9_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_dict2, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4381, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_dict2, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyDict_Check(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -87012,16 +89802,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ __pyx_L9_bool_binop_done:; if (__pyx_t_10) { - /* "dependency_injector/providers.pyx":4382 + /* "dependency_injector/providers.pyx":4532 * if key in dict2: * if isinstance(value, dict) and isinstance(dict2[key], dict): * dict2[key] = merge_dicts(value, dict2[key]) # <<<<<<<<<<<<<< * result = dict1.copy() * result.update(dict2) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4382, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_merge_dicts); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_dict2, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4382, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_dict2, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_12 = 0; @@ -87038,7 +89828,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_value, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4382, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4532, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -87047,14 +89837,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_value, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4382, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4532, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 4382, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 4532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -87065,15 +89855,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4382, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_dict2, __pyx_v_key, __pyx_t_1) < 0)) __PYX_ERR(1, 4382, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_dict2, __pyx_v_key, __pyx_t_1) < 0)) __PYX_ERR(1, 4532, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4381 + /* "dependency_injector/providers.pyx":4531 * for key, value in dict1.items(): * if key in dict2: * if isinstance(value, dict) and isinstance(dict2[key], dict): # <<<<<<<<<<<<<< @@ -87082,7 +89872,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ */ } - /* "dependency_injector/providers.pyx":4380 + /* "dependency_injector/providers.pyx":4530 * """ * for key, value in dict1.items(): * if key in dict2: # <<<<<<<<<<<<<< @@ -87091,7 +89881,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ */ } - /* "dependency_injector/providers.pyx":4379 + /* "dependency_injector/providers.pyx":4529 * :rtype: dict * """ * for key, value in dict1.items(): # <<<<<<<<<<<<<< @@ -87101,14 +89891,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":4383 + /* "dependency_injector/providers.pyx":4533 * if isinstance(value, dict) and isinstance(dict2[key], dict): * dict2[key] = merge_dicts(value, dict2[key]) * result = dict1.copy() # <<<<<<<<<<<<<< * result.update(dict2) * return result */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dict1, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4383, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dict1, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -87122,20 +89912,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4383, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":4384 + /* "dependency_injector/providers.pyx":4534 * dict2[key] = merge_dicts(value, dict2[key]) * result = dict1.copy() * result.update(dict2) # <<<<<<<<<<<<<< * return result * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4384, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -87149,12 +89939,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_dict2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_dict2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4384, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":4385 + /* "dependency_injector/providers.pyx":4535 * result = dict1.copy() * result.update(dict2) * return result # <<<<<<<<<<<<<< @@ -87166,7 +89956,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "dependency_injector/providers.pyx":4367 + /* "dependency_injector/providers.pyx":4517 * * * def merge_dicts(dict1, dict2): # <<<<<<<<<<<<<< @@ -87194,7 +89984,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_26merge_dicts(CYTHON_ } static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/providers.pyx":4388 +/* "dependency_injector/providers.pyx":4538 * * * def traverse(*providers, types=None): # <<<<<<<<<<<<<< @@ -87243,7 +90033,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_29traverse(PyObject * if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "traverse") < 0)) __PYX_ERR(1, 4388, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "traverse") < 0)) __PYX_ERR(1, 4538, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 0) { goto __pyx_L5_argtuple_error; @@ -87253,7 +90043,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_29traverse(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("traverse", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4388, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("traverse", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4538, __pyx_L3_error) __pyx_L3_error:; __Pyx_CLEAR(__pyx_v_providers); __Pyx_AddTraceback("dependency_injector.providers.traverse", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -87280,7 +90070,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_28traverse(CYTHON_UNU if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_9providers___pyx_scope_struct_24_traverse *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(1, 4388, __pyx_L1_error) + __PYX_ERR(1, 4538, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -87291,7 +90081,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_28traverse(CYTHON_UNU __Pyx_INCREF(__pyx_cur_scope->__pyx_v_providers); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_providers); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_30generator20, __pyx_codeobj__33, (PyObject *) __pyx_cur_scope, __pyx_n_s_traverse, __pyx_n_s_traverse, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 4388, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_9providers_30generator20, __pyx_codeobj__32, (PyObject *) __pyx_cur_scope, __pyx_n_s_traverse, __pyx_n_s_traverse, __pyx_n_s_dependency_injector_providers); if (unlikely(!gen)) __PYX_ERR(1, 4538, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -87332,59 +90122,59 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4388, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4538, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4390 + /* "dependency_injector/providers.pyx":4540 * def traverse(*providers, types=None): * """Return providers traversal generator.""" * visited = set() # <<<<<<<<<<<<<< * to_visit = set(providers) * */ - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4390, __pyx_L1_error) + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_visited = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4391 + /* "dependency_injector/providers.pyx":4541 * """Return providers traversal generator.""" * visited = set() * to_visit = set(providers) # <<<<<<<<<<<<<< * * if types: */ - __pyx_t_1 = PySet_New(__pyx_cur_scope->__pyx_v_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4391, __pyx_L1_error) + __pyx_t_1 = PySet_New(__pyx_cur_scope->__pyx_v_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_to_visit = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4393 + /* "dependency_injector/providers.pyx":4543 * to_visit = set(providers) * * if types: # <<<<<<<<<<<<<< * types = tuple(types) * */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_types); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4393, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_types); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4543, __pyx_L1_error) if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":4394 + /* "dependency_injector/providers.pyx":4544 * * if types: * types = tuple(types) # <<<<<<<<<<<<<< * * while len(to_visit) > 0: */ - __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_cur_scope->__pyx_v_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4394, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_cur_scope->__pyx_v_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_types); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_types, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4393 + /* "dependency_injector/providers.pyx":4543 * to_visit = set(providers) * * if types: # <<<<<<<<<<<<<< @@ -87393,7 +90183,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C */ } - /* "dependency_injector/providers.pyx":4396 + /* "dependency_injector/providers.pyx":4546 * types = tuple(types) * * while len(to_visit) > 0: # <<<<<<<<<<<<<< @@ -87401,49 +90191,49 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C * visited.add(visiting) */ while (1) { - __pyx_t_3 = PySet_GET_SIZE(__pyx_cur_scope->__pyx_v_to_visit); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 4396, __pyx_L1_error) + __pyx_t_3 = PySet_GET_SIZE(__pyx_cur_scope->__pyx_v_to_visit); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 4546, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_3 > 0) != 0); if (!__pyx_t_2) break; - /* "dependency_injector/providers.pyx":4397 + /* "dependency_injector/providers.pyx":4547 * * while len(to_visit) > 0: * visiting = to_visit.pop() # <<<<<<<<<<<<<< * visited.add(visiting) * */ - __pyx_t_1 = PySet_Pop(__pyx_cur_scope->__pyx_v_to_visit); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4397, __pyx_L1_error) + __pyx_t_1 = PySet_Pop(__pyx_cur_scope->__pyx_v_to_visit); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_visiting); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_visiting, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4398 + /* "dependency_injector/providers.pyx":4548 * while len(to_visit) > 0: * visiting = to_visit.pop() * visited.add(visiting) # <<<<<<<<<<<<<< * * for child in visiting.related: */ - __pyx_t_4 = PySet_Add(__pyx_cur_scope->__pyx_v_visited, __pyx_cur_scope->__pyx_v_visiting); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 4398, __pyx_L1_error) + __pyx_t_4 = PySet_Add(__pyx_cur_scope->__pyx_v_visited, __pyx_cur_scope->__pyx_v_visiting); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 4548, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4400 + /* "dependency_injector/providers.pyx":4550 * visited.add(visiting) * * for child in visiting.related: # <<<<<<<<<<<<<< * if child in visited: * continue */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_visiting, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4400, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_visiting, __pyx_n_s_related); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4400, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4400, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4550, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -87451,17 +90241,17 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 4400, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 4550, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4400, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 4400, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 4550, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4400, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -87471,7 +90261,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 4400, __pyx_L1_error) + else __PYX_ERR(1, 4550, __pyx_L1_error) } break; } @@ -87482,18 +90272,18 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4401 + /* "dependency_injector/providers.pyx":4551 * * for child in visiting.related: * if child in visited: # <<<<<<<<<<<<<< * continue * to_visit.add(child) */ - __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_cur_scope->__pyx_v_child, __pyx_cur_scope->__pyx_v_visited, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4401, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_cur_scope->__pyx_v_child, __pyx_cur_scope->__pyx_v_visited, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4551, __pyx_L1_error) __pyx_t_7 = (__pyx_t_2 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":4402 + /* "dependency_injector/providers.pyx":4552 * for child in visiting.related: * if child in visited: * continue # <<<<<<<<<<<<<< @@ -87502,7 +90292,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C */ goto __pyx_L7_continue; - /* "dependency_injector/providers.pyx":4401 + /* "dependency_injector/providers.pyx":4551 * * for child in visiting.related: * if child in visited: # <<<<<<<<<<<<<< @@ -87511,16 +90301,16 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C */ } - /* "dependency_injector/providers.pyx":4403 + /* "dependency_injector/providers.pyx":4553 * if child in visited: * continue * to_visit.add(child) # <<<<<<<<<<<<<< * * if types and not isinstance(visiting, types): */ - __pyx_t_4 = PySet_Add(__pyx_cur_scope->__pyx_v_to_visit, __pyx_cur_scope->__pyx_v_child); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 4403, __pyx_L1_error) + __pyx_t_4 = PySet_Add(__pyx_cur_scope->__pyx_v_to_visit, __pyx_cur_scope->__pyx_v_child); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 4553, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4400 + /* "dependency_injector/providers.pyx":4550 * visited.add(visiting) * * for child in visiting.related: # <<<<<<<<<<<<<< @@ -87531,26 +90321,26 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":4405 + /* "dependency_injector/providers.pyx":4555 * to_visit.add(child) * * if types and not isinstance(visiting, types): # <<<<<<<<<<<<<< * continue * */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_types); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4405, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_types); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4555, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_7 = __pyx_t_2; goto __pyx_L11_bool_binop_done; } - __pyx_t_2 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_visiting, __pyx_cur_scope->__pyx_v_types); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 4405, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_visiting, __pyx_cur_scope->__pyx_v_types); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 4555, __pyx_L1_error) __pyx_t_8 = ((!(__pyx_t_2 != 0)) != 0); __pyx_t_7 = __pyx_t_8; __pyx_L11_bool_binop_done:; if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":4406 + /* "dependency_injector/providers.pyx":4556 * * if types and not isinstance(visiting, types): * continue # <<<<<<<<<<<<<< @@ -87559,7 +90349,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C */ goto __pyx_L5_continue; - /* "dependency_injector/providers.pyx":4405 + /* "dependency_injector/providers.pyx":4555 * to_visit.add(child) * * if types and not isinstance(visiting, types): # <<<<<<<<<<<<<< @@ -87568,7 +90358,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C */ } - /* "dependency_injector/providers.pyx":4408 + /* "dependency_injector/providers.pyx":4558 * continue * * yield visiting # <<<<<<<<<<<<<< @@ -87584,12 +90374,12 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L13_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4408, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 4558, __pyx_L1_error) __pyx_L5_continue:; } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/providers.pyx":4388 + /* "dependency_injector/providers.pyx":4538 * * * def traverse(*providers, types=None): # <<<<<<<<<<<<<< @@ -87615,7 +90405,7 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C return __pyx_r; } -/* "dependency_injector/providers.pyx":4411 +/* "dependency_injector/providers.pyx":4561 * * * def isawaitable(obj): # <<<<<<<<<<<<<< @@ -87653,7 +90443,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isawaitable", 0); - /* "dependency_injector/providers.pyx":4416 + /* "dependency_injector/providers.pyx":4566 * Return False for any object in Python 3.4 or below. * """ * try: # <<<<<<<<<<<<<< @@ -87669,7 +90459,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":4417 + /* "dependency_injector/providers.pyx":4567 * """ * try: * return inspect.isawaitable(obj) # <<<<<<<<<<<<<< @@ -87677,9 +90467,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_ * return False */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4417, __pyx_L3_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4567, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isawaitable); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4417, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isawaitable); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4567, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -87694,14 +90484,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_ } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4417, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4567, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; - /* "dependency_injector/providers.pyx":4416 + /* "dependency_injector/providers.pyx":4566 * Return False for any object in Python 3.4 or below. * """ * try: # <<<<<<<<<<<<<< @@ -87714,7 +90504,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":4418 + /* "dependency_injector/providers.pyx":4568 * try: * return inspect.isawaitable(obj) * except AttributeError: # <<<<<<<<<<<<<< @@ -87724,12 +90514,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.isawaitable", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4418, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4568, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); - /* "dependency_injector/providers.pyx":4419 + /* "dependency_injector/providers.pyx":4569 * return inspect.isawaitable(obj) * except AttributeError: * return False # <<<<<<<<<<<<<< @@ -87747,7 +90537,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_ goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":4416 + /* "dependency_injector/providers.pyx":4566 * Return False for any object in Python 3.4 or below. * """ * try: # <<<<<<<<<<<<<< @@ -87773,7 +90563,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_ goto __pyx_L0; } - /* "dependency_injector/providers.pyx":4411 + /* "dependency_injector/providers.pyx":4561 * * * def isawaitable(obj): # <<<<<<<<<<<<<< @@ -87794,7 +90584,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_ return __pyx_r; } -/* "dependency_injector/providers.pyx":4422 +/* "dependency_injector/providers.pyx":4572 * * * def iscoroutinefunction(obj): # <<<<<<<<<<<<<< @@ -87832,7 +90622,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction int __pyx_clineno = 0; __Pyx_RefNannySetupContext("iscoroutinefunction", 0); - /* "dependency_injector/providers.pyx":4427 + /* "dependency_injector/providers.pyx":4577 * Return False for any object in Python 3.4 or below. * """ * try: # <<<<<<<<<<<<<< @@ -87848,7 +90638,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":4428 + /* "dependency_injector/providers.pyx":4578 * """ * try: * return inspect.iscoroutinefunction(obj) # <<<<<<<<<<<<<< @@ -87856,9 +90646,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction * return False */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4428, __pyx_L3_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4578, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4428, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4578, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -87873,14 +90663,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4428, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4578, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; - /* "dependency_injector/providers.pyx":4427 + /* "dependency_injector/providers.pyx":4577 * Return False for any object in Python 3.4 or below. * """ * try: # <<<<<<<<<<<<<< @@ -87893,7 +90683,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":4429 + /* "dependency_injector/providers.pyx":4579 * try: * return inspect.iscoroutinefunction(obj) * except AttributeError: # <<<<<<<<<<<<<< @@ -87903,12 +90693,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.iscoroutinefunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4429, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4579, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); - /* "dependency_injector/providers.pyx":4430 + /* "dependency_injector/providers.pyx":4580 * return inspect.iscoroutinefunction(obj) * except AttributeError: * return False # <<<<<<<<<<<<<< @@ -87926,7 +90716,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":4427 + /* "dependency_injector/providers.pyx":4577 * Return False for any object in Python 3.4 or below. * """ * try: # <<<<<<<<<<<<<< @@ -87952,7 +90742,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction goto __pyx_L0; } - /* "dependency_injector/providers.pyx":4422 + /* "dependency_injector/providers.pyx":4572 * * * def iscoroutinefunction(obj): # <<<<<<<<<<<<<< @@ -87973,7 +90763,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction return __pyx_r; } -/* "dependency_injector/providers.pyx":4433 +/* "dependency_injector/providers.pyx":4583 * * * def isasyncgenfunction(obj): # <<<<<<<<<<<<<< @@ -88011,7 +90801,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isasyncgenfunction", 0); - /* "dependency_injector/providers.pyx":4438 + /* "dependency_injector/providers.pyx":4588 * Return False for any object in Python 3.4 or below. * """ * try: # <<<<<<<<<<<<<< @@ -88027,7 +90817,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction( __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pyx":4439 + /* "dependency_injector/providers.pyx":4589 * """ * try: * return inspect.isasyncgenfunction(obj) # <<<<<<<<<<<<<< @@ -88035,9 +90825,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction( * return False */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4439, __pyx_L3_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4589, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isasyncgenfunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4439, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isasyncgenfunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4589, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -88052,14 +90842,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction( } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4439, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4589, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; - /* "dependency_injector/providers.pyx":4438 + /* "dependency_injector/providers.pyx":4588 * Return False for any object in Python 3.4 or below. * """ * try: # <<<<<<<<<<<<<< @@ -88072,7 +90862,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction( __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":4440 + /* "dependency_injector/providers.pyx":4590 * try: * return inspect.isasyncgenfunction(obj) * except AttributeError: # <<<<<<<<<<<<<< @@ -88082,12 +90872,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction( __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.isasyncgenfunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4440, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4590, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); - /* "dependency_injector/providers.pyx":4441 + /* "dependency_injector/providers.pyx":4591 * return inspect.isasyncgenfunction(obj) * except AttributeError: * return False # <<<<<<<<<<<<<< @@ -88105,7 +90895,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction( goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pyx":4438 + /* "dependency_injector/providers.pyx":4588 * Return False for any object in Python 3.4 or below. * """ * try: # <<<<<<<<<<<<<< @@ -88131,7 +90921,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction( goto __pyx_L0; } - /* "dependency_injector/providers.pyx":4433 + /* "dependency_injector/providers.pyx":4583 * * * def isasyncgenfunction(obj): # <<<<<<<<<<<<<< @@ -88152,7 +90942,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction( return __pyx_r; } -/* "dependency_injector/providers.pyx":4444 +/* "dependency_injector/providers.pyx":4594 * * * cpdef _copy_parent(object from_, object to, dict memo): # <<<<<<<<<<<<<< @@ -88176,14 +90966,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_copy_parent", 0); - /* "dependency_injector/providers.pyx":4448 + /* "dependency_injector/providers.pyx":4598 * copied_parent = ( * deepcopy(from_.parent, memo) * if is_provider(from_.parent) or is_container_instance(from_.parent) # <<<<<<<<<<<<<< * else from_.parent * ) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4448, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (__pyx_f_19dependency_injector_9providers_is_provider(__pyx_t_3, 0) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -88192,7 +90982,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject __pyx_t_2 = __pyx_t_4; goto __pyx_L3_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4448, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (__pyx_f_19dependency_injector_9providers_is_container_instance(__pyx_t_3, 0) != 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -88200,32 +90990,32 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject __pyx_L3_bool_binop_done:; if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":4447 + /* "dependency_injector/providers.pyx":4597 * """Copy and assign provider parent.""" * copied_parent = ( * deepcopy(from_.parent, memo) # <<<<<<<<<<<<<< * if is_provider(from_.parent) or is_container_instance(from_.parent) * else from_.parent */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4447, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6.__pyx_n = 1; __pyx_t_6.memo = __pyx_v_memo; - __pyx_t_5 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4447, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; } else { - /* "dependency_injector/providers.pyx":4449 + /* "dependency_injector/providers.pyx":4599 * deepcopy(from_.parent, memo) * if is_provider(from_.parent) or is_container_instance(from_.parent) * else from_.parent # <<<<<<<<<<<<<< * ) * to.assign_parent(copied_parent) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4449, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; @@ -88233,12 +91023,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject __pyx_v_copied_parent = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4451 + /* "dependency_injector/providers.pyx":4601 * else from_.parent * ) * to.assign_parent(copied_parent) # <<<<<<<<<<<<<< + * + * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_to, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4451, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_to, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -88252,12 +91044,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_v_copied_parent) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_copied_parent); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4451, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":4444 + /* "dependency_injector/providers.pyx":4594 * * * cpdef _copy_parent(object from_, object to, dict memo): # <<<<<<<<<<<<<< @@ -88319,17 +91111,17 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_38_copy_parent(PyObje case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, 1); __PYX_ERR(1, 4444, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, 1); __PYX_ERR(1, 4594, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, 2); __PYX_ERR(1, 4444, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, 2); __PYX_ERR(1, 4594, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_parent") < 0)) __PYX_ERR(1, 4444, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_parent") < 0)) __PYX_ERR(1, 4594, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -88344,13 +91136,13 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_38_copy_parent(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4444, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4594, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers._copy_parent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4444, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4594, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_37_copy_parent(__pyx_self, __pyx_v_from_, __pyx_v_to, __pyx_v_memo); /* function exit code */ @@ -88371,7 +91163,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_37_copy_parent(CYTHON int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_copy_parent", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_parent(__pyx_v_from_, __pyx_v_to, __pyx_v_memo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4444, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_parent(__pyx_v_from_, __pyx_v_to, __pyx_v_memo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -88388,6 +91180,540 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_37_copy_parent(CYTHON return __pyx_r; } +/* "dependency_injector/providers.pyx":4604 + * + * + * cpdef object _memorized_duplicate(object instance, dict memo): # <<<<<<<<<<<<<< + * copied = instance.__class__() + * memo[id(instance)] = copied + */ + +static PyObject *__pyx_pw_19dependency_injector_9providers_40_memorized_duplicate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_19dependency_injector_9providers__memorized_duplicate(PyObject *__pyx_v_instance, PyObject *__pyx_v_memo, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v_copied = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_memorized_duplicate", 0); + + /* "dependency_injector/providers.pyx":4605 + * + * cpdef object _memorized_duplicate(object instance, dict memo): + * copied = instance.__class__() # <<<<<<<<<<<<<< + * memo[id(instance)] = copied + * return copied + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4605, __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_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_copied = __pyx_t_1; + __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4606 + * cpdef object _memorized_duplicate(object instance, dict memo): + * copied = instance.__class__() + * memo[id(instance)] = copied # <<<<<<<<<<<<<< + * return copied + * + */ + if (unlikely(__pyx_v_memo == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 4606, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyDict_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_copied) < 0)) __PYX_ERR(1, 4606, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":4607 + * copied = instance.__class__() + * memo[id(instance)] = copied + * return copied # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_copied); + __pyx_r = __pyx_v_copied; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4604 + * + * + * cpdef object _memorized_duplicate(object instance, dict memo): # <<<<<<<<<<<<<< + * copied = instance.__class__() + * memo[id(instance)] = copied + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("dependency_injector.providers._memorized_duplicate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_copied); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_40_memorized_duplicate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_40_memorized_duplicate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_instance = 0; + PyObject *__pyx_v_memo = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_memorized_duplicate (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_instance,&__pyx_n_s_memo,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("_memorized_duplicate", 1, 2, 2, 1); __PYX_ERR(1, 4604, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_memorized_duplicate") < 0)) __PYX_ERR(1, 4604, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_instance = values[0]; + __pyx_v_memo = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_memorized_duplicate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4604, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("dependency_injector.providers._memorized_duplicate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4604, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_39_memorized_duplicate(__pyx_self, __pyx_v_instance, __pyx_v_memo); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_39_memorized_duplicate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_memo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_memorized_duplicate", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(__pyx_v_instance, __pyx_v_memo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers._memorized_duplicate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":4610 + * + * + * cpdef object _copy_if_provider(object instance, dict memo): # <<<<<<<<<<<<<< + * if not is_provider(instance): + * return instance + */ + +static PyObject *__pyx_pw_19dependency_injector_9providers_42_copy_if_provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_19dependency_injector_9providers__copy_if_provider(PyObject *__pyx_v_instance, PyObject *__pyx_v_memo, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_copy_if_provider", 0); + + /* "dependency_injector/providers.pyx":4611 + * + * cpdef object _copy_if_provider(object instance, dict memo): + * if not is_provider(instance): # <<<<<<<<<<<<<< + * return instance + * return deepcopy(instance, memo) + */ + __pyx_t_1 = ((!(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0) != 0)) != 0); + if (__pyx_t_1) { + + /* "dependency_injector/providers.pyx":4612 + * cpdef object _copy_if_provider(object instance, dict memo): + * if not is_provider(instance): + * return instance # <<<<<<<<<<<<<< + * return deepcopy(instance, memo) + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_instance); + __pyx_r = __pyx_v_instance; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4611 + * + * cpdef object _copy_if_provider(object instance, dict memo): + * if not is_provider(instance): # <<<<<<<<<<<<<< + * return instance + * return deepcopy(instance, memo) + */ + } + + /* "dependency_injector/providers.pyx":4613 + * if not is_provider(instance): + * return instance + * return deepcopy(instance, memo) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3.__pyx_n = 1; + __pyx_t_3.memo = __pyx_v_memo; + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_instance, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4610 + * + * + * cpdef object _copy_if_provider(object instance, dict memo): # <<<<<<<<<<<<<< + * if not is_provider(instance): + * return instance + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("dependency_injector.providers._copy_if_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_42_copy_if_provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_42_copy_if_provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_instance = 0; + PyObject *__pyx_v_memo = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_copy_if_provider (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_instance,&__pyx_n_s_memo,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("_copy_if_provider", 1, 2, 2, 1); __PYX_ERR(1, 4610, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_if_provider") < 0)) __PYX_ERR(1, 4610, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_instance = values[0]; + __pyx_v_memo = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_copy_if_provider", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4610, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("dependency_injector.providers._copy_if_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4610, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_9providers_41_copy_if_provider(__pyx_self, __pyx_v_instance, __pyx_v_memo); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_41_copy_if_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_memo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_copy_if_provider", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_if_provider(__pyx_v_instance, __pyx_v_memo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers._copy_if_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":4616 + * + * + * cpdef str _class_qualname(object instance): # <<<<<<<<<<<<<< + * name = getattr(instance.__class__, '__qualname__', None) + * if not name: + */ + +static PyObject *__pyx_pw_19dependency_injector_9providers_44_class_qualname(PyObject *__pyx_self, PyObject *__pyx_v_instance); /*proto*/ +static PyObject *__pyx_f_19dependency_injector_9providers__class_qualname(PyObject *__pyx_v_instance, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_class_qualname", 0); + + /* "dependency_injector/providers.pyx":4617 + * + * cpdef str _class_qualname(object instance): + * name = getattr(instance.__class__, '__qualname__', None) # <<<<<<<<<<<<<< + * if not name: + * name = '.'.join((instance.__class__.__module__, instance.__class__.__name__)) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_s_qualname, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_name = __pyx_t_2; + __pyx_t_2 = 0; + + /* "dependency_injector/providers.pyx":4618 + * cpdef str _class_qualname(object instance): + * name = getattr(instance.__class__, '__qualname__', None) + * if not name: # <<<<<<<<<<<<<< + * name = '.'.join((instance.__class__.__module__, instance.__class__.__name__)) + * return name + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 4618, __pyx_L1_error) + __pyx_t_4 = ((!__pyx_t_3) != 0); + if (__pyx_t_4) { + + /* "dependency_injector/providers.pyx":4619 + * name = getattr(instance.__class__, '__qualname__', None) + * if not name: + * name = '.'.join((instance.__class__.__module__, instance.__class__.__name__)) # <<<<<<<<<<<<<< + * return name + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_module); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); + __pyx_t_1 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__6, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_5); + __pyx_t_5 = 0; + + /* "dependency_injector/providers.pyx":4618 + * cpdef str _class_qualname(object instance): + * name = getattr(instance.__class__, '__qualname__', None) + * if not name: # <<<<<<<<<<<<<< + * name = '.'.join((instance.__class__.__module__, instance.__class__.__name__)) + * return name + */ + } + + /* "dependency_injector/providers.pyx":4620 + * if not name: + * name = '.'.join((instance.__class__.__module__, instance.__class__.__name__)) + * return name # <<<<<<<<<<<<<< + */ + __Pyx_XDECREF(__pyx_r); + if (!(likely(PyString_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 4620, __pyx_L1_error) + __Pyx_INCREF(__pyx_v_name); + __pyx_r = ((PyObject*)__pyx_v_name); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":4616 + * + * + * cpdef str _class_qualname(object instance): # <<<<<<<<<<<<<< + * name = getattr(instance.__class__, '__qualname__', None) + * if not name: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("dependency_injector.providers._class_qualname", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_19dependency_injector_9providers_44_class_qualname(PyObject *__pyx_self, PyObject *__pyx_v_instance); /*proto*/ +static PyObject *__pyx_pw_19dependency_injector_9providers_44_class_qualname(PyObject *__pyx_self, PyObject *__pyx_v_instance) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_class_qualname (wrapper)", 0); + __pyx_r = __pyx_pf_19dependency_injector_9providers_43_class_qualname(__pyx_self, ((PyObject *)__pyx_v_instance)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_19dependency_injector_9providers_43_class_qualname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_class_qualname", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_19dependency_injector_9providers__class_qualname(__pyx_v_instance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers._class_qualname", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* "(tree fragment)":1 * def __pyx_unpickle_Provider(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError @@ -88395,9 +91721,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_37_copy_parent(CYTHON */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_41__pyx_unpickle_Provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_41__pyx_unpickle_Provider = {"__pyx_unpickle_Provider", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_41__pyx_unpickle_Provider, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_41__pyx_unpickle_Provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_47__pyx_unpickle_Provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_47__pyx_unpickle_Provider = {"__pyx_unpickle_Provider", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_47__pyx_unpickle_Provider, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_47__pyx_unpickle_Provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -88463,14 +91789,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_41__pyx_unpickle_Prov __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_40__pyx_unpickle_Provider(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_46__pyx_unpickle_Provider(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_40__pyx_unpickle_Provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_46__pyx_unpickle_Provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -88815,9 +92141,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Provide */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_43__pyx_unpickle_Object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_43__pyx_unpickle_Object = {"__pyx_unpickle_Object", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_43__pyx_unpickle_Object, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_43__pyx_unpickle_Object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_49__pyx_unpickle_Object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_49__pyx_unpickle_Object = {"__pyx_unpickle_Object", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_49__pyx_unpickle_Object, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_49__pyx_unpickle_Object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -88883,14 +92209,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_43__pyx_unpickle_Obje __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_42__pyx_unpickle_Object(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_48__pyx_unpickle_Object(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_42__pyx_unpickle_Object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_48__pyx_unpickle_Object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -89246,9 +92572,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Object_ */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_45__pyx_unpickle_Self(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_45__pyx_unpickle_Self = {"__pyx_unpickle_Self", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_45__pyx_unpickle_Self, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_45__pyx_unpickle_Self(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_51__pyx_unpickle_Self(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_51__pyx_unpickle_Self = {"__pyx_unpickle_Self", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_51__pyx_unpickle_Self, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_51__pyx_unpickle_Self(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -89314,14 +92640,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_45__pyx_unpickle_Self __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_44__pyx_unpickle_Self(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_50__pyx_unpickle_Self(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_44__pyx_unpickle_Self(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_50__pyx_unpickle_Self(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -89689,9 +93015,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Self__s */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_47__pyx_unpickle_Delegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_47__pyx_unpickle_Delegate = {"__pyx_unpickle_Delegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_47__pyx_unpickle_Delegate, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_47__pyx_unpickle_Delegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_53__pyx_unpickle_Delegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_53__pyx_unpickle_Delegate = {"__pyx_unpickle_Delegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_53__pyx_unpickle_Delegate, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_53__pyx_unpickle_Delegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -89757,14 +93083,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_47__pyx_unpickle_Dele __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_46__pyx_unpickle_Delegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_52__pyx_unpickle_Delegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_46__pyx_unpickle_Delegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_52__pyx_unpickle_Delegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -90120,9 +93446,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegat */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_49__pyx_unpickle_Dependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_49__pyx_unpickle_Dependency = {"__pyx_unpickle_Dependency", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_49__pyx_unpickle_Dependency, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_49__pyx_unpickle_Dependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_55__pyx_unpickle_Dependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_55__pyx_unpickle_Dependency = {"__pyx_unpickle_Dependency", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_55__pyx_unpickle_Dependency, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_55__pyx_unpickle_Dependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -90188,14 +93514,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_49__pyx_unpickle_Depe __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_48__pyx_unpickle_Dependency(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_54__pyx_unpickle_Dependency(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_48__pyx_unpickle_Dependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_54__pyx_unpickle_Dependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -90573,9 +93899,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Depende */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_51__pyx_unpickle_ExternalDependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_51__pyx_unpickle_ExternalDependency = {"__pyx_unpickle_ExternalDependency", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_51__pyx_unpickle_ExternalDependency, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_51__pyx_unpickle_ExternalDependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_57__pyx_unpickle_ExternalDependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_57__pyx_unpickle_ExternalDependency = {"__pyx_unpickle_ExternalDependency", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_57__pyx_unpickle_ExternalDependency, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_57__pyx_unpickle_ExternalDependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -90641,14 +93967,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_51__pyx_unpickle_Exte __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_50__pyx_unpickle_ExternalDependency(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_56__pyx_unpickle_ExternalDependency(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_50__pyx_unpickle_ExternalDependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_56__pyx_unpickle_ExternalDependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -91026,9 +94352,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Externa */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_53__pyx_unpickle_DependenciesContainer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_53__pyx_unpickle_DependenciesContainer = {"__pyx_unpickle_DependenciesContainer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_53__pyx_unpickle_DependenciesContainer, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_53__pyx_unpickle_DependenciesContainer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_59__pyx_unpickle_DependenciesContainer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_59__pyx_unpickle_DependenciesContainer = {"__pyx_unpickle_DependenciesContainer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_59__pyx_unpickle_DependenciesContainer, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_59__pyx_unpickle_DependenciesContainer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -91094,14 +94420,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_53__pyx_unpickle_Depe __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_52__pyx_unpickle_DependenciesContainer(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_58__pyx_unpickle_DependenciesContainer(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_52__pyx_unpickle_DependenciesContainer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_58__pyx_unpickle_DependenciesContainer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -91480,9 +94806,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Depende */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_55__pyx_unpickle_Callable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_55__pyx_unpickle_Callable = {"__pyx_unpickle_Callable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_55__pyx_unpickle_Callable, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_55__pyx_unpickle_Callable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_61__pyx_unpickle_Callable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_61__pyx_unpickle_Callable = {"__pyx_unpickle_Callable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_61__pyx_unpickle_Callable, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_61__pyx_unpickle_Callable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -91548,14 +94874,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_55__pyx_unpickle_Call __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_54__pyx_unpickle_Callable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_60__pyx_unpickle_Callable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_54__pyx_unpickle_Callable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_60__pyx_unpickle_Callable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -91953,9 +95279,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Callabl */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_57__pyx_unpickle_DelegatedCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_57__pyx_unpickle_DelegatedCallable = {"__pyx_unpickle_DelegatedCallable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_57__pyx_unpickle_DelegatedCallable, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_57__pyx_unpickle_DelegatedCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_63__pyx_unpickle_DelegatedCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_63__pyx_unpickle_DelegatedCallable = {"__pyx_unpickle_DelegatedCallable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_63__pyx_unpickle_DelegatedCallable, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_63__pyx_unpickle_DelegatedCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -92021,14 +95347,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_57__pyx_unpickle_Dele __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_56__pyx_unpickle_DelegatedCallable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_62__pyx_unpickle_DelegatedCallable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_56__pyx_unpickle_DelegatedCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_62__pyx_unpickle_DelegatedCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -92426,9 +95752,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegat */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_59__pyx_unpickle_AbstractCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_59__pyx_unpickle_AbstractCallable = {"__pyx_unpickle_AbstractCallable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_59__pyx_unpickle_AbstractCallable, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_59__pyx_unpickle_AbstractCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_65__pyx_unpickle_AbstractCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_65__pyx_unpickle_AbstractCallable = {"__pyx_unpickle_AbstractCallable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_65__pyx_unpickle_AbstractCallable, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_65__pyx_unpickle_AbstractCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -92494,14 +95820,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_59__pyx_unpickle_Abst __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_58__pyx_unpickle_AbstractCallable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_64__pyx_unpickle_AbstractCallable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_58__pyx_unpickle_AbstractCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_64__pyx_unpickle_AbstractCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -92899,9 +96225,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Abstrac */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_61__pyx_unpickle_CallableDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_61__pyx_unpickle_CallableDelegate = {"__pyx_unpickle_CallableDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_61__pyx_unpickle_CallableDelegate, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_61__pyx_unpickle_CallableDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_67__pyx_unpickle_CallableDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_67__pyx_unpickle_CallableDelegate = {"__pyx_unpickle_CallableDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_67__pyx_unpickle_CallableDelegate, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_67__pyx_unpickle_CallableDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -92967,14 +96293,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_61__pyx_unpickle_Call __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_60__pyx_unpickle_CallableDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_66__pyx_unpickle_CallableDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_60__pyx_unpickle_CallableDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_66__pyx_unpickle_CallableDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -93330,9 +96656,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Callabl */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_63__pyx_unpickle_Coroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_63__pyx_unpickle_Coroutine = {"__pyx_unpickle_Coroutine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_63__pyx_unpickle_Coroutine, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_63__pyx_unpickle_Coroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_69__pyx_unpickle_Coroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_69__pyx_unpickle_Coroutine = {"__pyx_unpickle_Coroutine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_69__pyx_unpickle_Coroutine, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_69__pyx_unpickle_Coroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -93398,14 +96724,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_63__pyx_unpickle_Coro __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_62__pyx_unpickle_Coroutine(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_68__pyx_unpickle_Coroutine(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_62__pyx_unpickle_Coroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_68__pyx_unpickle_Coroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -93803,9 +97129,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Corouti */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_65__pyx_unpickle_DelegatedCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_65__pyx_unpickle_DelegatedCoroutine = {"__pyx_unpickle_DelegatedCoroutine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_65__pyx_unpickle_DelegatedCoroutine, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_65__pyx_unpickle_DelegatedCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_71__pyx_unpickle_DelegatedCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_71__pyx_unpickle_DelegatedCoroutine = {"__pyx_unpickle_DelegatedCoroutine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_71__pyx_unpickle_DelegatedCoroutine, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_71__pyx_unpickle_DelegatedCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -93871,14 +97197,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_65__pyx_unpickle_Dele __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_64__pyx_unpickle_DelegatedCoroutine(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_70__pyx_unpickle_DelegatedCoroutine(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_64__pyx_unpickle_DelegatedCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_70__pyx_unpickle_DelegatedCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -94276,9 +97602,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegat */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_67__pyx_unpickle_AbstractCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_67__pyx_unpickle_AbstractCoroutine = {"__pyx_unpickle_AbstractCoroutine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_67__pyx_unpickle_AbstractCoroutine, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_67__pyx_unpickle_AbstractCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_73__pyx_unpickle_AbstractCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_73__pyx_unpickle_AbstractCoroutine = {"__pyx_unpickle_AbstractCoroutine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_73__pyx_unpickle_AbstractCoroutine, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_73__pyx_unpickle_AbstractCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -94344,14 +97670,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_67__pyx_unpickle_Abst __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_66__pyx_unpickle_AbstractCoroutine(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_72__pyx_unpickle_AbstractCoroutine(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_66__pyx_unpickle_AbstractCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_72__pyx_unpickle_AbstractCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -94749,9 +98075,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Abstrac */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_69__pyx_unpickle_CoroutineDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_69__pyx_unpickle_CoroutineDelegate = {"__pyx_unpickle_CoroutineDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_69__pyx_unpickle_CoroutineDelegate, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_69__pyx_unpickle_CoroutineDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_75__pyx_unpickle_CoroutineDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_75__pyx_unpickle_CoroutineDelegate = {"__pyx_unpickle_CoroutineDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_75__pyx_unpickle_CoroutineDelegate, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_75__pyx_unpickle_CoroutineDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -94817,14 +98143,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_69__pyx_unpickle_Coro __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_68__pyx_unpickle_CoroutineDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_74__pyx_unpickle_CoroutineDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_68__pyx_unpickle_CoroutineDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_74__pyx_unpickle_CoroutineDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -95180,9 +98506,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Corouti */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_71__pyx_unpickle_ConfigurationOption(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_71__pyx_unpickle_ConfigurationOption = {"__pyx_unpickle_ConfigurationOption", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_71__pyx_unpickle_ConfigurationOption, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_71__pyx_unpickle_ConfigurationOption(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_77__pyx_unpickle_ConfigurationOption(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_77__pyx_unpickle_ConfigurationOption = {"__pyx_unpickle_ConfigurationOption", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_77__pyx_unpickle_ConfigurationOption, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_77__pyx_unpickle_ConfigurationOption(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -95248,14 +98574,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_71__pyx_unpickle_Conf __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_70__pyx_unpickle_ConfigurationOption(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_76__pyx_unpickle_ConfigurationOption(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_70__pyx_unpickle_ConfigurationOption(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_76__pyx_unpickle_ConfigurationOption(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -95656,9 +98982,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Configu */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_73__pyx_unpickle_TypedConfigurationOption(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_73__pyx_unpickle_TypedConfigurationOption = {"__pyx_unpickle_TypedConfigurationOption", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_73__pyx_unpickle_TypedConfigurationOption, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_73__pyx_unpickle_TypedConfigurationOption(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_79__pyx_unpickle_TypedConfigurationOption(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_79__pyx_unpickle_TypedConfigurationOption = {"__pyx_unpickle_TypedConfigurationOption", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_79__pyx_unpickle_TypedConfigurationOption, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_79__pyx_unpickle_TypedConfigurationOption(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -95724,14 +99050,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_73__pyx_unpickle_Type __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_72__pyx_unpickle_TypedConfigurationOption(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_78__pyx_unpickle_TypedConfigurationOption(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_72__pyx_unpickle_TypedConfigurationOption(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_78__pyx_unpickle_TypedConfigurationOption(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -96129,9 +99455,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_TypedCo */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_75__pyx_unpickle_Configuration(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_75__pyx_unpickle_Configuration = {"__pyx_unpickle_Configuration", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_75__pyx_unpickle_Configuration, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_75__pyx_unpickle_Configuration(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_81__pyx_unpickle_Configuration(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_81__pyx_unpickle_Configuration = {"__pyx_unpickle_Configuration", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_81__pyx_unpickle_Configuration, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_81__pyx_unpickle_Configuration(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -96197,14 +99523,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_75__pyx_unpickle_Conf __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_74__pyx_unpickle_Configuration(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_80__pyx_unpickle_Configuration(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_74__pyx_unpickle_Configuration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_80__pyx_unpickle_Configuration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -96593,9 +99919,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Configu */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_77__pyx_unpickle_Factory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_77__pyx_unpickle_Factory = {"__pyx_unpickle_Factory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_77__pyx_unpickle_Factory, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_77__pyx_unpickle_Factory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_83__pyx_unpickle_Factory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_83__pyx_unpickle_Factory = {"__pyx_unpickle_Factory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_83__pyx_unpickle_Factory, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_83__pyx_unpickle_Factory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -96661,14 +99987,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_77__pyx_unpickle_Fact __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_76__pyx_unpickle_Factory(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_82__pyx_unpickle_Factory(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_76__pyx_unpickle_Factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_82__pyx_unpickle_Factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -97046,9 +100372,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Factory */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_79__pyx_unpickle_DelegatedFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_79__pyx_unpickle_DelegatedFactory = {"__pyx_unpickle_DelegatedFactory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_79__pyx_unpickle_DelegatedFactory, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_79__pyx_unpickle_DelegatedFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_85__pyx_unpickle_DelegatedFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_85__pyx_unpickle_DelegatedFactory = {"__pyx_unpickle_DelegatedFactory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_85__pyx_unpickle_DelegatedFactory, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_85__pyx_unpickle_DelegatedFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -97114,14 +100440,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_79__pyx_unpickle_Dele __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_78__pyx_unpickle_DelegatedFactory(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_84__pyx_unpickle_DelegatedFactory(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_78__pyx_unpickle_DelegatedFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_84__pyx_unpickle_DelegatedFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -97499,9 +100825,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegat */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_81__pyx_unpickle_AbstractFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_81__pyx_unpickle_AbstractFactory = {"__pyx_unpickle_AbstractFactory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_81__pyx_unpickle_AbstractFactory, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_81__pyx_unpickle_AbstractFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_87__pyx_unpickle_AbstractFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_87__pyx_unpickle_AbstractFactory = {"__pyx_unpickle_AbstractFactory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_87__pyx_unpickle_AbstractFactory, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_87__pyx_unpickle_AbstractFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -97567,14 +100893,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_81__pyx_unpickle_Abst __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_80__pyx_unpickle_AbstractFactory(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_86__pyx_unpickle_AbstractFactory(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_80__pyx_unpickle_AbstractFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_86__pyx_unpickle_AbstractFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -97952,9 +101278,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Abstrac */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_83__pyx_unpickle_FactoryDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_83__pyx_unpickle_FactoryDelegate = {"__pyx_unpickle_FactoryDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_83__pyx_unpickle_FactoryDelegate, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_83__pyx_unpickle_FactoryDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_89__pyx_unpickle_FactoryDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_89__pyx_unpickle_FactoryDelegate = {"__pyx_unpickle_FactoryDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_89__pyx_unpickle_FactoryDelegate, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_89__pyx_unpickle_FactoryDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -98020,14 +101346,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_83__pyx_unpickle_Fact __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_82__pyx_unpickle_FactoryDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_88__pyx_unpickle_FactoryDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_82__pyx_unpickle_FactoryDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_88__pyx_unpickle_FactoryDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -98383,9 +101709,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Factory */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_85__pyx_unpickle_FactoryAggregate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_85__pyx_unpickle_FactoryAggregate = {"__pyx_unpickle_FactoryAggregate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_85__pyx_unpickle_FactoryAggregate, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_85__pyx_unpickle_FactoryAggregate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_91__pyx_unpickle_FactoryAggregate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_91__pyx_unpickle_FactoryAggregate = {"__pyx_unpickle_FactoryAggregate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_91__pyx_unpickle_FactoryAggregate, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_91__pyx_unpickle_FactoryAggregate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -98451,14 +101777,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_85__pyx_unpickle_Fact __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_84__pyx_unpickle_FactoryAggregate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_90__pyx_unpickle_FactoryAggregate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_84__pyx_unpickle_FactoryAggregate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_90__pyx_unpickle_FactoryAggregate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -98815,9 +102141,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Factory */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_87__pyx_unpickle_BaseSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_87__pyx_unpickle_BaseSingleton = {"__pyx_unpickle_BaseSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_87__pyx_unpickle_BaseSingleton, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_87__pyx_unpickle_BaseSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_93__pyx_unpickle_BaseSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_93__pyx_unpickle_BaseSingleton = {"__pyx_unpickle_BaseSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_93__pyx_unpickle_BaseSingleton, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_93__pyx_unpickle_BaseSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -98883,14 +102209,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_87__pyx_unpickle_Base __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_86__pyx_unpickle_BaseSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_92__pyx_unpickle_BaseSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_86__pyx_unpickle_BaseSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_92__pyx_unpickle_BaseSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -99258,9 +102584,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_BaseSin */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_89__pyx_unpickle_Singleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_89__pyx_unpickle_Singleton = {"__pyx_unpickle_Singleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_89__pyx_unpickle_Singleton, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_89__pyx_unpickle_Singleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_95__pyx_unpickle_Singleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_95__pyx_unpickle_Singleton = {"__pyx_unpickle_Singleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_95__pyx_unpickle_Singleton, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_95__pyx_unpickle_Singleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -99326,14 +102652,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_89__pyx_unpickle_Sing __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_88__pyx_unpickle_Singleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_94__pyx_unpickle_Singleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_88__pyx_unpickle_Singleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_94__pyx_unpickle_Singleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -99701,9 +103027,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Singlet */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_91__pyx_unpickle_DelegatedSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_91__pyx_unpickle_DelegatedSingleton = {"__pyx_unpickle_DelegatedSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_91__pyx_unpickle_DelegatedSingleton, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_91__pyx_unpickle_DelegatedSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_97__pyx_unpickle_DelegatedSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_97__pyx_unpickle_DelegatedSingleton = {"__pyx_unpickle_DelegatedSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_97__pyx_unpickle_DelegatedSingleton, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_97__pyx_unpickle_DelegatedSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -99769,14 +103095,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_91__pyx_unpickle_Dele __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_90__pyx_unpickle_DelegatedSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_96__pyx_unpickle_DelegatedSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_90__pyx_unpickle_DelegatedSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_96__pyx_unpickle_DelegatedSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -100144,9 +103470,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegat */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_93__pyx_unpickle_ThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_93__pyx_unpickle_ThreadSafeSingleton = {"__pyx_unpickle_ThreadSafeSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_93__pyx_unpickle_ThreadSafeSingleton, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_93__pyx_unpickle_ThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_99__pyx_unpickle_ThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_99__pyx_unpickle_ThreadSafeSingleton = {"__pyx_unpickle_ThreadSafeSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_99__pyx_unpickle_ThreadSafeSingleton, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_99__pyx_unpickle_ThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -100212,14 +103538,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_93__pyx_unpickle_Thre __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_92__pyx_unpickle_ThreadSafeSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_98__pyx_unpickle_ThreadSafeSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_92__pyx_unpickle_ThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_98__pyx_unpickle_ThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -100598,9 +103924,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ThreadS */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_95__pyx_unpickle_DelegatedThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_95__pyx_unpickle_DelegatedThreadSafeSingleton = {"__pyx_unpickle_DelegatedThreadSafeSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_95__pyx_unpickle_DelegatedThreadSafeSingleton, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_95__pyx_unpickle_DelegatedThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_101__pyx_unpickle_DelegatedThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_101__pyx_unpickle_DelegatedThreadSafeSingleton = {"__pyx_unpickle_DelegatedThreadSafeSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_101__pyx_unpickle_DelegatedThreadSafeSingleton, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_101__pyx_unpickle_DelegatedThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -100666,14 +103992,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_95__pyx_unpickle_Dele __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_94__pyx_unpickle_DelegatedThreadSafeSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_100__pyx_unpickle_DelegatedThreadSafeSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_94__pyx_unpickle_DelegatedThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_100__pyx_unpickle_DelegatedThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -101052,9 +104378,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegat */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_97__pyx_unpickle_ThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_97__pyx_unpickle_ThreadLocalSingleton = {"__pyx_unpickle_ThreadLocalSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_97__pyx_unpickle_ThreadLocalSingleton, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_97__pyx_unpickle_ThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_103__pyx_unpickle_ThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_103__pyx_unpickle_ThreadLocalSingleton = {"__pyx_unpickle_ThreadLocalSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_103__pyx_unpickle_ThreadLocalSingleton, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_103__pyx_unpickle_ThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -101120,14 +104446,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_97__pyx_unpickle_Thre __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_96__pyx_unpickle_ThreadLocalSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_102__pyx_unpickle_ThreadLocalSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_96__pyx_unpickle_ThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_102__pyx_unpickle_ThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -101495,9 +104821,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ThreadL */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_99__pyx_unpickle_DelegatedThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_99__pyx_unpickle_DelegatedThreadLocalSingleton = {"__pyx_unpickle_DelegatedThreadLocalSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_99__pyx_unpickle_DelegatedThreadLocalSingleton, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_99__pyx_unpickle_DelegatedThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_105__pyx_unpickle_DelegatedThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_105__pyx_unpickle_DelegatedThreadLocalSingleton = {"__pyx_unpickle_DelegatedThreadLocalSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_105__pyx_unpickle_DelegatedThreadLocalSingleton, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_105__pyx_unpickle_DelegatedThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -101563,14 +104889,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_99__pyx_unpickle_Dele __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_98__pyx_unpickle_DelegatedThreadLocalSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_104__pyx_unpickle_DelegatedThreadLocalSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_98__pyx_unpickle_DelegatedThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_104__pyx_unpickle_DelegatedThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -101938,9 +105264,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegat */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_101__pyx_unpickle_AbstractSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_101__pyx_unpickle_AbstractSingleton = {"__pyx_unpickle_AbstractSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_101__pyx_unpickle_AbstractSingleton, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_101__pyx_unpickle_AbstractSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_107__pyx_unpickle_AbstractSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_107__pyx_unpickle_AbstractSingleton = {"__pyx_unpickle_AbstractSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_107__pyx_unpickle_AbstractSingleton, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_107__pyx_unpickle_AbstractSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -102006,14 +105332,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_101__pyx_unpickle_Abs __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_100__pyx_unpickle_AbstractSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_106__pyx_unpickle_AbstractSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_100__pyx_unpickle_AbstractSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_106__pyx_unpickle_AbstractSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -102381,9 +105707,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Abstrac */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_103__pyx_unpickle_SingletonDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_103__pyx_unpickle_SingletonDelegate = {"__pyx_unpickle_SingletonDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_103__pyx_unpickle_SingletonDelegate, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_103__pyx_unpickle_SingletonDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_109__pyx_unpickle_SingletonDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_109__pyx_unpickle_SingletonDelegate = {"__pyx_unpickle_SingletonDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_109__pyx_unpickle_SingletonDelegate, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_109__pyx_unpickle_SingletonDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -102449,14 +105775,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_103__pyx_unpickle_Sin __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_102__pyx_unpickle_SingletonDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_SingletonDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_102__pyx_unpickle_SingletonDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_SingletonDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -102812,9 +106138,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Singlet */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_105__pyx_unpickle_List(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_105__pyx_unpickle_List = {"__pyx_unpickle_List", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_105__pyx_unpickle_List, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_105__pyx_unpickle_List(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_111__pyx_unpickle_List(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_111__pyx_unpickle_List = {"__pyx_unpickle_List", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_111__pyx_unpickle_List, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_111__pyx_unpickle_List(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -102880,14 +106206,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_105__pyx_unpickle_Lis __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_104__pyx_unpickle_List(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_110__pyx_unpickle_List(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_104__pyx_unpickle_List(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_110__pyx_unpickle_List(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -103253,9 +106579,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_List__s */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_107__pyx_unpickle_Dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_107__pyx_unpickle_Dict = {"__pyx_unpickle_Dict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_107__pyx_unpickle_Dict, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_107__pyx_unpickle_Dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_113__pyx_unpickle_Dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_113__pyx_unpickle_Dict = {"__pyx_unpickle_Dict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_113__pyx_unpickle_Dict, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_113__pyx_unpickle_Dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -103321,14 +106647,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_107__pyx_unpickle_Dic __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_106__pyx_unpickle_Dict(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_112__pyx_unpickle_Dict(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_106__pyx_unpickle_Dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_112__pyx_unpickle_Dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -103694,9 +107020,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Dict__s */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_109__pyx_unpickle_Resource(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_109__pyx_unpickle_Resource = {"__pyx_unpickle_Resource", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_109__pyx_unpickle_Resource, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_109__pyx_unpickle_Resource(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_115__pyx_unpickle_Resource(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_115__pyx_unpickle_Resource = {"__pyx_unpickle_Resource", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_115__pyx_unpickle_Resource, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_115__pyx_unpickle_Resource(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -103762,14 +107088,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_109__pyx_unpickle_Res __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_Resource(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_Resource(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_Resource(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_Resource(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -103788,18 +107114,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_Res /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x734cfcb: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x62e918c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x734cfcb = (__args, __args_len, __async_mode, __initialized, __initializer, __kwargs, __kwargs_len, __last_overriding, __overridden, __resource, __shutdowner))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x62e918c = (__args, __args_len, __async_mode, __initialized, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides, __resource, __shutdowner))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x734cfcb) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x62e918c) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x734cfcb: + * if __pyx_checksum != 0x62e918c: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x734cfcb = (__args, __args_len, __async_mode, __initialized, __initializer, __kwargs, __kwargs_len, __last_overriding, __overridden, __resource, __shutdowner))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x62e918c = (__args, __args_len, __async_mode, __initialized, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides, __resource, __shutdowner))" % __pyx_checksum) * __pyx_result = Resource.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) @@ -103818,15 +107144,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_Res __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x734cfcb: + * if __pyx_checksum != 0x62e918c: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x734cfcb = (__args, __args_len, __async_mode, __initialized, __initializer, __kwargs, __kwargs_len, __last_overriding, __overridden, __resource, __shutdowner))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x62e918c = (__args, __args_len, __async_mode, __initialized, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides, __resource, __shutdowner))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Resource.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x73, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x62, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -103853,15 +107179,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_Res /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x734cfcb: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x62e918c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x734cfcb = (__args, __args_len, __async_mode, __initialized, __initializer, __kwargs, __kwargs_len, __last_overriding, __overridden, __resource, __shutdowner))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x62e918c = (__args, __args_len, __async_mode, __initialized, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides, __resource, __shutdowner))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x734cfcb = (__args, __args_len, __async_mode, __initialized, __initializer, __kwargs, __kwargs_len, __last_overriding, __overridden, __resource, __shutdowner))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x62e918c = (__args, __args_len, __async_mode, __initialized, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides, __resource, __shutdowner))" % __pyx_checksum) * __pyx_result = Resource.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Resource__set_state( __pyx_result, __pyx_state) @@ -103887,7 +107213,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_Res __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x734cfcb = (__args, __args_len, __async_mode, __initialized, __initializer, __kwargs, __kwargs_len, __last_overriding, __overridden, __resource, __shutdowner))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x62e918c = (__args, __args_len, __async_mode, __initialized, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides, __resource, __shutdowner))" % __pyx_checksum) * __pyx_result = Resource.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Resource__set_state( __pyx_result, __pyx_state) @@ -103910,7 +107236,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_Res __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x734cfcb = (__args, __args_len, __async_mode, __initialized, __initializer, __kwargs, __kwargs_len, __last_overriding, __overridden, __resource, __shutdowner))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x62e918c = (__args, __args_len, __async_mode, __initialized, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides, __resource, __shutdowner))" % __pyx_checksum) * __pyx_result = Resource.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Resource__set_state( __pyx_result, __pyx_state) @@ -103923,7 +107249,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_Res * __pyx_unpickle_Resource__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Resource__set_state(Resource __pyx_result, tuple __pyx_state): - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__initializer = __pyx_state[4]; __pyx_result.__kwargs = __pyx_state[5]; __pyx_result.__kwargs_len = __pyx_state[6]; __pyx_result.__last_overriding = __pyx_state[7]; __pyx_result.__overridden = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__kwargs = __pyx_state[4]; __pyx_result.__kwargs_len = __pyx_state[5]; __pyx_result.__last_overriding = __pyx_state[6]; __pyx_result.__overridden = __pyx_state[7]; __pyx_result.__provides = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -103956,7 +107282,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_108__pyx_unpickle_Res * __pyx_unpickle_Resource__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Resource__set_state(Resource __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__initializer = __pyx_state[4]; __pyx_result.__kwargs = __pyx_state[5]; __pyx_result.__kwargs_len = __pyx_state[6]; __pyx_result.__last_overriding = __pyx_state[7]; __pyx_result.__overridden = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__kwargs = __pyx_state[4]; __pyx_result.__kwargs_len = __pyx_state[5]; __pyx_result.__last_overriding = __pyx_state[6]; __pyx_result.__overridden = __pyx_state[7]; __pyx_result.__provides = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): */ @@ -103980,7 +107306,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Resource__set_state(Resource __pyx_result, tuple __pyx_state): - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__initializer = __pyx_state[4]; __pyx_result.__kwargs = __pyx_state[5]; __pyx_result.__kwargs_len = __pyx_state[6]; __pyx_result.__last_overriding = __pyx_state[7]; __pyx_result.__overridden = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] # <<<<<<<<<<<<<< + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__kwargs = __pyx_state[4]; __pyx_result.__kwargs_len = __pyx_state[5]; __pyx_result.__last_overriding = __pyx_state[6]; __pyx_result.__overridden = __pyx_state[7]; __pyx_result.__provides = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] # <<<<<<<<<<<<<< * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[11]) */ @@ -104029,17 +107355,6 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___initializer); - __Pyx_DECREF(__pyx_v___pyx_result->__pyx___initializer); - __pyx_v___pyx_result->__pyx___initializer = __pyx_t_1; - __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___kwargs); @@ -104050,7 +107365,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -104059,7 +107374,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); @@ -104071,7 +107386,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); @@ -104083,6 +107398,17 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 12, __pyx_L1_error) } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provides); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx___provides); + __pyx_v___pyx_result->__pyx___provides = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -104104,7 +107430,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc /* "(tree fragment)":13 * cdef __pyx_unpickle_Resource__set_state(Resource __pyx_result, tuple __pyx_state): - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__initializer = __pyx_state[4]; __pyx_result.__kwargs = __pyx_state[5]; __pyx_result.__kwargs_len = __pyx_state[6]; __pyx_result.__last_overriding = __pyx_state[7]; __pyx_result.__overridden = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__kwargs = __pyx_state[4]; __pyx_result.__kwargs_len = __pyx_state[5]; __pyx_result.__last_overriding = __pyx_state[6]; __pyx_result.__overridden = __pyx_state[7]; __pyx_result.__provides = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[11]) */ @@ -104126,7 +107452,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc if (__pyx_t_3) { /* "(tree fragment)":14 - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__initializer = __pyx_state[4]; __pyx_result.__kwargs = __pyx_state[5]; __pyx_result.__kwargs_len = __pyx_state[6]; __pyx_result.__last_overriding = __pyx_state[7]; __pyx_result.__overridden = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__kwargs = __pyx_state[4]; __pyx_result.__kwargs_len = __pyx_state[5]; __pyx_result.__last_overriding = __pyx_state[6]; __pyx_result.__overridden = __pyx_state[7]; __pyx_result.__provides = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[11]) # <<<<<<<<<<<<<< */ @@ -104161,7 +107487,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc /* "(tree fragment)":13 * cdef __pyx_unpickle_Resource__set_state(Resource __pyx_result, tuple __pyx_state): - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__initializer = __pyx_state[4]; __pyx_result.__kwargs = __pyx_state[5]; __pyx_result.__kwargs_len = __pyx_state[6]; __pyx_result.__last_overriding = __pyx_state[7]; __pyx_result.__overridden = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__kwargs = __pyx_state[4]; __pyx_result.__kwargs_len = __pyx_state[5]; __pyx_result.__last_overriding = __pyx_state[6]; __pyx_result.__overridden = __pyx_state[7]; __pyx_result.__provides = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[11]) */ @@ -104171,7 +107497,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc * __pyx_unpickle_Resource__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Resource__set_state(Resource __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__initializer = __pyx_state[4]; __pyx_result.__kwargs = __pyx_state[5]; __pyx_result.__kwargs_len = __pyx_state[6]; __pyx_result.__last_overriding = __pyx_state[7]; __pyx_result.__overridden = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__kwargs = __pyx_state[4]; __pyx_result.__kwargs_len = __pyx_state[5]; __pyx_result.__last_overriding = __pyx_state[6]; __pyx_result.__overridden = __pyx_state[7]; __pyx_result.__provides = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): */ @@ -104198,9 +107524,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Resourc */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_111__pyx_unpickle_Container(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_111__pyx_unpickle_Container = {"__pyx_unpickle_Container", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_111__pyx_unpickle_Container, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_111__pyx_unpickle_Container(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_117__pyx_unpickle_Container(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_117__pyx_unpickle_Container = {"__pyx_unpickle_Container", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_117__pyx_unpickle_Container, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_117__pyx_unpickle_Container(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -104266,14 +107592,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_111__pyx_unpickle_Con __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_110__pyx_unpickle_Container(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_Container(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_110__pyx_unpickle_Container(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_Container(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -104663,9 +107989,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Contain */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_113__pyx_unpickle_Selector(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_113__pyx_unpickle_Selector = {"__pyx_unpickle_Selector", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_113__pyx_unpickle_Selector, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_113__pyx_unpickle_Selector(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_119__pyx_unpickle_Selector(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_119__pyx_unpickle_Selector = {"__pyx_unpickle_Selector", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_119__pyx_unpickle_Selector, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_119__pyx_unpickle_Selector(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -104731,14 +108057,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_113__pyx_unpickle_Sel __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_112__pyx_unpickle_Selector(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_Selector(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_112__pyx_unpickle_Selector(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_Selector(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -105106,9 +108432,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Selecto */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_115__pyx_unpickle_ProvidedInstance(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_115__pyx_unpickle_ProvidedInstance = {"__pyx_unpickle_ProvidedInstance", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_115__pyx_unpickle_ProvidedInstance, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_115__pyx_unpickle_ProvidedInstance(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_121__pyx_unpickle_ProvidedInstance(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_121__pyx_unpickle_ProvidedInstance = {"__pyx_unpickle_ProvidedInstance", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_121__pyx_unpickle_ProvidedInstance, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_121__pyx_unpickle_ProvidedInstance(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -105174,14 +108500,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_115__pyx_unpickle_Pro __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_ProvidedInstance(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_ProvidedInstance(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_ProvidedInstance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_ProvidedInstance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -105200,18 +108526,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_Pro /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0xfd61095: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x328787b: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfd61095 = (__async_mode, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x328787b = (__async_mode, __last_overriding, __overridden, __provides))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xfd61095) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x328787b) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0xfd61095: + * if __pyx_checksum != 0x328787b: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfd61095 = (__async_mode, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x328787b = (__async_mode, __last_overriding, __overridden, __provides))" % __pyx_checksum) * __pyx_result = ProvidedInstance.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) @@ -105230,15 +108556,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_Pro __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0xfd61095: + * if __pyx_checksum != 0x328787b: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfd61095 = (__async_mode, __last_overriding, __overridden, __provider))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x328787b = (__async_mode, __last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = ProvidedInstance.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xfd, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x32, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -105265,15 +108591,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_Pro /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0xfd61095: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x328787b: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfd61095 = (__async_mode, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x328787b = (__async_mode, __last_overriding, __overridden, __provides))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfd61095 = (__async_mode, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x328787b = (__async_mode, __last_overriding, __overridden, __provides))" % __pyx_checksum) * __pyx_result = ProvidedInstance.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_ProvidedInstance__set_state( __pyx_result, __pyx_state) @@ -105299,7 +108625,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_Pro __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfd61095 = (__async_mode, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x328787b = (__async_mode, __last_overriding, __overridden, __provides))" % __pyx_checksum) * __pyx_result = ProvidedInstance.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_ProvidedInstance__set_state( __pyx_result, __pyx_state) @@ -105322,7 +108648,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_Pro __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xfd61095 = (__async_mode, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x328787b = (__async_mode, __last_overriding, __overridden, __provides))" % __pyx_checksum) * __pyx_result = ProvidedInstance.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_ProvidedInstance__set_state( __pyx_result, __pyx_state) @@ -105335,7 +108661,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_Pro * __pyx_unpickle_ProvidedInstance__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_ProvidedInstance__set_state(ProvidedInstance __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provider = __pyx_state[3] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -105368,7 +108694,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_114__pyx_unpickle_Pro * __pyx_unpickle_ProvidedInstance__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ProvidedInstance__set_state(ProvidedInstance __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provider = __pyx_state[3] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ @@ -105392,7 +108718,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Provide /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_ProvidedInstance__set_state(ProvidedInstance __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provider = __pyx_state[3] # <<<<<<<<<<<<<< + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3] # <<<<<<<<<<<<<< * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) */ @@ -105435,16 +108761,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Provide } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provider); - __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx___provider)); - __pyx_v___pyx_result->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provides); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx___provides); + __pyx_v___pyx_result->__pyx___provides = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_ProvidedInstance__set_state(ProvidedInstance __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provider = __pyx_state[3] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ @@ -105466,7 +108791,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Provide if (__pyx_t_3) { /* "(tree fragment)":14 - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provider = __pyx_state[3] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ @@ -105501,7 +108826,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Provide /* "(tree fragment)":13 * cdef __pyx_unpickle_ProvidedInstance__set_state(ProvidedInstance __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provider = __pyx_state[3] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[4]) */ @@ -105511,7 +108836,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Provide * __pyx_unpickle_ProvidedInstance__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ProvidedInstance__set_state(ProvidedInstance __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provider = __pyx_state[3] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ @@ -105538,9 +108863,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Provide */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_117__pyx_unpickle_AttributeGetter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_117__pyx_unpickle_AttributeGetter = {"__pyx_unpickle_AttributeGetter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_117__pyx_unpickle_AttributeGetter, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_117__pyx_unpickle_AttributeGetter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_123__pyx_unpickle_AttributeGetter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_123__pyx_unpickle_AttributeGetter = {"__pyx_unpickle_AttributeGetter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_123__pyx_unpickle_AttributeGetter, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_123__pyx_unpickle_AttributeGetter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -105606,14 +108931,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_117__pyx_unpickle_Att __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_AttributeGetter(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_122__pyx_unpickle_AttributeGetter(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_AttributeGetter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_122__pyx_unpickle_AttributeGetter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -105632,18 +108957,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_Att /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x7ec84e3: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x5f11305: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x7ec84e3 = (__async_mode, __attribute, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x7ec84e3) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x5f11305) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x7ec84e3: + * if __pyx_checksum != 0x5f11305: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x7ec84e3 = (__async_mode, __attribute, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) * __pyx_result = AttributeGetter.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) @@ -105662,15 +108987,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_Att __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x7ec84e3: + * if __pyx_checksum != 0x5f11305: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x7ec84e3 = (__async_mode, __attribute, __last_overriding, __overridden, __provider))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = AttributeGetter.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x7e, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x5f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -105697,15 +109022,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_Att /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x7ec84e3: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x5f11305: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x7ec84e3 = (__async_mode, __attribute, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x7ec84e3 = (__async_mode, __attribute, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) * __pyx_result = AttributeGetter.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_AttributeGetter__set_state( __pyx_result, __pyx_state) @@ -105731,7 +109056,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_Att __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x7ec84e3 = (__async_mode, __attribute, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) * __pyx_result = AttributeGetter.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_AttributeGetter__set_state( __pyx_result, __pyx_state) @@ -105754,7 +109079,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_Att __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x7ec84e3 = (__async_mode, __attribute, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) * __pyx_result = AttributeGetter.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_AttributeGetter__set_state( __pyx_result, __pyx_state) @@ -105767,7 +109092,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_Att * __pyx_unpickle_AttributeGetter__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_AttributeGetter__set_state(AttributeGetter __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__attribute = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -105800,7 +109125,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_116__pyx_unpickle_Att * __pyx_unpickle_AttributeGetter__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_AttributeGetter__set_state(AttributeGetter __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__attribute = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ @@ -105824,7 +109149,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Attribu /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_AttributeGetter__set_state(AttributeGetter __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__attribute = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] # <<<<<<<<<<<<<< + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] # <<<<<<<<<<<<<< * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[5]) */ @@ -105843,10 +109168,11 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Attribu } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___attribute); - __Pyx_DECREF(__pyx_v___pyx_result->__pyx___attribute); - __pyx_v___pyx_result->__pyx___attribute = __pyx_t_1; + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding); + __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding)); + __pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -105854,11 +109180,10 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Attribu } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding); - __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding)); - __pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx___name); + __pyx_v___pyx_result->__pyx___name = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -105878,16 +109203,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Attribu } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provider); - __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx___provider)); - __pyx_v___pyx_result->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provides); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx___provides); + __pyx_v___pyx_result->__pyx___provides = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_AttributeGetter__set_state(AttributeGetter __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__attribute = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[5]) */ @@ -105909,7 +109233,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Attribu if (__pyx_t_3) { /* "(tree fragment)":14 - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__attribute = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<< */ @@ -105944,7 +109268,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Attribu /* "(tree fragment)":13 * cdef __pyx_unpickle_AttributeGetter__set_state(AttributeGetter __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__attribute = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[5]) */ @@ -105954,7 +109278,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Attribu * __pyx_unpickle_AttributeGetter__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_AttributeGetter__set_state(AttributeGetter __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__attribute = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ @@ -105981,9 +109305,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Attribu */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_119__pyx_unpickle_ItemGetter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_119__pyx_unpickle_ItemGetter = {"__pyx_unpickle_ItemGetter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_119__pyx_unpickle_ItemGetter, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_119__pyx_unpickle_ItemGetter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_125__pyx_unpickle_ItemGetter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_125__pyx_unpickle_ItemGetter = {"__pyx_unpickle_ItemGetter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_125__pyx_unpickle_ItemGetter, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_125__pyx_unpickle_ItemGetter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -106049,14 +109373,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_119__pyx_unpickle_Ite __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_ItemGetter(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_124__pyx_unpickle_ItemGetter(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_ItemGetter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_124__pyx_unpickle_ItemGetter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -106075,18 +109399,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_Ite /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0xa0575be: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x5f11305: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0575be = (__async_mode, __item, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa0575be) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x5f11305) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0xa0575be: + * if __pyx_checksum != 0x5f11305: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0575be = (__async_mode, __item, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) * __pyx_result = ItemGetter.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) @@ -106105,15 +109429,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_Ite __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0xa0575be: + * if __pyx_checksum != 0x5f11305: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0575be = (__async_mode, __item, __last_overriding, __overridden, __provider))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = ItemGetter.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x5f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -106140,15 +109464,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_Ite /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0xa0575be: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x5f11305: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0575be = (__async_mode, __item, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0575be = (__async_mode, __item, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) * __pyx_result = ItemGetter.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_ItemGetter__set_state( __pyx_result, __pyx_state) @@ -106174,7 +109498,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_Ite __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0575be = (__async_mode, __item, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) * __pyx_result = ItemGetter.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_ItemGetter__set_state( __pyx_result, __pyx_state) @@ -106197,7 +109521,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_Ite __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xa0575be = (__async_mode, __item, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x5f11305 = (__async_mode, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) * __pyx_result = ItemGetter.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_ItemGetter__set_state( __pyx_result, __pyx_state) @@ -106210,7 +109534,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_Ite * __pyx_unpickle_ItemGetter__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_ItemGetter__set_state(ItemGetter __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__item = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -106243,7 +109567,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_118__pyx_unpickle_Ite * __pyx_unpickle_ItemGetter__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ItemGetter__set_state(ItemGetter __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__item = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ @@ -106267,7 +109591,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ItemGet /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_ItemGetter__set_state(ItemGetter __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__item = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] # <<<<<<<<<<<<<< + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] # <<<<<<<<<<<<<< * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[5]) */ @@ -106286,10 +109610,11 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ItemGet } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___item); - __Pyx_DECREF(__pyx_v___pyx_result->__pyx___item); - __pyx_v___pyx_result->__pyx___item = __pyx_t_1; + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding); + __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding)); + __pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -106297,11 +109622,10 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ItemGet } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding); - __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding)); - __pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___name); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx___name); + __pyx_v___pyx_result->__pyx___name = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -106321,16 +109645,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ItemGet } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provider); - __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx___provider)); - __pyx_v___pyx_result->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provides); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx___provides); + __pyx_v___pyx_result->__pyx___provides = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_ItemGetter__set_state(ItemGetter __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__item = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[5]) */ @@ -106352,7 +109675,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ItemGet if (__pyx_t_3) { /* "(tree fragment)":14 - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__item = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<< */ @@ -106387,7 +109710,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ItemGet /* "(tree fragment)":13 * cdef __pyx_unpickle_ItemGetter__set_state(ItemGetter __pyx_result, tuple __pyx_state): - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__item = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[5]) */ @@ -106397,7 +109720,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ItemGet * __pyx_unpickle_ItemGetter__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_ItemGetter__set_state(ItemGetter __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__item = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ @@ -106424,9 +109747,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ItemGet */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_121__pyx_unpickle_MethodCaller(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_121__pyx_unpickle_MethodCaller = {"__pyx_unpickle_MethodCaller", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_121__pyx_unpickle_MethodCaller, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_121__pyx_unpickle_MethodCaller(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_127__pyx_unpickle_MethodCaller(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_127__pyx_unpickle_MethodCaller = {"__pyx_unpickle_MethodCaller", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_127__pyx_unpickle_MethodCaller, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_127__pyx_unpickle_MethodCaller(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -106492,14 +109815,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_121__pyx_unpickle_Met __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_MethodCaller(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_126__pyx_unpickle_MethodCaller(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_MethodCaller(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_126__pyx_unpickle_MethodCaller(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -106518,18 +109841,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_Met /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0xe57552f: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x3e02ba6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe57552f = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3e02ba6 = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe57552f) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x3e02ba6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0xe57552f: + * if __pyx_checksum != 0x3e02ba6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe57552f = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3e02ba6 = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) * __pyx_result = MethodCaller.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) @@ -106548,15 +109871,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_Met __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0xe57552f: + * if __pyx_checksum != 0x3e02ba6: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe57552f = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provider))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3e02ba6 = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = MethodCaller.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x3e, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -106583,15 +109906,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_Met /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0xe57552f: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x3e02ba6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe57552f = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3e02ba6 = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe57552f = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3e02ba6 = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) * __pyx_result = MethodCaller.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_MethodCaller__set_state( __pyx_result, __pyx_state) @@ -106617,7 +109940,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_Met __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe57552f = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3e02ba6 = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) * __pyx_result = MethodCaller.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_MethodCaller__set_state( __pyx_result, __pyx_state) @@ -106640,7 +109963,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_Met __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xe57552f = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provider))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3e02ba6 = (__args, __args_len, __async_mode, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) * __pyx_result = MethodCaller.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_MethodCaller__set_state( __pyx_result, __pyx_state) @@ -106653,7 +109976,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_Met * __pyx_unpickle_MethodCaller__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_MethodCaller__set_state(MethodCaller __pyx_result, tuple __pyx_state): - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provider = __pyx_state[7] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -106686,7 +110009,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_120__pyx_unpickle_Met * __pyx_unpickle_MethodCaller__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_MethodCaller__set_state(MethodCaller __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provider = __pyx_state[7] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): */ @@ -106710,7 +110033,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_MethodC /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_MethodCaller__set_state(MethodCaller __pyx_result, tuple __pyx_state): - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provider = __pyx_state[7] # <<<<<<<<<<<<<< + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] # <<<<<<<<<<<<<< * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[8]) */ @@ -106795,16 +110118,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_MethodC } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provider); - __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx___provider)); - __pyx_v___pyx_result->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provides); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx___provides); + __pyx_v___pyx_result->__pyx___provides = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_MethodCaller__set_state(MethodCaller __pyx_result, tuple __pyx_state): - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provider = __pyx_state[7] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[8]) */ @@ -106826,7 +110148,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_MethodC if (__pyx_t_3) { /* "(tree fragment)":14 - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provider = __pyx_state[7] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[8]) # <<<<<<<<<<<<<< */ @@ -106861,7 +110183,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_MethodC /* "(tree fragment)":13 * cdef __pyx_unpickle_MethodCaller__set_state(MethodCaller __pyx_result, tuple __pyx_state): - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provider = __pyx_state[7] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[8]) */ @@ -106871,7 +110193,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_MethodC * __pyx_unpickle_MethodCaller__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_MethodCaller__set_state(MethodCaller __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provider = __pyx_state[7] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): */ @@ -106898,9 +110220,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_MethodC */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_123__pyx_unpickle_Injection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_123__pyx_unpickle_Injection = {"__pyx_unpickle_Injection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_123__pyx_unpickle_Injection, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_123__pyx_unpickle_Injection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_129__pyx_unpickle_Injection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_129__pyx_unpickle_Injection = {"__pyx_unpickle_Injection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_129__pyx_unpickle_Injection, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_129__pyx_unpickle_Injection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -106966,14 +110288,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_123__pyx_unpickle_Inj __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_122__pyx_unpickle_Injection(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_128__pyx_unpickle_Injection(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_122__pyx_unpickle_Injection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_128__pyx_unpickle_Injection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -107323,9 +110645,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Injecti */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_125__pyx_unpickle_PositionalInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_125__pyx_unpickle_PositionalInjection = {"__pyx_unpickle_PositionalInjection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_125__pyx_unpickle_PositionalInjection, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_125__pyx_unpickle_PositionalInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_131__pyx_unpickle_PositionalInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_131__pyx_unpickle_PositionalInjection = {"__pyx_unpickle_PositionalInjection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_131__pyx_unpickle_PositionalInjection, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_131__pyx_unpickle_PositionalInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -107391,14 +110713,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_125__pyx_unpickle_Pos __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_124__pyx_unpickle_PositionalInjection(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_130__pyx_unpickle_PositionalInjection(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_124__pyx_unpickle_PositionalInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_130__pyx_unpickle_PositionalInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -107748,9 +111070,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Positio */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_127__pyx_unpickle_NamedInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_127__pyx_unpickle_NamedInjection = {"__pyx_unpickle_NamedInjection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_127__pyx_unpickle_NamedInjection, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_127__pyx_unpickle_NamedInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_133__pyx_unpickle_NamedInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_133__pyx_unpickle_NamedInjection = {"__pyx_unpickle_NamedInjection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_133__pyx_unpickle_NamedInjection, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_133__pyx_unpickle_NamedInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -107816,14 +111138,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_127__pyx_unpickle_Nam __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_126__pyx_unpickle_NamedInjection(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_132__pyx_unpickle_NamedInjection(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_126__pyx_unpickle_NamedInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_132__pyx_unpickle_NamedInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -108184,9 +111506,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_NamedIn */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_129__pyx_unpickle_OverridingContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_129__pyx_unpickle_OverridingContext = {"__pyx_unpickle_OverridingContext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_129__pyx_unpickle_OverridingContext, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_129__pyx_unpickle_OverridingContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_135__pyx_unpickle_OverridingContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_135__pyx_unpickle_OverridingContext = {"__pyx_unpickle_OverridingContext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_135__pyx_unpickle_OverridingContext, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_135__pyx_unpickle_OverridingContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -108252,14 +111574,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_129__pyx_unpickle_Ove __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_128__pyx_unpickle_OverridingContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_134__pyx_unpickle_OverridingContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_128__pyx_unpickle_OverridingContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_134__pyx_unpickle_OverridingContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -108594,9 +111916,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Overrid */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_131__pyx_unpickle_BaseSingletonResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_131__pyx_unpickle_BaseSingletonResetContext = {"__pyx_unpickle_BaseSingletonResetContext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_131__pyx_unpickle_BaseSingletonResetContext, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_131__pyx_unpickle_BaseSingletonResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_137__pyx_unpickle_BaseSingletonResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_137__pyx_unpickle_BaseSingletonResetContext = {"__pyx_unpickle_BaseSingletonResetContext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_137__pyx_unpickle_BaseSingletonResetContext, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_137__pyx_unpickle_BaseSingletonResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -108662,14 +111984,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_131__pyx_unpickle_Bas __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_130__pyx_unpickle_BaseSingletonResetContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_136__pyx_unpickle_BaseSingletonResetContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_130__pyx_unpickle_BaseSingletonResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_136__pyx_unpickle_BaseSingletonResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -108991,9 +112313,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_BaseSin */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_133__pyx_unpickle_SingletonResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_133__pyx_unpickle_SingletonResetContext = {"__pyx_unpickle_SingletonResetContext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_133__pyx_unpickle_SingletonResetContext, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_133__pyx_unpickle_SingletonResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_139__pyx_unpickle_SingletonResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_139__pyx_unpickle_SingletonResetContext = {"__pyx_unpickle_SingletonResetContext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_139__pyx_unpickle_SingletonResetContext, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_139__pyx_unpickle_SingletonResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -109059,14 +112381,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_133__pyx_unpickle_Sin __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_132__pyx_unpickle_SingletonResetContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_138__pyx_unpickle_SingletonResetContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_132__pyx_unpickle_SingletonResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_138__pyx_unpickle_SingletonResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -109388,9 +112710,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Singlet */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_9providers_135__pyx_unpickle_SingletonFullResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_9providers_135__pyx_unpickle_SingletonFullResetContext = {"__pyx_unpickle_SingletonFullResetContext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_135__pyx_unpickle_SingletonFullResetContext, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_9providers_135__pyx_unpickle_SingletonFullResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_9providers_141__pyx_unpickle_SingletonFullResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_9providers_141__pyx_unpickle_SingletonFullResetContext = {"__pyx_unpickle_SingletonFullResetContext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_141__pyx_unpickle_SingletonFullResetContext, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_9providers_141__pyx_unpickle_SingletonFullResetContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -109456,14 +112778,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_135__pyx_unpickle_Sin __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_134__pyx_unpickle_SingletonFullResetContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_19dependency_injector_9providers_140__pyx_unpickle_SingletonFullResetContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_19dependency_injector_9providers_134__pyx_unpickle_SingletonFullResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_19dependency_injector_9providers_140__pyx_unpickle_SingletonFullResetContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -110172,7 +113494,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa * plain_kwargs[key] = value * continue */ - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__11, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__10, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 353, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { @@ -110222,7 +113544,7 @@ 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__11) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s__11); + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_n_s__10) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s__10); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -114724,7 +118046,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__35)); 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__34)); 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; @@ -114912,7 +118234,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__37)); 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__36)); 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; @@ -115111,7 +118433,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__39)); 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__38)); 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; @@ -115304,7 +118626,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__41)); 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__40)); 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; @@ -115560,19 +118882,25 @@ static int __pyx_tp_clear_19dependency_injector_9providers_Object(PyObject *o) { return 0; } +static PyObject *__pyx_getprop_19dependency_injector_9providers_6Object_provides(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_19dependency_injector_9providers_6Object_8provides_1__get__(o); +} + static PyObject *__pyx_getprop_19dependency_injector_9providers_6Object_related(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_19dependency_injector_9providers_6Object_7related_1__get__(o); } static PyMethodDef __pyx_methods_19dependency_injector_9providers_Object[] = { {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_6Object_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_6Object_2__deepcopy__}, - {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_6Object_9_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_6Object_8_provide}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_6Object_11__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_6Object_13__setstate_cython__, METH_O, 0}, + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_6Object_9set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_6Object_8set_provides}, + {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_6Object_11_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_6Object_10_provide}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_6Object_13__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_6Object_15__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Object[] = { + {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_6Object_provides, 0, (char *)"Return provider's provides.", 0}, {(char *)"related", __pyx_getprop_19dependency_injector_9providers_6Object_related, 0, (char *)"Return related providers generator.", 0}, {0, 0, 0, 0, 0} }; @@ -115848,7 +119176,7 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_8Delegate_relate static PyMethodDef __pyx_methods_19dependency_injector_9providers_Delegate[] = { {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Delegate_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_8Delegate_2__deepcopy__}, - {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Delegate_9set_provides, METH_O, 0}, + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Delegate_9set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_8Delegate_8set_provides}, {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Delegate_11_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Delegate_10_provide}, {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Delegate_13__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Delegate_15__setstate_cython__, METH_O, 0}, @@ -115856,7 +119184,7 @@ static PyMethodDef __pyx_methods_19dependency_injector_9providers_Delegate[] = { }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Delegate[] = { - {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_8Delegate_provides, 0, (char *)0, 0}, + {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_8Delegate_provides, 0, (char *)"Return provider's provides.", 0}, {(char *)"related", __pyx_getprop_19dependency_injector_9providers_8Delegate_related, 0, (char *)"Return related providers generator.", 0}, {0, 0, 0, 0, 0} }; @@ -116030,19 +119358,21 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_10Dependency_par static PyMethodDef __pyx_methods_19dependency_injector_9providers_Dependency[] = { {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_10Dependency_2__deepcopy__}, {"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_7__getattr__, METH_O|METH_COEXIST, 0}, - {"provided_by", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_13provided_by, METH_O, __pyx_doc_19dependency_injector_9providers_10Dependency_12provided_by}, - {"assign_parent", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_15assign_parent, METH_O, __pyx_doc_19dependency_injector_9providers_10Dependency_14assign_parent}, - {"_copy_parent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10Dependency_17_copy_parent, METH_VARARGS|METH_KEYWORDS, 0}, - {"_async_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10Dependency_19_async_provide, METH_VARARGS|METH_KEYWORDS, 0}, - {"_check_instance_type", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_21_check_instance_type, METH_O, 0}, - {"_raise_undefined_error", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_23_raise_undefined_error, METH_NOARGS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_25__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_27__setstate_cython__, METH_O, 0}, + {"set_instance_of", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_13set_instance_of, METH_O, __pyx_doc_19dependency_injector_9providers_10Dependency_12set_instance_of}, + {"set_default", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_15set_default, METH_O, __pyx_doc_19dependency_injector_9providers_10Dependency_14set_default}, + {"provided_by", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_17provided_by, METH_O, __pyx_doc_19dependency_injector_9providers_10Dependency_16provided_by}, + {"assign_parent", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_19assign_parent, METH_O, __pyx_doc_19dependency_injector_9providers_10Dependency_18assign_parent}, + {"_copy_parent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10Dependency_21_copy_parent, METH_VARARGS|METH_KEYWORDS, 0}, + {"_async_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10Dependency_23_async_provide, METH_VARARGS|METH_KEYWORDS, 0}, + {"_check_instance_type", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_25_check_instance_type, METH_O, 0}, + {"_raise_undefined_error", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_27_raise_undefined_error, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_29__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_31__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Dependency[] = { - {(char *)"instance_of", __pyx_getprop_19dependency_injector_9providers_10Dependency_instance_of, 0, (char *)"Return class of required dependency.", 0}, + {(char *)"instance_of", __pyx_getprop_19dependency_injector_9providers_10Dependency_instance_of, 0, (char *)"Return type.", 0}, {(char *)"default", __pyx_getprop_19dependency_injector_9providers_10Dependency_default, 0, (char *)"Return default provider.", 0}, {(char *)"is_defined", __pyx_getprop_19dependency_injector_9providers_10Dependency_is_defined, 0, (char *)"Return True if dependency is defined.", 0}, {(char *)"related", __pyx_getprop_19dependency_injector_9providers_10Dependency_related, 0, (char *)"Return related providers generator.", 0}, @@ -116480,20 +119810,21 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_8Callable_relate static PyMethodDef __pyx_methods_19dependency_injector_9providers_Callable[] = { {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_8Callable_2__deepcopy__}, - {"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_7add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_6add_args}, - {"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_9set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_8set_args}, - {"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_11clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Callable_10clear_args}, - {"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_13add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_12add_kwargs}, - {"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_15set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_14set_kwargs}, - {"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_17clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Callable_16clear_kwargs}, - {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_19_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_18_provide}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_21__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_23__setstate_cython__, METH_O, 0}, + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_7set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_8Callable_6set_provides}, + {"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_9add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_8add_args}, + {"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_11set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_10set_args}, + {"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_13clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Callable_12clear_args}, + {"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_15add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_14add_kwargs}, + {"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_17set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_16set_kwargs}, + {"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_19clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Callable_18clear_kwargs}, + {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_21_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_20_provide}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_23__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_25__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Callable[] = { - {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_8Callable_provides, 0, (char *)"Return wrapped callable.", 0}, + {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_8Callable_provides, 0, (char *)"Return provider's provides.", 0}, {(char *)"args", __pyx_getprop_19dependency_injector_9providers_8Callable_args, 0, (char *)"Return positional argument injections.", 0}, {(char *)"kwargs", __pyx_getprop_19dependency_injector_9providers_8Callable_kwargs, 0, (char *)"Return keyword argument injections.", 0}, {(char *)"related", __pyx_getprop_19dependency_injector_9providers_8Callable_related, 0, (char *)"Return related providers generator.", 0}, @@ -116885,6 +120216,7 @@ static PyObject *__pyx_tp_new_19dependency_injector_9providers_Coroutine(PyTypeO } static PyMethodDef __pyx_methods_19dependency_injector_9providers_Coroutine[] = { + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9Coroutine_1set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_9Coroutine_set_provides}, {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9Coroutine_3__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9Coroutine_5__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} @@ -116948,7 +120280,11 @@ static PyTypeObject __pyx_type_19dependency_injector_9providers_Coroutine = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_19dependency_injector_9providers_9Coroutine_1__init__, /*tp_init*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_19dependency_injector_9providers_8Callable_1__init__, /*tp_init*/ + #else + 0, /*tp_init*/ + #endif 0, /*tp_alloc*/ __pyx_tp_new_19dependency_injector_9providers_Coroutine, /*tp_new*/ 0, /*tp_free*/ @@ -117046,7 +120382,7 @@ static PyTypeObject __pyx_type_19dependency_injector_9providers_DelegatedCorouti 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_19dependency_injector_9providers_9Coroutine_1__init__, /*tp_init*/ + __pyx_pw_19dependency_injector_9providers_8Callable_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif @@ -117145,7 +120481,7 @@ static PyTypeObject __pyx_type_19dependency_injector_9providers_AbstractCoroutin 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_19dependency_injector_9providers_9Coroutine_1__init__, /*tp_init*/ + __pyx_pw_19dependency_injector_9providers_8Callable_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif @@ -117674,22 +121010,29 @@ static PyMethodDef __pyx_methods_19dependency_injector_9providers_Configuration[ {"__enter__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_5__enter__, METH_NOARGS, 0}, {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_7__exit__, METH_VARARGS|METH_KEYWORDS, 0}, {"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_11__getattr__, METH_O|METH_COEXIST, 0}, - {"get_name", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_15get_name, METH_NOARGS, 0}, - {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_17get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_16get}, - {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_19set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_18set}, - {"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_21override, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_20override}, - {"reset_last_overriding", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_23reset_last_overriding, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_22reset_last_overriding}, - {"reset_override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_25reset_override, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_24reset_override}, - {"reset_cache", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_27reset_cache, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_26reset_cache}, - {"update", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_29update, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_28update}, - {"from_ini", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_31from_ini, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_30from_ini}, - {"from_yaml", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_33from_yaml, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_32from_yaml}, - {"from_pydantic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_35from_pydantic, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_34from_pydantic}, - {"from_dict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_37from_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_36from_dict}, - {"from_env", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_39from_env, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_38from_env}, - {"_is_strict_mode_enabled", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_41_is_strict_mode_enabled, METH_NOARGS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_43__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_45__setstate_cython__, METH_O, 0}, + {"get_name", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_15get_name, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_14get_name}, + {"set_name", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_17set_name, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_16set_name}, + {"get_default", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_19get_default, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_18get_default}, + {"set_default", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_21set_default, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_20set_default}, + {"get_strict", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_23get_strict, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_22get_strict}, + {"set_strict", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_25set_strict, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_24set_strict}, + {"get_children", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_27get_children, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_26get_children}, + {"set_children", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_29set_children, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_28set_children}, + {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_31get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_30get}, + {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_33set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_32set}, + {"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_35override, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_34override}, + {"reset_last_overriding", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_37reset_last_overriding, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_36reset_last_overriding}, + {"reset_override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_39reset_override, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_38reset_override}, + {"reset_cache", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_41reset_cache, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_40reset_cache}, + {"update", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_43update, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_42update}, + {"from_ini", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_45from_ini, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_44from_ini}, + {"from_yaml", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_47from_yaml, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_46from_yaml}, + {"from_pydantic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_49from_pydantic, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_48from_pydantic}, + {"from_dict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_51from_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_50from_dict}, + {"from_env", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13Configuration_53from_env, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13Configuration_52from_env}, + {"_is_strict_mode_enabled", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_55_is_strict_mode_enabled, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_57__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_59__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; @@ -117872,24 +121215,25 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_7Factory_related static PyMethodDef __pyx_methods_19dependency_injector_9providers_Factory[] = { {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_7Factory_2__deepcopy__}, - {"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_7add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_6add_args}, - {"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_9set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_8set_args}, - {"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_11clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_7Factory_10clear_args}, - {"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_13add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_12add_kwargs}, - {"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_15set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_14set_kwargs}, - {"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_17clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_7Factory_16clear_kwargs}, - {"add_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_19add_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_18add_attributes}, - {"set_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_21set_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_20set_attributes}, - {"clear_attributes", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_23clear_attributes, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_7Factory_22clear_attributes}, - {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_25_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_24_provide}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_27__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_29__setstate_cython__, METH_O, 0}, + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_7set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_7Factory_6set_provides}, + {"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_9add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_8add_args}, + {"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_11set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_10set_args}, + {"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_13clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_7Factory_12clear_args}, + {"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_15add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_14add_kwargs}, + {"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_17set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_16set_kwargs}, + {"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_19clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_7Factory_18clear_kwargs}, + {"add_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_21add_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_20add_attributes}, + {"set_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_23set_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_22set_attributes}, + {"clear_attributes", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_25clear_attributes, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_7Factory_24clear_attributes}, + {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_27_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_26_provide}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_29__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_31__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Factory[] = { {(char *)"cls", __pyx_getprop_19dependency_injector_9providers_7Factory_cls, 0, (char *)"Return provided type.", 0}, - {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_7Factory_provides, 0, (char *)"Return provided type.", 0}, + {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_7Factory_provides, 0, (char *)"Return provider's provides.", 0}, {(char *)"args", __pyx_getprop_19dependency_injector_9providers_7Factory_args, 0, (char *)"Return positional argument injections.", 0}, {(char *)"kwargs", __pyx_getprop_19dependency_injector_9providers_7Factory_kwargs, 0, (char *)"Return keyword argument injections.", 0}, {(char *)"attributes", __pyx_getprop_19dependency_injector_9providers_7Factory_attributes, 0, (char *)"Return attribute injections.", 0}, @@ -118335,10 +121679,11 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_16FactoryAggrega static PyMethodDef __pyx_methods_19dependency_injector_9providers_FactoryAggregate[] = { {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_2__deepcopy__}, {"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_5__getattr__, METH_O|METH_COEXIST, __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_4__getattr__}, - {"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9override, METH_O, __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_8override}, - {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11_provide, METH_VARARGS|METH_KEYWORDS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_15__setstate_cython__, METH_O, 0}, + {"set_factories", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9set_factories, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_8set_factories}, + {"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11override, METH_O, __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_10override}, + {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13_provide, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_15__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_17__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; @@ -118503,26 +121848,27 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_13BaseSingleton_ static PyMethodDef __pyx_methods_19dependency_injector_9providers_BaseSingleton[] = { {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_5__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_4__deepcopy__}, - {"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_6add_args}, - {"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_8set_args}, - {"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_11clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_10clear_args}, - {"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_12add_kwargs}, - {"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_14set_kwargs}, - {"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_17clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_16clear_kwargs}, - {"add_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19add_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_18add_attributes}, - {"set_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21set_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_20set_attributes}, - {"clear_attributes", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_23clear_attributes, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_22clear_attributes}, - {"reset", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_25reset, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_24reset}, - {"full_reset", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_27full_reset, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_26full_reset}, - {"_async_init_instance", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29_async_init_instance, METH_VARARGS|METH_KEYWORDS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_31__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_33__setstate_cython__, METH_O, 0}, + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_6set_provides}, + {"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_8add_args}, + {"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_11set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_10set_args}, + {"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_12clear_args}, + {"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_14add_kwargs}, + {"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_17set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_16set_kwargs}, + {"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_18clear_kwargs}, + {"add_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21add_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_20add_attributes}, + {"set_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_23set_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_22set_attributes}, + {"clear_attributes", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_25clear_attributes, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_24clear_attributes}, + {"reset", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_27reset, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_26reset}, + {"full_reset", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29full_reset, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_28full_reset}, + {"_async_init_instance", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_31_async_init_instance, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_33__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_35__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_BaseSingleton[] = { {(char *)"cls", __pyx_getprop_19dependency_injector_9providers_13BaseSingleton_cls, 0, (char *)"Return provided type.", 0}, - {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_13BaseSingleton_provides, 0, (char *)"Return provided type.", 0}, + {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_13BaseSingleton_provides, 0, (char *)"Return provider's provides.", 0}, {(char *)"args", __pyx_getprop_19dependency_injector_9providers_13BaseSingleton_args, 0, (char *)"Return positional argument injections.", 0}, {(char *)"kwargs", __pyx_getprop_19dependency_injector_9providers_13BaseSingleton_kwargs, 0, (char *)"Return keyword argument injections.", 0}, {(char *)"attributes", __pyx_getprop_19dependency_injector_9providers_13BaseSingleton_attributes, 0, (char *)"Return attribute injections.", 0}, @@ -119737,7 +123083,7 @@ static PyObject *__pyx_tp_new_19dependency_injector_9providers_Resource(PyTypeOb if (unlikely(!o)) return 0; p = ((struct __pyx_obj_19dependency_injector_9providers_Resource *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_Resource; - p->__pyx___initializer = Py_None; Py_INCREF(Py_None); + p->__pyx___provides = Py_None; Py_INCREF(Py_None); p->__pyx___shutdowner = Py_None; Py_INCREF(Py_None); p->__pyx___resource = Py_None; Py_INCREF(Py_None); p->__pyx___args = ((PyObject*)Py_None); Py_INCREF(Py_None); @@ -119753,7 +123099,7 @@ static void __pyx_tp_dealloc_19dependency_injector_9providers_Resource(PyObject } #endif PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx___initializer); + Py_CLEAR(p->__pyx___provides); Py_CLEAR(p->__pyx___shutdowner); Py_CLEAR(p->__pyx___resource); Py_CLEAR(p->__pyx___args); @@ -119766,8 +123112,8 @@ static int __pyx_tp_traverse_19dependency_injector_9providers_Resource(PyObject int e; struct __pyx_obj_19dependency_injector_9providers_Resource *p = (struct __pyx_obj_19dependency_injector_9providers_Resource *)o; e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e; - if (p->__pyx___initializer) { - e = (*v)(p->__pyx___initializer, a); if (e) return e; + if (p->__pyx___provides) { + e = (*v)(p->__pyx___provides, a); if (e) return e; } if (p->__pyx___shutdowner) { e = (*v)(p->__pyx___shutdowner, a); if (e) return e; @@ -119788,8 +123134,8 @@ static int __pyx_tp_clear_19dependency_injector_9providers_Resource(PyObject *o) PyObject* tmp; struct __pyx_obj_19dependency_injector_9providers_Resource *p = (struct __pyx_obj_19dependency_injector_9providers_Resource *)o; __pyx_tp_clear_19dependency_injector_9providers_Provider(o); - tmp = ((PyObject*)p->__pyx___initializer); - p->__pyx___initializer = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx___provides); + p->__pyx___provides = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx___shutdowner); p->__pyx___shutdowner = Py_None; Py_INCREF(Py_None); @@ -119806,8 +123152,8 @@ static int __pyx_tp_clear_19dependency_injector_9providers_Resource(PyObject *o) return 0; } -static PyObject *__pyx_getprop_19dependency_injector_9providers_8Resource_initializer(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_19dependency_injector_9providers_8Resource_11initializer_1__get__(o); +static PyObject *__pyx_getprop_19dependency_injector_9providers_8Resource_provides(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_19dependency_injector_9providers_8Resource_8provides_1__get__(o); } static PyObject *__pyx_getprop_19dependency_injector_9providers_8Resource_args(PyObject *o, CYTHON_UNUSED void *x) { @@ -119828,31 +123174,32 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_8Resource_relate static PyMethodDef __pyx_methods_19dependency_injector_9providers_Resource[] = { {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_8Resource_2__deepcopy__}, - {"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_7add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Resource_6add_args}, - {"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_9set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Resource_8set_args}, - {"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_11clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Resource_10clear_args}, - {"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_13add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Resource_12add_kwargs}, - {"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_15set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Resource_14set_kwargs}, - {"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_17clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Resource_16clear_kwargs}, - {"init", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_19init, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Resource_18init}, - {"shutdown", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_21shutdown, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Resource_20shutdown}, - {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_23_provide, METH_VARARGS|METH_KEYWORDS, 0}, - {"_create_init_future", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_25_create_init_future, METH_VARARGS|METH_KEYWORDS, 0}, - {"_create_async_gen_init_future", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_27_create_async_gen_init_future, METH_O, 0}, - {"_async_init_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_29_async_init_callback, METH_VARARGS|METH_KEYWORDS, 0}, - {"_async_create_gen_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_31_async_create_gen_callback, METH_VARARGS|METH_KEYWORDS, 0}, - {"_async_trigger_result", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_33_async_trigger_result, METH_VARARGS|METH_KEYWORDS, 0}, - {"_create_shutdown_future", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_35_create_shutdown_future, METH_O, 0}, - {"_async_shutdown_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_37_async_shutdown_callback, METH_VARARGS|METH_KEYWORDS, 0}, - {"_is_resource_subclass", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_39_is_resource_subclass, METH_VARARGS|METH_KEYWORDS, 0}, - {"_is_async_resource_subclass", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_41_is_async_resource_subclass, METH_VARARGS|METH_KEYWORDS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_43__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_45__setstate_cython__, METH_O, 0}, + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_7set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_8Resource_6set_provides}, + {"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_9add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Resource_8add_args}, + {"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_11set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Resource_10set_args}, + {"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_13clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Resource_12clear_args}, + {"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_15add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Resource_14add_kwargs}, + {"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_17set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Resource_16set_kwargs}, + {"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_19clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Resource_18clear_kwargs}, + {"init", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_21init, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Resource_20init}, + {"shutdown", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_23shutdown, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Resource_22shutdown}, + {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_25_provide, METH_VARARGS|METH_KEYWORDS, 0}, + {"_create_init_future", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_27_create_init_future, METH_VARARGS|METH_KEYWORDS, 0}, + {"_create_async_gen_init_future", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_29_create_async_gen_init_future, METH_O, 0}, + {"_async_init_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_31_async_init_callback, METH_VARARGS|METH_KEYWORDS, 0}, + {"_async_create_gen_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_33_async_create_gen_callback, METH_VARARGS|METH_KEYWORDS, 0}, + {"_async_trigger_result", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_35_async_trigger_result, METH_VARARGS|METH_KEYWORDS, 0}, + {"_create_shutdown_future", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_37_create_shutdown_future, METH_O, 0}, + {"_async_shutdown_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_39_async_shutdown_callback, METH_VARARGS|METH_KEYWORDS, 0}, + {"_is_resource_subclass", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_41_is_resource_subclass, METH_VARARGS|METH_KEYWORDS, 0}, + {"_is_async_resource_subclass", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Resource_43_is_async_resource_subclass, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_45__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Resource_47__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Resource[] = { - {(char *)"initializer", __pyx_getprop_19dependency_injector_9providers_8Resource_initializer, 0, (char *)"Return initializer.", 0}, + {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_8Resource_provides, 0, (char *)"Return provider's provides.", 0}, {(char *)"args", __pyx_getprop_19dependency_injector_9providers_8Resource_args, 0, (char *)"Return positional argument injections.", 0}, {(char *)"kwargs", __pyx_getprop_19dependency_injector_9providers_8Resource_kwargs, 0, (char *)"Return keyword argument injections.", 0}, {(char *)"initialized", __pyx_getprop_19dependency_injector_9providers_8Resource_initialized, 0, (char *)"Check if resource is initialized.", 0}, @@ -120201,6 +123548,10 @@ static PyObject *__pyx_tp_getattro_19dependency_injector_9providers_Selector(PyO return v; } +static PyObject *__pyx_getprop_19dependency_injector_9providers_8Selector_selector(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_19dependency_injector_9providers_8Selector_8selector_1__get__(o); +} + static PyObject *__pyx_getprop_19dependency_injector_9providers_8Selector_providers(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_19dependency_injector_9providers_8Selector_9providers_1__get__(o); } @@ -120212,13 +123563,16 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_8Selector_relate static PyMethodDef __pyx_methods_19dependency_injector_9providers_Selector[] = { {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Selector_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_8Selector_2__deepcopy__}, {"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Selector_5__getattr__, METH_O|METH_COEXIST, __pyx_doc_19dependency_injector_9providers_8Selector_4__getattr__}, - {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Selector_9_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Selector_8_provide}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Selector_11__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Selector_13__setstate_cython__, METH_O, 0}, + {"set_selector", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Selector_9set_selector, METH_O, __pyx_doc_19dependency_injector_9providers_8Selector_8set_selector}, + {"set_providers", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Selector_11set_providers, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Selector_10set_providers}, + {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Selector_13_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Selector_12_provide}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Selector_15__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Selector_17__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Selector[] = { + {(char *)"selector", __pyx_getprop_19dependency_injector_9providers_8Selector_selector, 0, (char *)"Return selector.", 0}, {(char *)"providers", __pyx_getprop_19dependency_injector_9providers_8Selector_providers, 0, (char *)"Return providers.", 0}, {(char *)"related", __pyx_getprop_19dependency_injector_9providers_8Selector_related, 0, (char *)"Return related providers generator.", 0}, {0, 0, 0, 0, 0} @@ -120308,7 +123662,7 @@ static PyObject *__pyx_tp_new_19dependency_injector_9providers_ProvidedInstance( if (unlikely(!o)) return 0; p = ((struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance; - p->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None); + p->__pyx___provides = Py_None; Py_INCREF(Py_None); return o; } @@ -120320,7 +123674,7 @@ static void __pyx_tp_dealloc_19dependency_injector_9providers_ProvidedInstance(P } #endif PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx___provider); + Py_CLEAR(p->__pyx___provides); PyObject_GC_Track(o); __pyx_tp_dealloc_19dependency_injector_9providers_Provider(o); } @@ -120329,8 +123683,8 @@ static int __pyx_tp_traverse_19dependency_injector_9providers_ProvidedInstance(P int e; struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *p = (struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)o; e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e; - if (p->__pyx___provider) { - e = (*v)(((PyObject *)p->__pyx___provider), a); if (e) return e; + if (p->__pyx___provides) { + e = (*v)(p->__pyx___provides, a); if (e) return e; } return 0; } @@ -120339,8 +123693,8 @@ static int __pyx_tp_clear_19dependency_injector_9providers_ProvidedInstance(PyOb PyObject* tmp; struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *p = (struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance *)o; __pyx_tp_clear_19dependency_injector_9providers_Provider(o); - tmp = ((PyObject*)p->__pyx___provider); - p->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx___provides); + p->__pyx___provides = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } @@ -120370,17 +123724,18 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_16ProvidedInstan } static PyMethodDef __pyx_methods_19dependency_injector_9providers_ProvidedInstance[] = { - {"__deepcopy__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_5__deepcopy__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_5__deepcopy__, METH_O, 0}, {"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_7__getattr__, METH_O|METH_COEXIST, 0}, - {"call", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_11call, METH_VARARGS|METH_KEYWORDS, 0}, - {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13_provide, METH_VARARGS|METH_KEYWORDS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_15__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_17__setstate_cython__, METH_O, 0}, + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_11set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_16ProvidedInstance_10set_provides}, + {"call", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_13call, METH_VARARGS|METH_KEYWORDS, 0}, + {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_15_provide, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_17__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16ProvidedInstance_19__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_ProvidedInstance[] = { - {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_16ProvidedInstance_provides, 0, (char *)"Return provider.", 0}, + {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_16ProvidedInstance_provides, 0, (char *)"Return provider's provides.", 0}, {(char *)"related", __pyx_getprop_19dependency_injector_9providers_16ProvidedInstance_related, 0, (char *)"Return related providers generator.", 0}, {0, 0, 0, 0, 0} }; @@ -120488,8 +123843,8 @@ static PyObject *__pyx_tp_new_19dependency_injector_9providers_AttributeGetter(P if (unlikely(!o)) return 0; p = ((struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_AttributeGetter; - p->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None); - p->__pyx___attribute = Py_None; Py_INCREF(Py_None); + p->__pyx___provides = Py_None; Py_INCREF(Py_None); + p->__pyx___name = Py_None; Py_INCREF(Py_None); return o; } @@ -120501,8 +123856,8 @@ static void __pyx_tp_dealloc_19dependency_injector_9providers_AttributeGetter(Py } #endif PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx___provider); - Py_CLEAR(p->__pyx___attribute); + Py_CLEAR(p->__pyx___provides); + Py_CLEAR(p->__pyx___name); PyObject_GC_Track(o); __pyx_tp_dealloc_19dependency_injector_9providers_Provider(o); } @@ -120511,11 +123866,11 @@ static int __pyx_tp_traverse_19dependency_injector_9providers_AttributeGetter(Py int e; struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *p = (struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)o; e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e; - if (p->__pyx___provider) { - e = (*v)(((PyObject *)p->__pyx___provider), a); if (e) return e; + if (p->__pyx___provides) { + e = (*v)(p->__pyx___provides, a); if (e) return e; } - if (p->__pyx___attribute) { - e = (*v)(p->__pyx___attribute, a); if (e) return e; + if (p->__pyx___name) { + e = (*v)(p->__pyx___name, a); if (e) return e; } return 0; } @@ -120524,11 +123879,11 @@ static int __pyx_tp_clear_19dependency_injector_9providers_AttributeGetter(PyObj PyObject* tmp; struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *p = (struct __pyx_obj_19dependency_injector_9providers_AttributeGetter *)o; __pyx_tp_clear_19dependency_injector_9providers_Provider(o); - tmp = ((PyObject*)p->__pyx___provider); - p->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx___provides); + p->__pyx___provides = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx___attribute); - p->__pyx___attribute = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx___name); + p->__pyx___name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } @@ -120562,18 +123917,20 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_15AttributeGette } static PyMethodDef __pyx_methods_19dependency_injector_9providers_AttributeGetter[] = { - {"__deepcopy__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_5__deepcopy__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_5__deepcopy__, METH_O, 0}, {"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_7__getattr__, METH_O|METH_COEXIST, 0}, - {"call", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_11call, METH_VARARGS|METH_KEYWORDS, 0}, - {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13_provide, METH_VARARGS|METH_KEYWORDS, 0}, - {"_async_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_15_async_provide, METH_VARARGS|METH_KEYWORDS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_17__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_19__setstate_cython__, METH_O, 0}, + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_11set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_15AttributeGetter_10set_provides}, + {"set_name", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_13set_name, METH_O, __pyx_doc_19dependency_injector_9providers_15AttributeGetter_12set_name}, + {"call", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_15call, METH_VARARGS|METH_KEYWORDS, 0}, + {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_17_provide, METH_VARARGS|METH_KEYWORDS, 0}, + {"_async_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_19_async_provide, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_21__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AttributeGetter_23__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_AttributeGetter[] = { - {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_15AttributeGetter_provides, 0, (char *)"Return provider.", 0}, + {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_15AttributeGetter_provides, 0, (char *)"Return provider's provides.", 0}, {(char *)"name", __pyx_getprop_19dependency_injector_9providers_15AttributeGetter_name, 0, (char *)"Return name of the attribute.", 0}, {(char *)"related", __pyx_getprop_19dependency_injector_9providers_15AttributeGetter_related, 0, (char *)"Return related providers generator.", 0}, {0, 0, 0, 0, 0} @@ -120682,8 +124039,8 @@ static PyObject *__pyx_tp_new_19dependency_injector_9providers_ItemGetter(PyType if (unlikely(!o)) return 0; p = ((struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_ItemGetter; - p->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None); - p->__pyx___item = Py_None; Py_INCREF(Py_None); + p->__pyx___provides = Py_None; Py_INCREF(Py_None); + p->__pyx___name = Py_None; Py_INCREF(Py_None); return o; } @@ -120695,8 +124052,8 @@ static void __pyx_tp_dealloc_19dependency_injector_9providers_ItemGetter(PyObjec } #endif PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx___provider); - Py_CLEAR(p->__pyx___item); + Py_CLEAR(p->__pyx___provides); + Py_CLEAR(p->__pyx___name); PyObject_GC_Track(o); __pyx_tp_dealloc_19dependency_injector_9providers_Provider(o); } @@ -120705,11 +124062,11 @@ static int __pyx_tp_traverse_19dependency_injector_9providers_ItemGetter(PyObjec int e; struct __pyx_obj_19dependency_injector_9providers_ItemGetter *p = (struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)o; e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e; - if (p->__pyx___provider) { - e = (*v)(((PyObject *)p->__pyx___provider), a); if (e) return e; + if (p->__pyx___provides) { + e = (*v)(p->__pyx___provides, a); if (e) return e; } - if (p->__pyx___item) { - e = (*v)(p->__pyx___item, a); if (e) return e; + if (p->__pyx___name) { + e = (*v)(p->__pyx___name, a); if (e) return e; } return 0; } @@ -120718,11 +124075,11 @@ static int __pyx_tp_clear_19dependency_injector_9providers_ItemGetter(PyObject * PyObject* tmp; struct __pyx_obj_19dependency_injector_9providers_ItemGetter *p = (struct __pyx_obj_19dependency_injector_9providers_ItemGetter *)o; __pyx_tp_clear_19dependency_injector_9providers_Provider(o); - tmp = ((PyObject*)p->__pyx___provider); - p->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx___provides); + p->__pyx___provides = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx___item); - p->__pyx___item = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx___name); + p->__pyx___name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } @@ -120756,18 +124113,20 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_10ItemGetter_rel } static PyMethodDef __pyx_methods_19dependency_injector_9providers_ItemGetter[] = { - {"__deepcopy__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10ItemGetter_5__deepcopy__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10ItemGetter_5__deepcopy__, METH_O, 0}, {"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10ItemGetter_7__getattr__, METH_O|METH_COEXIST, 0}, - {"call", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10ItemGetter_11call, METH_VARARGS|METH_KEYWORDS, 0}, - {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10ItemGetter_13_provide, METH_VARARGS|METH_KEYWORDS, 0}, - {"_async_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10ItemGetter_15_async_provide, METH_VARARGS|METH_KEYWORDS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10ItemGetter_17__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10ItemGetter_19__setstate_cython__, METH_O, 0}, + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10ItemGetter_11set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_10ItemGetter_10set_provides}, + {"set_name", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10ItemGetter_13set_name, METH_O, __pyx_doc_19dependency_injector_9providers_10ItemGetter_12set_name}, + {"call", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10ItemGetter_15call, METH_VARARGS|METH_KEYWORDS, 0}, + {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10ItemGetter_17_provide, METH_VARARGS|METH_KEYWORDS, 0}, + {"_async_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_10ItemGetter_19_async_provide, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10ItemGetter_21__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10ItemGetter_23__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_ItemGetter[] = { - {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_10ItemGetter_provides, 0, (char *)"Return provider.", 0}, + {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_10ItemGetter_provides, 0, (char *)"Return provider's provides.", 0}, {(char *)"name", __pyx_getprop_19dependency_injector_9providers_10ItemGetter_name, 0, (char *)"Return name of the item.", 0}, {(char *)"related", __pyx_getprop_19dependency_injector_9providers_10ItemGetter_related, 0, (char *)"Return related providers generator.", 0}, {0, 0, 0, 0, 0} @@ -120876,7 +124235,7 @@ static PyObject *__pyx_tp_new_19dependency_injector_9providers_MethodCaller(PyTy if (unlikely(!o)) return 0; p = ((struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_MethodCaller; - p->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None); + p->__pyx___provides = Py_None; Py_INCREF(Py_None); p->__pyx___args = ((PyObject*)Py_None); Py_INCREF(Py_None); p->__pyx___kwargs = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; @@ -120890,7 +124249,7 @@ static void __pyx_tp_dealloc_19dependency_injector_9providers_MethodCaller(PyObj } #endif PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx___provider); + Py_CLEAR(p->__pyx___provides); Py_CLEAR(p->__pyx___args); Py_CLEAR(p->__pyx___kwargs); PyObject_GC_Track(o); @@ -120901,8 +124260,8 @@ static int __pyx_tp_traverse_19dependency_injector_9providers_MethodCaller(PyObj int e; struct __pyx_obj_19dependency_injector_9providers_MethodCaller *p = (struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)o; e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e; - if (p->__pyx___provider) { - e = (*v)(((PyObject *)p->__pyx___provider), a); if (e) return e; + if (p->__pyx___provides) { + e = (*v)(p->__pyx___provides, a); if (e) return e; } if (p->__pyx___args) { e = (*v)(p->__pyx___args, a); if (e) return e; @@ -120917,8 +124276,8 @@ static int __pyx_tp_clear_19dependency_injector_9providers_MethodCaller(PyObject PyObject* tmp; struct __pyx_obj_19dependency_injector_9providers_MethodCaller *p = (struct __pyx_obj_19dependency_injector_9providers_MethodCaller *)o; __pyx_tp_clear_19dependency_injector_9providers_Provider(o); - tmp = ((PyObject*)p->__pyx___provider); - p->__pyx___provider = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx___provides); + p->__pyx___provides = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx___args); p->__pyx___args = ((PyObject*)Py_None); Py_INCREF(Py_None); @@ -120962,18 +124321,21 @@ static PyObject *__pyx_getprop_19dependency_injector_9providers_12MethodCaller_r } static PyMethodDef __pyx_methods_19dependency_injector_9providers_MethodCaller[] = { - {"__deepcopy__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_12MethodCaller_5__deepcopy__, METH_VARARGS|METH_KEYWORDS, 0}, + {"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_12MethodCaller_5__deepcopy__, METH_O, 0}, {"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_12MethodCaller_7__getattr__, METH_O|METH_COEXIST, 0}, {"call", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_12MethodCaller_11call, METH_VARARGS|METH_KEYWORDS, 0}, - {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_12MethodCaller_13_provide, METH_VARARGS|METH_KEYWORDS, 0}, - {"_async_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_12MethodCaller_15_async_provide, METH_VARARGS|METH_KEYWORDS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_12MethodCaller_17__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_12MethodCaller_19__setstate_cython__, METH_O, 0}, + {"set_provides", (PyCFunction)__pyx_pw_19dependency_injector_9providers_12MethodCaller_13set_provides, METH_O, __pyx_doc_19dependency_injector_9providers_12MethodCaller_12set_provides}, + {"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_12MethodCaller_15set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_12MethodCaller_14set_args}, + {"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_12MethodCaller_17set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_12MethodCaller_16set_kwargs}, + {"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_12MethodCaller_19_provide, METH_VARARGS|METH_KEYWORDS, 0}, + {"_async_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_12MethodCaller_21_async_provide, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_12MethodCaller_23__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_12MethodCaller_25__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_MethodCaller[] = { - {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_12MethodCaller_provides, 0, (char *)"Return provider.", 0}, + {(char *)"provides", __pyx_getprop_19dependency_injector_9providers_12MethodCaller_provides, 0, (char *)"Return provider's provides.", 0}, {(char *)"args", __pyx_getprop_19dependency_injector_9providers_12MethodCaller_args, 0, (char *)"Return positional argument injections.", 0}, {(char *)"kwargs", __pyx_getprop_19dependency_injector_9providers_12MethodCaller_kwargs, 0, (char *)"Return keyword argument injections.", 0}, {(char *)"related", __pyx_getprop_19dependency_injector_9providers_12MethodCaller_related, 0, (char *)"Return related providers generator.", 0}, @@ -124913,6 +128275,9 @@ static PyMethodDef __pyx_methods[] = { {"is_container_class", (PyCFunction)__pyx_pw_19dependency_injector_9providers_21is_container_class, METH_O, __pyx_doc_19dependency_injector_9providers_20is_container_class}, {"deepcopy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_23deepcopy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_22deepcopy}, {"_copy_parent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_38_copy_parent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_37_copy_parent}, + {"_memorized_duplicate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_40_memorized_duplicate, METH_VARARGS|METH_KEYWORDS, 0}, + {"_copy_if_provider", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_42_copy_if_provider, METH_VARARGS|METH_KEYWORDS, 0}, + {"_class_qualname", (PyCFunction)__pyx_pw_19dependency_injector_9providers_44_class_qualname, METH_O, 0}, {0, 0, 0, 0} }; @@ -124972,7 +128337,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_AbstractFactory, __pyx_k_AbstractFactory, sizeof(__pyx_k_AbstractFactory), 0, 0, 1, 1}, {&__pyx_n_s_AbstractSingleton, __pyx_k_AbstractSingleton, sizeof(__pyx_k_AbstractSingleton), 0, 0, 1, 1}, {&__pyx_kp_s_Abstract_provider_forward_provid, __pyx_k_Abstract_provider_forward_provid, sizeof(__pyx_k_Abstract_provider_forward_provid), 0, 0, 1, 0}, - {&__pyx_kp_s_Argument_instance_of_has_incorre, __pyx_k_Argument_instance_of_has_incorre, sizeof(__pyx_k_Argument_instance_of_has_incorre), 0, 0, 1, 0}, {&__pyx_n_s_AsyncResource, __pyx_k_AsyncResource, sizeof(__pyx_k_AsyncResource), 0, 0, 1, 1}, {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, {&__pyx_n_s_AttributeGetter, __pyx_k_AttributeGetter, sizeof(__pyx_k_AttributeGetter), 0, 0, 1, 1}, @@ -125052,20 +128416,17 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Incompatible_checksums_s_vs_0x3e, __pyx_k_Incompatible_checksums_s_vs_0x3e, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x3e), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x42, __pyx_k_Incompatible_checksums_s_vs_0x42, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x42), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x42_2, __pyx_k_Incompatible_checksums_s_vs_0x42_2, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x42_2), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_s_vs_0x5f, __pyx_k_Incompatible_checksums_s_vs_0x5f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x5f), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_s_vs_0x62, __pyx_k_Incompatible_checksums_s_vs_0x62, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x62), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x64, __pyx_k_Incompatible_checksums_s_vs_0x64, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x64), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x6a, __pyx_k_Incompatible_checksums_s_vs_0x6a, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x6a), 0, 0, 1, 0}, - {&__pyx_kp_s_Incompatible_checksums_s_vs_0x73, __pyx_k_Incompatible_checksums_s_vs_0x73, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x73), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x75, __pyx_k_Incompatible_checksums_s_vs_0x75, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x75), 0, 0, 1, 0}, - {&__pyx_kp_s_Incompatible_checksums_s_vs_0x7e, __pyx_k_Incompatible_checksums_s_vs_0x7e, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x7e), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x91, __pyx_k_Incompatible_checksums_s_vs_0x91, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x91), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x99, __pyx_k_Incompatible_checksums_s_vs_0x99, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x99), 0, 0, 1, 0}, - {&__pyx_kp_s_Incompatible_checksums_s_vs_0xa0, __pyx_k_Incompatible_checksums_s_vs_0xa0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xa0), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xa2, __pyx_k_Incompatible_checksums_s_vs_0xa2, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xa2), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xac, __pyx_k_Incompatible_checksums_s_vs_0xac, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xac), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xce, __pyx_k_Incompatible_checksums_s_vs_0xce, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xce), 0, 0, 1, 0}, - {&__pyx_kp_s_Incompatible_checksums_s_vs_0xe5, __pyx_k_Incompatible_checksums_s_vs_0xe5, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xe5), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xf2, __pyx_k_Incompatible_checksums_s_vs_0xf2, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xf2), 0, 0, 1, 0}, - {&__pyx_kp_s_Incompatible_checksums_s_vs_0xfd, __pyx_k_Incompatible_checksums_s_vs_0xfd, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xfd), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xfe, __pyx_k_Incompatible_checksums_s_vs_0xfe, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xfe), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xff, __pyx_k_Incompatible_checksums_s_vs_0xff, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xff), 0, 0, 1, 0}, {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, @@ -125094,9 +128455,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_Provider, __pyx_k_Provider, sizeof(__pyx_k_Provider), 0, 1, 0, 0}, {&__pyx_kp_s_Provider_0_could_not_be_overridd, __pyx_k_Provider_0_could_not_be_overridd, sizeof(__pyx_k_Provider_0_could_not_be_overridd), 0, 0, 1, 0}, {&__pyx_kp_s_Provider_0_expected_to_get_calla, __pyx_k_Provider_0_expected_to_get_calla, sizeof(__pyx_k_Provider_0_expected_to_get_calla), 0, 0, 1, 0}, - {&__pyx_kp_s_Provider_0_expected_to_get_corou, __pyx_k_Provider_0_expected_to_get_corou, sizeof(__pyx_k_Provider_0_expected_to_get_corou), 0, 0, 1, 0}, {&__pyx_kp_s_Provider_0_is_not_overridden, __pyx_k_Provider_0_is_not_overridden, sizeof(__pyx_k_Provider_0_is_not_overridden), 0, 0, 1, 0}, - {&__pyx_n_s_Provider_2, __pyx_k_Provider_2, sizeof(__pyx_k_Provider_2), 0, 0, 1, 1}, + {&__pyx_kp_u_Provider_2, __pyx_k_Provider_2, sizeof(__pyx_k_Provider_2), 0, 1, 0, 0}, + {&__pyx_n_s_Provider_3, __pyx_k_Provider_3, sizeof(__pyx_k_Provider_3), 0, 0, 1, 1}, {&__pyx_n_s_Provider___get, __pyx_k_Provider___get, sizeof(__pyx_k_Provider___get), 0, 0, 1, 1}, {&__pyx_n_s_Pyx_CFunc_object____object, __pyx_k_Pyx_CFunc_object____object, sizeof(__pyx_k_Pyx_CFunc_object____object), 0, 0, 1, 1}, {&__pyx_n_s_Pyx_CFunc_void____object____ob, __pyx_k_Pyx_CFunc_void____object____ob, sizeof(__pyx_k_Pyx_CFunc_void____object____ob), 0, 0, 1, 1}, @@ -125130,20 +128491,20 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Unknown_type_of_resource_initial, __pyx_k_Unknown_type_of_resource_initial, sizeof(__pyx_k_Unknown_type_of_resource_initial), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_YamlLoader, __pyx_k_YamlLoader, sizeof(__pyx_k_YamlLoader), 0, 0, 1, 1}, - {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0}, - {&__pyx_n_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 1}, + {&__pyx_n_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 1}, {&__pyx_n_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 1}, - {&__pyx_kp_s__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 0, 1, 0}, + {&__pyx_kp_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 0}, + {&__pyx_kp_u__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 1, 0, 0}, {&__pyx_kp_u__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 1, 0, 0}, {&__pyx_kp_u__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 1, 0, 0}, - {&__pyx_kp_u__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 1, 0, 0}, - {&__pyx_kp_s__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 0, 1, 0}, + {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0}, + {&__pyx_kp_s__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 0, 1, 0}, {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0}, + {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0}, {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0}, - {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0}, {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0}, {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0}, - {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0}, + {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0}, {&__pyx_n_s_add_args, __pyx_k_add_args, sizeof(__pyx_k_add_args), 0, 0, 1, 1}, {&__pyx_n_s_add_attributes, __pyx_k_add_attributes, sizeof(__pyx_k_add_attributes), 0, 0, 1, 1}, {&__pyx_n_s_add_constructor, __pyx_k_add_constructor, sizeof(__pyx_k_add_constructor), 0, 0, 1, 1}, @@ -125167,7 +128528,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_tasks, __pyx_k_asyncio_tasks, sizeof(__pyx_k_asyncio_tasks), 0, 0, 1, 1}, {&__pyx_kp_u_at, __pyx_k_at, sizeof(__pyx_k_at), 0, 1, 0, 0}, - {&__pyx_n_s_attribute, __pyx_k_attribute, sizeof(__pyx_k_attribute), 0, 0, 1, 1}, {&__pyx_n_s_attribute_name, __pyx_k_attribute_name, sizeof(__pyx_k_attribute_name), 0, 0, 1, 1}, {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1}, {&__pyx_n_s_before_get, __pyx_k_before_get, sizeof(__pyx_k_before_get), 0, 0, 1, 1}, @@ -125227,6 +128587,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1}, {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, {&__pyx_n_s_expandvars, __pyx_k_expandvars, sizeof(__pyx_k_expandvars), 0, 0, 1, 1}, + {&__pyx_kp_u_expected_to_get_coroutine_funct, __pyx_k_expected_to_get_coroutine_funct, sizeof(__pyx_k_expected_to_get_coroutine_funct), 0, 1, 0, 0}, {&__pyx_n_s_factories, __pyx_k_factories, sizeof(__pyx_k_factories), 0, 0, 1, 1}, {&__pyx_n_s_factory, __pyx_k_factory, sizeof(__pyx_k_factory), 0, 0, 1, 1}, {&__pyx_n_s_factory_name, __pyx_k_factory_name, sizeof(__pyx_k_factory_name), 0, 0, 1, 1}, @@ -125244,9 +128605,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_2, __pyx_k_get_2, sizeof(__pyx_k_get_2), 0, 0, 1, 1}, + {&__pyx_n_s_get_children, __pyx_k_get_children, sizeof(__pyx_k_get_children), 0, 0, 1, 1}, + {&__pyx_n_s_get_default, __pyx_k_get_default, sizeof(__pyx_k_get_default), 0, 0, 1, 1}, {&__pyx_n_s_get_name, __pyx_k_get_name, sizeof(__pyx_k_get_name), 0, 0, 1, 1}, {&__pyx_n_s_get_self_name, __pyx_k_get_self_name, sizeof(__pyx_k_get_self_name), 0, 0, 1, 1}, {&__pyx_n_s_get_self_name_locals_genexpr, __pyx_k_get_self_name_locals_genexpr, sizeof(__pyx_k_get_self_name_locals_genexpr), 0, 0, 1, 1}, + {&__pyx_n_s_get_strict, __pyx_k_get_strict, sizeof(__pyx_k_get_strict), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_kp_u_has_no_attribute, __pyx_k_has_no_attribute, sizeof(__pyx_k_has_no_attribute), 0, 1, 0, 0}, {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1}, @@ -125264,6 +128628,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 0, 0, 1, 1}, {&__pyx_n_s_instance, __pyx_k_instance, sizeof(__pyx_k_instance), 0, 0, 1, 1}, {&__pyx_n_s_instance_of, __pyx_k_instance_of, sizeof(__pyx_k_instance_of), 0, 0, 1, 1}, + {&__pyx_kp_s_instance_of_has_incorrect_type, __pyx_k_instance_of_has_incorrect_type, sizeof(__pyx_k_instance_of_has_incorrect_type), 0, 0, 1, 0}, + {&__pyx_kp_u_instead, __pyx_k_instead, sizeof(__pyx_k_instead), 0, 1, 0, 0}, {&__pyx_n_s_interpolation, __pyx_k_interpolation, sizeof(__pyx_k_interpolation), 0, 0, 1, 1}, {&__pyx_n_s_is_async_mode_disabled, __pyx_k_is_async_mode_disabled, sizeof(__pyx_k_is_async_mode_disabled), 0, 0, 1, 1}, {&__pyx_n_s_is_async_mode_enabled, __pyx_k_is_async_mode_enabled, sizeof(__pyx_k_is_async_mode_enabled), 0, 0, 1, 1}, @@ -125282,7 +128648,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_iscoroutinefunction, __pyx_k_iscoroutinefunction, sizeof(__pyx_k_iscoroutinefunction), 0, 0, 1, 1}, {&__pyx_n_s_isfuture, __pyx_k_isfuture, sizeof(__pyx_k_isfuture), 0, 0, 1, 1}, {&__pyx_n_s_isgeneratorfunction, __pyx_k_isgeneratorfunction, sizeof(__pyx_k_isgeneratorfunction), 0, 0, 1, 1}, - {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, @@ -125415,11 +128780,19 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_set_alt_names, __pyx_k_set_alt_names, sizeof(__pyx_k_set_alt_names), 0, 0, 1, 1}, {&__pyx_n_s_set_args, __pyx_k_set_args, sizeof(__pyx_k_set_args), 0, 0, 1, 1}, {&__pyx_n_s_set_attributes, __pyx_k_set_attributes, sizeof(__pyx_k_set_attributes), 0, 0, 1, 1}, + {&__pyx_n_s_set_children, __pyx_k_set_children, sizeof(__pyx_k_set_children), 0, 0, 1, 1}, {&__pyx_n_s_set_container, __pyx_k_set_container, sizeof(__pyx_k_set_container), 0, 0, 1, 1}, + {&__pyx_n_s_set_default, __pyx_k_set_default, sizeof(__pyx_k_set_default), 0, 0, 1, 1}, {&__pyx_n_s_set_exception, __pyx_k_set_exception, sizeof(__pyx_k_set_exception), 0, 0, 1, 1}, + {&__pyx_n_s_set_factories, __pyx_k_set_factories, sizeof(__pyx_k_set_factories), 0, 0, 1, 1}, + {&__pyx_n_s_set_instance_of, __pyx_k_set_instance_of, sizeof(__pyx_k_set_instance_of), 0, 0, 1, 1}, {&__pyx_n_s_set_kwargs, __pyx_k_set_kwargs, sizeof(__pyx_k_set_kwargs), 0, 0, 1, 1}, + {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1}, + {&__pyx_n_s_set_providers, __pyx_k_set_providers, sizeof(__pyx_k_set_providers), 0, 0, 1, 1}, {&__pyx_n_s_set_provides, __pyx_k_set_provides, sizeof(__pyx_k_set_provides), 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_set_selector, __pyx_k_set_selector, sizeof(__pyx_k_set_selector), 0, 0, 1, 1}, + {&__pyx_n_s_set_strict, __pyx_k_set_strict, sizeof(__pyx_k_set_strict), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_settings, __pyx_k_settings, sizeof(__pyx_k_settings), 0, 0, 1, 1}, @@ -125468,21 +128841,21 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 382, __pyx_L1_error) __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 471, __pyx_L1_error) __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(1, 112, __pyx_L1_error) - __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(1, 3504, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(1, 3572, __pyx_L1_error) __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(1, 67, __pyx_L1_error) __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(1, 72, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 207, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 288, __pyx_L1_error) __pyx_builtin_DeprecationWarning = __Pyx_GetBuiltinName(__pyx_n_s_DeprecationWarning); if (!__pyx_builtin_DeprecationWarning) __PYX_ERR(1, 325, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(1, 385, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 616, __pyx_L1_error) - __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(1, 696, __pyx_L1_error) - __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(1, 704, __pyx_L1_error) - __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_n_s_filter); if (!__pyx_builtin_filter) __PYX_ERR(1, 1165, __pyx_L1_error) - __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(1, 1508, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 1620, __pyx_L1_error) - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(1, 2432, __pyx_L1_error) - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(1, 3342, __pyx_L1_error) + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(1, 693, __pyx_L1_error) + __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(1, 701, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 722, __pyx_L1_error) + __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_n_s_filter); if (!__pyx_builtin_filter) __PYX_ERR(1, 1186, __pyx_L1_error) + __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(1, 1521, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 1633, __pyx_L1_error) + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(1, 2485, __pyx_L1_error) + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(1, 3410, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -125514,49 +128887,49 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "dependency_injector/providers.pyx":1221 + /* "dependency_injector/providers.pyx":1242 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" * raise NotImplementedError('Abstract provider forward providing logic ' # <<<<<<<<<<<<<< * 'to overriding provider') * */ - __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_Abstract_provider_forward_provid); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 1221, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__12); - __Pyx_GIVEREF(__pyx_tuple__12); + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Abstract_provider_forward_provid); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 1242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); - /* "dependency_injector/providers.pyx":1620 + /* "dependency_injector/providers.pyx":1633 * and (self._is_strict_mode_enabled() or required is True) \ * and not options: * raise ValueError('Can not use empty dictionary') # <<<<<<<<<<<<<< * * try: */ - __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Can_not_use_empty_dictionary); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 1620, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__17); - __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Can_not_use_empty_dictionary); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 1633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); - /* "dependency_injector/providers.pyx":2433 + /* "dependency_injector/providers.pyx":2486 * factory_name = kwargs.pop('factory_name') * except KeyError: * raise TypeError('Factory missing 1 required positional argument: \'factory_name\'') # <<<<<<<<<<<<<< * else: * args = args[1:] */ - __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_Factory_missing_1_required_posit); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 2433, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); + __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Factory_missing_1_required_posit); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 2486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__26); + __Pyx_GIVEREF(__pyx_tuple__26); - /* "dependency_injector/providers.pyx":3506 + /* "dependency_injector/providers.pyx":3574 * @staticmethod * def _is_resource_subclass(instance): * if sys.version_info < (3, 5): # <<<<<<<<<<<<<< * return False * if not isinstance(instance, CLASS_TYPES): */ - __pyx_tuple__28 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_5); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 3506, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__28); - __Pyx_GIVEREF(__pyx_tuple__28); + __pyx_tuple__27 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_5); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 3574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); /* "cfunc.to_py":65 * @cname("__Pyx_CFunc_void____object____object____object____object___to_py") @@ -125565,22 +128938,22 @@ 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__34 = 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__34)) __PYX_ERR(2, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__34); - __Pyx_GIVEREF(__pyx_tuple__34); - __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(2, 65, __pyx_L1_error) - __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_future_result, __pyx_n_s_future); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(2, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__36); - __Pyx_GIVEREF(__pyx_tuple__36); - __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(2, 65, __pyx_L1_error) - __pyx_tuple__38 = PyTuple_Pack(3, __pyx_n_s_future_result, __pyx_n_s_call_2, __pyx_n_s_future); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(2, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__38); - __Pyx_GIVEREF(__pyx_tuple__38); - __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(2, 65, __pyx_L1_error) - __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_future_result, __pyx_n_s_future); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(2, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__40); - __Pyx_GIVEREF(__pyx_tuple__40); - __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__33 = 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__33)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_s_future_result, __pyx_n_s_future); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); + __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_future_result, __pyx_n_s_call_2, __pyx_n_s_future); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__37); + __Pyx_GIVEREF(__pyx_tuple__37); + __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_future_result, __pyx_n_s_future); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(2, 65, __pyx_L1_error) /* "dependency_injector/providers.pyx":22 * _is_coroutine_marker = None @@ -125589,9 +128962,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * import asyncio.coroutines * _is_coroutine_marker = asyncio.coroutines._is_coroutine */ - __pyx_tuple__42 = PyTuple_Pack(3, __pyx_int_3, __pyx_int_5, __pyx_int_3); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 22, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__42); - __Pyx_GIVEREF(__pyx_tuple__42); + __pyx_tuple__41 = PyTuple_Pack(3, __pyx_int_3, __pyx_int_5, __pyx_int_3); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(1, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); /* "dependency_injector/providers.pyx":66 * """Interpolation which expands environment variables in values.""" @@ -125600,10 +128973,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * value = super().before_get(parser, section, option, value, defaults) * return os.path.expandvars(value) */ - __pyx_tuple__43 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_parser, __pyx_n_s_section, __pyx_n_s_option, __pyx_n_s_value, __pyx_n_s_defaults); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(1, 66, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__43); - __Pyx_GIVEREF(__pyx_tuple__43); - __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_before_get, 66, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(1, 66, __pyx_L1_error) + __pyx_tuple__42 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_parser, __pyx_n_s_section, __pyx_n_s_option, __pyx_n_s_value, __pyx_n_s_defaults); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__42); + __Pyx_GIVEREF(__pyx_tuple__42); + __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_before_get, 66, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(1, 66, __pyx_L1_error) /* "dependency_injector/providers.pyx":70 * return os.path.expandvars(value) @@ -125612,10 +128985,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * parser = iniconfigparser.ConfigParser(interpolation=EnvInterpolation()) * with open(filepath) as config_file: */ - __pyx_tuple__45 = PyTuple_Pack(3, __pyx_n_s_filepath, __pyx_n_s_parser, __pyx_n_s_config_file); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__45); - __Pyx_GIVEREF(__pyx_tuple__45); - __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_parse_ini_file, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(1, 70, __pyx_L1_error) + __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_filepath, __pyx_n_s_parser, __pyx_n_s_config_file); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__44); + __Pyx_GIVEREF(__pyx_tuple__44); + __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_parse_ini_file, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(1, 70, __pyx_L1_error) /* "dependency_injector/providers.pyx":78 * import StringIO @@ -125624,10 +128997,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * parser = iniconfigparser.ConfigParser() * with open(filepath) as config_file: */ - __pyx_tuple__47 = PyTuple_Pack(4, __pyx_n_s_filepath, __pyx_n_s_parser, __pyx_n_s_config_file, __pyx_n_s_config_string); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__47); - __Pyx_GIVEREF(__pyx_tuple__47); - __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_parse_ini_file, 78, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(1, 78, __pyx_L1_error) + __pyx_tuple__46 = PyTuple_Pack(4, __pyx_n_s_filepath, __pyx_n_s_parser, __pyx_n_s_config_file, __pyx_n_s_config_string); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__46); + __Pyx_GIVEREF(__pyx_tuple__46); + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_parse_ini_file, 78, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(1, 78, __pyx_L1_error) /* "dependency_injector/providers.pyx":88 * if yaml: @@ -125636,9 +129009,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def yaml_env_marker_constructor(_, node): * """"Replace environment variable marker with its value.""" */ - __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s__49); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(1, 88, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__50); - __Pyx_GIVEREF(__pyx_tuple__50); + __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s__48); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); /* "dependency_injector/providers.pyx":89 * # TODO: use SafeLoader without env interpolation by default in version 5.* @@ -125647,304 +129020,304 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """"Replace environment variable marker with its value.""" * return os.path.expandvars(node.value) */ - __pyx_tuple__51 = PyTuple_Pack(2, __pyx_n_s__2, __pyx_n_s_node); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(1, 89, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__51); - __Pyx_GIVEREF(__pyx_tuple__51); - __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_yaml_env_marker_constructor, 89, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(1, 89, __pyx_L1_error) + __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_s__2, __pyx_n_s_node); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(1, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__50); + __Pyx_GIVEREF(__pyx_tuple__50); + __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_yaml_env_marker_constructor, 89, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(1, 89, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3505 + /* "dependency_injector/providers.pyx":3573 * * @staticmethod * def _is_resource_subclass(instance): # <<<<<<<<<<<<<< * if sys.version_info < (3, 5): * return False */ - __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_instance, __pyx_n_s_resources); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(1, 3505, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__53); - __Pyx_GIVEREF(__pyx_tuple__53); - __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_is_resource_subclass, 3505, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(1, 3505, __pyx_L1_error) + __pyx_tuple__52 = PyTuple_Pack(2, __pyx_n_s_instance, __pyx_n_s_resources); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(1, 3573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__52); + __Pyx_GIVEREF(__pyx_tuple__52); + __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_is_resource_subclass, 3573, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(1, 3573, __pyx_L1_error) - /* "dependency_injector/providers.pyx":3514 + /* "dependency_injector/providers.pyx":3582 * * @staticmethod * def _is_async_resource_subclass(instance): # <<<<<<<<<<<<<< * if sys.version_info < (3, 5): * return False */ - __pyx_tuple__55 = PyTuple_Pack(2, __pyx_n_s_instance, __pyx_n_s_resources); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 3514, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__55); - __Pyx_GIVEREF(__pyx_tuple__55); - __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_is_async_resource_subclass, 3514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(1, 3514, __pyx_L1_error) + __pyx_tuple__54 = PyTuple_Pack(2, __pyx_n_s_instance, __pyx_n_s_resources); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 3582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__54); + __Pyx_GIVEREF(__pyx_tuple__54); + __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_is_async_resource_subclass, 3582, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(1, 3582, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4356 + /* "dependency_injector/providers.pyx":4506 * * * def __add_sys_streams(memo): # <<<<<<<<<<<<<< * """Add system streams to memo dictionary. * */ - __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(1, 4356, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__57); - __Pyx_GIVEREF(__pyx_tuple__57); - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_add_sys_streams, 4356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(1, 4356, __pyx_L1_error) + __pyx_tuple__56 = PyTuple_Pack(1, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(1, 4506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__56); + __Pyx_GIVEREF(__pyx_tuple__56); + __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_add_sys_streams, 4506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(1, 4506, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4367 + /* "dependency_injector/providers.pyx":4517 * * * def merge_dicts(dict1, dict2): # <<<<<<<<<<<<<< * """Merge dictionaries recursively. * */ - __pyx_tuple__59 = PyTuple_Pack(5, __pyx_n_s_dict1, __pyx_n_s_dict2, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_result); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(1, 4367, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__59); - __Pyx_GIVEREF(__pyx_tuple__59); - __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_merge_dicts, 4367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 4367, __pyx_L1_error) + __pyx_tuple__58 = PyTuple_Pack(5, __pyx_n_s_dict1, __pyx_n_s_dict2, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_result); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(1, 4517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__58); + __Pyx_GIVEREF(__pyx_tuple__58); + __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_merge_dicts, 4517, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(1, 4517, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4388 + /* "dependency_injector/providers.pyx":4538 * * * def traverse(*providers, types=None): # <<<<<<<<<<<<<< * """Return providers traversal generator.""" * visited = set() */ - __pyx_tuple__61 = PyTuple_Pack(6, __pyx_n_s_types, __pyx_n_s_providers, __pyx_n_s_visited, __pyx_n_s_to_visit, __pyx_n_s_visiting, __pyx_n_s_child); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(1, 4388, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__61); - __Pyx_GIVEREF(__pyx_tuple__61); - __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(0, 1, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_traverse, 4388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 4388, __pyx_L1_error) + __pyx_tuple__60 = PyTuple_Pack(6, __pyx_n_s_types, __pyx_n_s_providers, __pyx_n_s_visited, __pyx_n_s_to_visit, __pyx_n_s_visiting, __pyx_n_s_child); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(1, 4538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__60); + __Pyx_GIVEREF(__pyx_tuple__60); + __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(0, 1, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_traverse, 4538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(1, 4538, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4411 + /* "dependency_injector/providers.pyx":4561 * * * def isawaitable(obj): # <<<<<<<<<<<<<< * """Check if object is a coroutine function. * */ - __pyx_tuple__62 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 4411, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__62); - __Pyx_GIVEREF(__pyx_tuple__62); - __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_isawaitable, 4411, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(1, 4411, __pyx_L1_error) + __pyx_tuple__61 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(1, 4561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__61); + __Pyx_GIVEREF(__pyx_tuple__61); + __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_isawaitable, 4561, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(1, 4561, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4422 + /* "dependency_injector/providers.pyx":4572 * * * def iscoroutinefunction(obj): # <<<<<<<<<<<<<< * """Check if object is a coroutine function. * */ - __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(1, 4422, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__64); - __Pyx_GIVEREF(__pyx_tuple__64); - __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_iscoroutinefunction, 4422, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(1, 4422, __pyx_L1_error) + __pyx_tuple__63 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(1, 4572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__63); + __Pyx_GIVEREF(__pyx_tuple__63); + __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_iscoroutinefunction, 4572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(1, 4572, __pyx_L1_error) - /* "dependency_injector/providers.pyx":4433 + /* "dependency_injector/providers.pyx":4583 * * * def isasyncgenfunction(obj): # <<<<<<<<<<<<<< * """Check if object is an asynchronous generator function. * */ - __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(1, 4433, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__66); - __Pyx_GIVEREF(__pyx_tuple__66); - __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_isasyncgenfunction, 4433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(1, 4433, __pyx_L1_error) + __pyx_tuple__65 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(1, 4583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__65); + __Pyx_GIVEREF(__pyx_tuple__65); + __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_isasyncgenfunction, 4583, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(1, 4583, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_Provider(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_tuple__68 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__68); - __Pyx_GIVEREF(__pyx_tuple__68); - __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Provider, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__70 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__70); - __Pyx_GIVEREF(__pyx_tuple__70); - __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Object, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__72 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__72); - __Pyx_GIVEREF(__pyx_tuple__72); - __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Self, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__74 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__74); - __Pyx_GIVEREF(__pyx_tuple__74); - __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Delegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__76 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__76); - __Pyx_GIVEREF(__pyx_tuple__76); - __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Dependency, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__78 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__78); - __Pyx_GIVEREF(__pyx_tuple__78); - __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ExternalDependenc, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__80 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__80); - __Pyx_GIVEREF(__pyx_tuple__80); - __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DependenciesConta, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__82 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__82); - __Pyx_GIVEREF(__pyx_tuple__82); - __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Callable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__84 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__84); - __Pyx_GIVEREF(__pyx_tuple__84); - __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedCallable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__86 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__86); - __Pyx_GIVEREF(__pyx_tuple__86); - __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractCallable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__88 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__88); - __Pyx_GIVEREF(__pyx_tuple__88); - __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CallableDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__90 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__90); - __Pyx_GIVEREF(__pyx_tuple__90); - __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Coroutine, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__92 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__92); - __Pyx_GIVEREF(__pyx_tuple__92); - __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedCoroutin, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__94 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__94); - __Pyx_GIVEREF(__pyx_tuple__94); - __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractCoroutine, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__96 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__96); - __Pyx_GIVEREF(__pyx_tuple__96); - __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CoroutineDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__98 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__98); - __Pyx_GIVEREF(__pyx_tuple__98); - __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ConfigurationOpti, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__100 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__100); - __Pyx_GIVEREF(__pyx_tuple__100); - __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TypedConfiguratio, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__102 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__102); - __Pyx_GIVEREF(__pyx_tuple__102); - __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Configuration, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__104 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__104); - __Pyx_GIVEREF(__pyx_tuple__104); - __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Factory, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__106 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__106); - __Pyx_GIVEREF(__pyx_tuple__106); - __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedFactory, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__108 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__108); - __Pyx_GIVEREF(__pyx_tuple__108); - __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractFactory, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__110 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__110); - __Pyx_GIVEREF(__pyx_tuple__110); - __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FactoryDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__112 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__112); - __Pyx_GIVEREF(__pyx_tuple__112); - __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FactoryAggregate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__114 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__114); - __Pyx_GIVEREF(__pyx_tuple__114); - __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BaseSingleton, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__116 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__116); - __Pyx_GIVEREF(__pyx_tuple__116); - __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Singleton, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__118 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__118); - __Pyx_GIVEREF(__pyx_tuple__118); - __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedSingleto, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__120 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__120); - __Pyx_GIVEREF(__pyx_tuple__120); - __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ThreadSafeSinglet, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__122 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__122); - __Pyx_GIVEREF(__pyx_tuple__122); - __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedThreadSa, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__124 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__124); - __Pyx_GIVEREF(__pyx_tuple__124); - __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ThreadLocalSingle, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__126 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__126); - __Pyx_GIVEREF(__pyx_tuple__126); - __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedThreadLo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__128 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__128); - __Pyx_GIVEREF(__pyx_tuple__128); - __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractSingleton, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__130 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__130); - __Pyx_GIVEREF(__pyx_tuple__130); - __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SingletonDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__132 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__132); - __Pyx_GIVEREF(__pyx_tuple__132); - __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_List, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__134 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__134); - __Pyx_GIVEREF(__pyx_tuple__134); - __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Dict, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__136 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__136); - __Pyx_GIVEREF(__pyx_tuple__136); - __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Resource, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__138 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__138); - __Pyx_GIVEREF(__pyx_tuple__138); - __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Container, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__140 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__140); - __Pyx_GIVEREF(__pyx_tuple__140); - __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Selector, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__142 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__142); - __Pyx_GIVEREF(__pyx_tuple__142); - __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ProvidedInstance, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__144 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__144); - __Pyx_GIVEREF(__pyx_tuple__144); - __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AttributeGetter, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__146 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__146); - __Pyx_GIVEREF(__pyx_tuple__146); - __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ItemGetter, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__148 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__148); - __Pyx_GIVEREF(__pyx_tuple__148); - __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_MethodCaller, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__150 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__150); - __Pyx_GIVEREF(__pyx_tuple__150); - __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Injection, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__152 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__152); - __Pyx_GIVEREF(__pyx_tuple__152); - __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PositionalInjecti, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__154 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__154); - __Pyx_GIVEREF(__pyx_tuple__154); - __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_NamedInjection, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__156 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__156); - __Pyx_GIVEREF(__pyx_tuple__156); - __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_OverridingContext, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__158 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__158); - __Pyx_GIVEREF(__pyx_tuple__158); - __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BaseSingletonRese, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__160 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__160); - __Pyx_GIVEREF(__pyx_tuple__160); - __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SingletonResetCon, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__162 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__162); - __Pyx_GIVEREF(__pyx_tuple__162); - __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SingletonFullRese, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__67 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__67); + __Pyx_GIVEREF(__pyx_tuple__67); + __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Provider, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__69 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__69); + __Pyx_GIVEREF(__pyx_tuple__69); + __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Object, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__71 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__71); + __Pyx_GIVEREF(__pyx_tuple__71); + __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Self, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__73 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__73); + __Pyx_GIVEREF(__pyx_tuple__73); + __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Delegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__75 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__75); + __Pyx_GIVEREF(__pyx_tuple__75); + __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Dependency, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__77 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__77); + __Pyx_GIVEREF(__pyx_tuple__77); + __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ExternalDependenc, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__79 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DependenciesConta, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__81 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Callable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__83 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__83); + __Pyx_GIVEREF(__pyx_tuple__83); + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedCallable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__85 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); + __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractCallable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__87 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__87); + __Pyx_GIVEREF(__pyx_tuple__87); + __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CallableDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__89 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__89); + __Pyx_GIVEREF(__pyx_tuple__89); + __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Coroutine, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__91 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__91); + __Pyx_GIVEREF(__pyx_tuple__91); + __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedCoroutin, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__93 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__93); + __Pyx_GIVEREF(__pyx_tuple__93); + __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractCoroutine, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__95 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__95); + __Pyx_GIVEREF(__pyx_tuple__95); + __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CoroutineDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__97 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__97); + __Pyx_GIVEREF(__pyx_tuple__97); + __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ConfigurationOpti, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__99 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__99); + __Pyx_GIVEREF(__pyx_tuple__99); + __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TypedConfiguratio, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__101 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__101); + __Pyx_GIVEREF(__pyx_tuple__101); + __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Configuration, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__103 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__103); + __Pyx_GIVEREF(__pyx_tuple__103); + __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Factory, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__105 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__105); + __Pyx_GIVEREF(__pyx_tuple__105); + __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedFactory, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__107 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__107); + __Pyx_GIVEREF(__pyx_tuple__107); + __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractFactory, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__109 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__109); + __Pyx_GIVEREF(__pyx_tuple__109); + __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FactoryDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__111 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__111); + __Pyx_GIVEREF(__pyx_tuple__111); + __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FactoryAggregate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__113 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__113); + __Pyx_GIVEREF(__pyx_tuple__113); + __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BaseSingleton, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__115 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__115); + __Pyx_GIVEREF(__pyx_tuple__115); + __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Singleton, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__117 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__117); + __Pyx_GIVEREF(__pyx_tuple__117); + __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedSingleto, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__119 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__119); + __Pyx_GIVEREF(__pyx_tuple__119); + __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ThreadSafeSinglet, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__121 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__121); + __Pyx_GIVEREF(__pyx_tuple__121); + __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedThreadSa, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__123 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__123); + __Pyx_GIVEREF(__pyx_tuple__123); + __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ThreadLocalSingle, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__125 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__125); + __Pyx_GIVEREF(__pyx_tuple__125); + __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedThreadLo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__127 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__127); + __Pyx_GIVEREF(__pyx_tuple__127); + __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractSingleton, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__129 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__129); + __Pyx_GIVEREF(__pyx_tuple__129); + __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SingletonDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__131 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__131); + __Pyx_GIVEREF(__pyx_tuple__131); + __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_List, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__133 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__133); + __Pyx_GIVEREF(__pyx_tuple__133); + __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Dict, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__135 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__135); + __Pyx_GIVEREF(__pyx_tuple__135); + __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Resource, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__137 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__137); + __Pyx_GIVEREF(__pyx_tuple__137); + __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Container, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__139 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__139); + __Pyx_GIVEREF(__pyx_tuple__139); + __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Selector, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__141 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__141); + __Pyx_GIVEREF(__pyx_tuple__141); + __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ProvidedInstance, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__143 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__143); + __Pyx_GIVEREF(__pyx_tuple__143); + __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AttributeGetter, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__145 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__145); + __Pyx_GIVEREF(__pyx_tuple__145); + __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ItemGetter, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__147 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__147); + __Pyx_GIVEREF(__pyx_tuple__147); + __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_MethodCaller, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__149 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__149); + __Pyx_GIVEREF(__pyx_tuple__149); + __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Injection, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__151 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__151); + __Pyx_GIVEREF(__pyx_tuple__151); + __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PositionalInjecti, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__153 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__153); + __Pyx_GIVEREF(__pyx_tuple__153); + __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_NamedInjection, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__155 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__155); + __Pyx_GIVEREF(__pyx_tuple__155); + __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_OverridingContext, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__157 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__157); + __Pyx_GIVEREF(__pyx_tuple__157); + __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BaseSingletonRese, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__159 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__159); + __Pyx_GIVEREF(__pyx_tuple__159); + __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SingletonResetCon, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__161 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__161); + __Pyx_GIVEREF(__pyx_tuple__161); + __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SingletonFullRese, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -125971,20 +129344,17 @@ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { __pyx_int_65022886 = PyInt_FromLong(65022886L); if (unlikely(!__pyx_int_65022886)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_69951814 = PyInt_FromLong(69951814L); if (unlikely(!__pyx_int_69951814)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_70248545 = PyInt_FromLong(70248545L); if (unlikely(!__pyx_int_70248545)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_int_99685125 = PyInt_FromLong(99685125L); if (unlikely(!__pyx_int_99685125)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_int_103715212 = PyInt_FromLong(103715212L); if (unlikely(!__pyx_int_103715212)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_105855327 = PyInt_FromLong(105855327L); if (unlikely(!__pyx_int_105855327)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_111758699 = PyInt_FromLong(111758699L); if (unlikely(!__pyx_int_111758699)) __PYX_ERR(1, 1, __pyx_L1_error) - __pyx_int_120901579 = PyInt_FromLong(120901579L); if (unlikely(!__pyx_int_120901579)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_122966839 = PyInt_FromLong(122966839L); if (unlikely(!__pyx_int_122966839)) __PYX_ERR(1, 1, __pyx_L1_error) - __pyx_int_132941027 = PyInt_FromLong(132941027L); if (unlikely(!__pyx_int_132941027)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_152985532 = PyInt_FromLong(152985532L); if (unlikely(!__pyx_int_152985532)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_160436077 = PyInt_FromLong(160436077L); if (unlikely(!__pyx_int_160436077)) __PYX_ERR(1, 1, __pyx_L1_error) - __pyx_int_168129982 = PyInt_FromLong(168129982L); if (unlikely(!__pyx_int_168129982)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_170282226 = PyInt_FromLong(170282226L); if (unlikely(!__pyx_int_170282226)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_180627541 = PyInt_FromLong(180627541L); if (unlikely(!__pyx_int_180627541)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_216322617 = PyInt_FromLong(216322617L); if (unlikely(!__pyx_int_216322617)) __PYX_ERR(1, 1, __pyx_L1_error) - __pyx_int_240604463 = PyInt_FromLong(240604463L); if (unlikely(!__pyx_int_240604463)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_254598103 = PyInt_FromLong(254598103L); if (unlikely(!__pyx_int_254598103)) __PYX_ERR(1, 1, __pyx_L1_error) - __pyx_int_265687189 = PyInt_FromLong(265687189L); if (unlikely(!__pyx_int_265687189)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_267092376 = PyInt_FromLong(267092376L); if (unlikely(!__pyx_int_267092376)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_267861151 = PyInt_FromLong(267861151L); if (unlikely(!__pyx_int_267861151)) __PYX_ERR(1, 1, __pyx_L1_error) return 0; @@ -126105,7 +129475,7 @@ static int __Pyx_modinit_type_init_code(void) { } #endif if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Provider.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Provider) < 0) __PYX_ERR(1, 119, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Provider_2, (PyObject *)&__pyx_type_19dependency_injector_9providers_Provider) < 0) __PYX_ERR(1, 119, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Provider_3, (PyObject *)&__pyx_type_19dependency_injector_9providers_Provider) < 0) __PYX_ERR(1, 119, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Provider) < 0) __PYX_ERR(1, 119, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Provider = &__pyx_type_19dependency_injector_9providers_Provider; __pyx_vtabptr_19dependency_injector_9providers_Object = &__pyx_vtable_19dependency_injector_9providers_Object; @@ -126157,7 +129527,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_19dependency_injector_9providers_Self.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_Self.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_4Self__provide; __pyx_type_19dependency_injector_9providers_Self.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Self) < 0) __PYX_ERR(1, 459, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Self) < 0) __PYX_ERR(1, 467, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Self.tp_print = 0; #endif @@ -126166,7 +129536,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Self, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 459, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Self, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 467, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_4Self___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_4Self___init__.doc = __pyx_doc_19dependency_injector_9providers_4Self___init__; @@ -126176,7 +129546,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Self, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 459, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Self, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 467, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_4Self_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_4Self_4__str__.doc = __pyx_doc_19dependency_injector_9providers_4Self_4__str__; @@ -126186,7 +129556,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Self, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 459, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Self, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 467, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_4Self_6__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_4Self_6__repr__.doc = __pyx_doc_19dependency_injector_9providers_4Self_6__repr__; @@ -126194,15 +129564,15 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Self.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Self) < 0) __PYX_ERR(1, 459, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Self, (PyObject *)&__pyx_type_19dependency_injector_9providers_Self) < 0) __PYX_ERR(1, 459, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Self) < 0) __PYX_ERR(1, 459, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Self.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Self) < 0) __PYX_ERR(1, 467, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Self, (PyObject *)&__pyx_type_19dependency_injector_9providers_Self) < 0) __PYX_ERR(1, 467, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Self) < 0) __PYX_ERR(1, 467, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Self = &__pyx_type_19dependency_injector_9providers_Self; __pyx_vtabptr_19dependency_injector_9providers_Delegate = &__pyx_vtable_19dependency_injector_9providers_Delegate; __pyx_vtable_19dependency_injector_9providers_Delegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_Delegate.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Delegate__provide; __pyx_type_19dependency_injector_9providers_Delegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 512, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 520, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Delegate.tp_print = 0; #endif @@ -126211,7 +129581,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 512, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 520, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_8Delegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_8Delegate___init__.doc = __pyx_doc_19dependency_injector_9providers_8Delegate___init__; @@ -126221,7 +129591,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 512, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 520, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_8Delegate_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_8Delegate_4__str__.doc = __pyx_doc_19dependency_injector_9providers_8Delegate_4__str__; @@ -126231,7 +129601,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 512, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 520, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_8Delegate_6__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_8Delegate_6__repr__.doc = __pyx_doc_19dependency_injector_9providers_8Delegate_6__repr__; @@ -126239,20 +129609,20 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Delegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 512, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Delegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 512, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 512, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Delegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 520, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Delegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 520, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 520, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Delegate = &__pyx_type_19dependency_injector_9providers_Delegate; __pyx_vtabptr_19dependency_injector_9providers_Dependency = &__pyx_vtable_19dependency_injector_9providers_Dependency; __pyx_vtable_19dependency_injector_9providers_Dependency.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_type_19dependency_injector_9providers_Dependency.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 590, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 599, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Dependency.tp_print = 0; #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 590, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 599, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_10Dependency___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_10Dependency___init__.doc = __pyx_doc_19dependency_injector_9providers_10Dependency___init__; @@ -126262,7 +129632,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 590, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 599, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_10Dependency_4__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_10Dependency_4__call__.doc = __pyx_doc_19dependency_injector_9providers_10Dependency_4__call__; @@ -126272,7 +129642,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 590, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 599, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_10Dependency_8__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_10Dependency_8__str__.doc = __pyx_doc_19dependency_injector_9providers_10Dependency_8__str__; @@ -126282,7 +129652,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 590, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 599, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_10Dependency_10__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_10Dependency_10__repr__.doc = __pyx_doc_19dependency_injector_9providers_10Dependency_10__repr__; @@ -126290,35 +129660,35 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Dependency.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 590, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Dependency_2, (PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 590, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 590, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Dependency.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 599, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Dependency_2, (PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 599, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 599, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Dependency = &__pyx_type_19dependency_injector_9providers_Dependency; __pyx_vtabptr_19dependency_injector_9providers_ExternalDependency = &__pyx_vtable_19dependency_injector_9providers_ExternalDependency; __pyx_vtable_19dependency_injector_9providers_ExternalDependency.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Dependency; __pyx_type_19dependency_injector_9providers_ExternalDependency.tp_base = __pyx_ptype_19dependency_injector_9providers_Dependency; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 793, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 809, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_ExternalDependency.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_ExternalDependency.tp_dictoffset && __pyx_type_19dependency_injector_9providers_ExternalDependency.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_ExternalDependency.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ExternalDependency.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 793, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ExternalDependency, (PyObject *)&__pyx_type_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 793, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 793, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ExternalDependency.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 809, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ExternalDependency, (PyObject *)&__pyx_type_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 809, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 809, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ExternalDependency = &__pyx_type_19dependency_injector_9providers_ExternalDependency; __pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer = &__pyx_vtable_19dependency_injector_9providers_DependenciesContainer; __pyx_vtable_19dependency_injector_9providers_DependenciesContainer.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Object; __pyx_vtable_19dependency_injector_9providers_DependenciesContainer._override_providers = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_21DependenciesContainer__override_providers; __pyx_type_19dependency_injector_9providers_DependenciesContainer.tp_base = __pyx_ptype_19dependency_injector_9providers_Object; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 821, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 837, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_DependenciesContainer.tp_print = 0; #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_DependenciesContainer, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 821, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_DependenciesContainer, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 837, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer___init__.doc = __pyx_doc_19dependency_injector_9providers_21DependenciesContainer___init__; @@ -126328,7 +129698,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_DependenciesContainer, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 821, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_DependenciesContainer, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 837, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer_4__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer_4__getattr__.doc = __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_4__getattr__; @@ -126336,15 +129706,15 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DependenciesContainer.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 821, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DependenciesContainer, (PyObject *)&__pyx_type_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 821, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 821, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DependenciesContainer.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 837, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DependenciesContainer, (PyObject *)&__pyx_type_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 837, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 837, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DependenciesContainer = &__pyx_type_19dependency_injector_9providers_DependenciesContainer; __pyx_vtabptr_19dependency_injector_9providers_Callable = &__pyx_vtable_19dependency_injector_9providers_Callable; __pyx_vtable_19dependency_injector_9providers_Callable.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_Callable.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Callable__provide; __pyx_type_19dependency_injector_9providers_Callable.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 1001, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 1017, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Callable.tp_print = 0; #endif @@ -126353,7 +129723,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Callable, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1001, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Callable, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1017, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_8Callable___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_8Callable___init__.doc = __pyx_doc_19dependency_injector_9providers_8Callable___init__; @@ -126363,7 +129733,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Callable, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1001, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Callable, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1017, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_8Callable_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_8Callable_4__str__.doc = __pyx_doc_19dependency_injector_9providers_8Callable_4__str__; @@ -126371,29 +129741,29 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Callable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 1001, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Callable, (PyObject *)&__pyx_type_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 1001, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 1001, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Callable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 1017, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Callable, (PyObject *)&__pyx_type_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 1017, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 1017, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Callable = &__pyx_type_19dependency_injector_9providers_Callable; __pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable = &__pyx_vtable_19dependency_injector_9providers_DelegatedCallable; __pyx_vtable_19dependency_injector_9providers_DelegatedCallable.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Callable; __pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_base = __pyx_ptype_19dependency_injector_9providers_Callable; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 1175, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 1196, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 1175, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedCallable, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 1175, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 1175, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 1196, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedCallable, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 1196, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 1196, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedCallable = &__pyx_type_19dependency_injector_9providers_DelegatedCallable; __pyx_vtabptr_19dependency_injector_9providers_AbstractCallable = &__pyx_vtable_19dependency_injector_9providers_AbstractCallable; __pyx_vtable_19dependency_injector_9providers_AbstractCallable.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Callable; __pyx_vtable_19dependency_injector_9providers_AbstractCallable.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_16AbstractCallable__provide; __pyx_type_19dependency_injector_9providers_AbstractCallable.tp_base = __pyx_ptype_19dependency_injector_9providers_Callable; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 1184, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 1205, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_AbstractCallable.tp_print = 0; #endif @@ -126402,7 +129772,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCallable, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1184, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCallable, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1205, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_16AbstractCallable___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_16AbstractCallable___call__.doc = __pyx_doc_19dependency_injector_9providers_16AbstractCallable___call__; @@ -126410,14 +129780,14 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractCallable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 1184, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractCallable, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 1184, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 1184, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractCallable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 1205, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractCallable, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 1205, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 1205, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractCallable = &__pyx_type_19dependency_injector_9providers_AbstractCallable; __pyx_vtabptr_19dependency_injector_9providers_CallableDelegate = &__pyx_vtable_19dependency_injector_9providers_CallableDelegate; __pyx_vtable_19dependency_injector_9providers_CallableDelegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Delegate; __pyx_type_19dependency_injector_9providers_CallableDelegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Delegate; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 1225, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 1246, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_CallableDelegate.tp_print = 0; #endif @@ -126426,7 +129796,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_CallableDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1225, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_CallableDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1246, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_16CallableDelegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_16CallableDelegate___init__.doc = __pyx_doc_19dependency_injector_9providers_16CallableDelegate___init__; @@ -126434,53 +129804,43 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_CallableDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 1225, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CallableDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 1225, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 1225, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_CallableDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 1246, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CallableDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 1246, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 1246, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_CallableDelegate = &__pyx_type_19dependency_injector_9providers_CallableDelegate; __pyx_vtabptr_19dependency_injector_9providers_Coroutine = &__pyx_vtable_19dependency_injector_9providers_Coroutine; __pyx_vtable_19dependency_injector_9providers_Coroutine.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Callable; __pyx_type_19dependency_injector_9providers_Coroutine.tp_base = __pyx_ptype_19dependency_injector_9providers_Callable; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 1247, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 1268, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Coroutine.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Coroutine.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Coroutine.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_Coroutine.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - #if CYTHON_COMPILING_IN_CPYTHON - { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Coroutine, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1247, __pyx_L1_error) - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_19dependency_injector_9providers_9Coroutine___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_19dependency_injector_9providers_9Coroutine___init__.doc = __pyx_doc_19dependency_injector_9providers_9Coroutine___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_9Coroutine___init__; - } - } - #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Coroutine.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 1247, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Coroutine, (PyObject *)&__pyx_type_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 1247, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 1247, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Coroutine.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 1268, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Coroutine, (PyObject *)&__pyx_type_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 1268, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 1268, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Coroutine = &__pyx_type_19dependency_injector_9providers_Coroutine; __pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine = &__pyx_vtable_19dependency_injector_9providers_DelegatedCoroutine; __pyx_vtable_19dependency_injector_9providers_DelegatedCoroutine.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Coroutine; __pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_base = __pyx_ptype_19dependency_injector_9providers_Coroutine; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 1291, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 1304, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 1291, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedCoroutine, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 1291, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 1291, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 1304, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedCoroutine, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 1304, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 1304, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine = &__pyx_type_19dependency_injector_9providers_DelegatedCoroutine; __pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine = &__pyx_vtable_19dependency_injector_9providers_AbstractCoroutine; __pyx_vtable_19dependency_injector_9providers_AbstractCoroutine.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Coroutine; __pyx_vtable_19dependency_injector_9providers_AbstractCoroutine.__pyx_base.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_17AbstractCoroutine__provide; __pyx_type_19dependency_injector_9providers_AbstractCoroutine.tp_base = __pyx_ptype_19dependency_injector_9providers_Coroutine; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 1300, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 1313, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_AbstractCoroutine.tp_print = 0; #endif @@ -126489,7 +129849,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCoroutine, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1300, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCoroutine, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1313, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_17AbstractCoroutine___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_17AbstractCoroutine___call__.doc = __pyx_doc_19dependency_injector_9providers_17AbstractCoroutine___call__; @@ -126497,14 +129857,14 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractCoroutine.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 1300, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractCoroutine, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 1300, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 1300, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractCoroutine.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 1313, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractCoroutine, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 1313, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 1313, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractCoroutine = &__pyx_type_19dependency_injector_9providers_AbstractCoroutine; __pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate = &__pyx_vtable_19dependency_injector_9providers_CoroutineDelegate; __pyx_vtable_19dependency_injector_9providers_CoroutineDelegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Delegate; __pyx_type_19dependency_injector_9providers_CoroutineDelegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Delegate; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 1341, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 1354, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_CoroutineDelegate.tp_print = 0; #endif @@ -126513,7 +129873,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_CoroutineDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1341, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_CoroutineDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1354, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_17CoroutineDelegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_17CoroutineDelegate___init__.doc = __pyx_doc_19dependency_injector_9providers_17CoroutineDelegate___init__; @@ -126521,53 +129881,53 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_CoroutineDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 1341, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CoroutineDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 1341, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 1341, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_CoroutineDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 1354, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CoroutineDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 1354, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 1354, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_CoroutineDelegate = &__pyx_type_19dependency_injector_9providers_CoroutineDelegate; __pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption = &__pyx_vtable_19dependency_injector_9providers_ConfigurationOption; __pyx_vtable_19dependency_injector_9providers_ConfigurationOption.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_ConfigurationOption.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_19ConfigurationOption__provide; __pyx_type_19dependency_injector_9providers_ConfigurationOption.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ConfigurationOption) < 0) __PYX_ERR(1, 1363, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ConfigurationOption) < 0) __PYX_ERR(1, 1376, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_ConfigurationOption.tp_print = 0; #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ConfigurationOption.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption) < 0) __PYX_ERR(1, 1363, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ConfigurationOption, (PyObject *)&__pyx_type_19dependency_injector_9providers_ConfigurationOption) < 0) __PYX_ERR(1, 1363, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ConfigurationOption) < 0) __PYX_ERR(1, 1363, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ConfigurationOption.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption) < 0) __PYX_ERR(1, 1376, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ConfigurationOption, (PyObject *)&__pyx_type_19dependency_injector_9providers_ConfigurationOption) < 0) __PYX_ERR(1, 1376, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ConfigurationOption) < 0) __PYX_ERR(1, 1376, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ConfigurationOption = &__pyx_type_19dependency_injector_9providers_ConfigurationOption; __pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption = &__pyx_vtable_19dependency_injector_9providers_TypedConfigurationOption; __pyx_vtable_19dependency_injector_9providers_TypedConfigurationOption.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Callable; __pyx_type_19dependency_injector_9providers_TypedConfigurationOption.tp_base = __pyx_ptype_19dependency_injector_9providers_Callable; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_TypedConfigurationOption) < 0) __PYX_ERR(1, 1667, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_TypedConfigurationOption) < 0) __PYX_ERR(1, 1680, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_TypedConfigurationOption.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_TypedConfigurationOption.tp_dictoffset && __pyx_type_19dependency_injector_9providers_TypedConfigurationOption.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_TypedConfigurationOption.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_TypedConfigurationOption.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption) < 0) __PYX_ERR(1, 1667, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TypedConfigurationOption, (PyObject *)&__pyx_type_19dependency_injector_9providers_TypedConfigurationOption) < 0) __PYX_ERR(1, 1667, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_TypedConfigurationOption) < 0) __PYX_ERR(1, 1667, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_TypedConfigurationOption.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption) < 0) __PYX_ERR(1, 1680, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TypedConfigurationOption, (PyObject *)&__pyx_type_19dependency_injector_9providers_TypedConfigurationOption) < 0) __PYX_ERR(1, 1680, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_TypedConfigurationOption) < 0) __PYX_ERR(1, 1680, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption = &__pyx_type_19dependency_injector_9providers_TypedConfigurationOption; __pyx_vtabptr_19dependency_injector_9providers_Configuration = &__pyx_vtable_19dependency_injector_9providers_Configuration; __pyx_vtable_19dependency_injector_9providers_Configuration.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Object; __pyx_type_19dependency_injector_9providers_Configuration.tp_base = __pyx_ptype_19dependency_injector_9providers_Object; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 1674, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 1687, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Configuration.tp_print = 0; #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Configuration.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 1674, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Configuration, (PyObject *)&__pyx_type_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 1674, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Configuration.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 1687, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Configuration, (PyObject *)&__pyx_type_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 1687, __pyx_L1_error) if (__pyx_type_19dependency_injector_9providers_Configuration.tp_weaklistoffset == 0) __pyx_type_19dependency_injector_9providers_Configuration.tp_weaklistoffset = offsetof(struct __pyx_obj_19dependency_injector_9providers_Configuration, __weakref__); - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 1674, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 1687, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Configuration = &__pyx_type_19dependency_injector_9providers_Configuration; __pyx_vtabptr_19dependency_injector_9providers_Factory = &__pyx_vtable_19dependency_injector_9providers_Factory; __pyx_vtable_19dependency_injector_9providers_Factory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_Factory.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_7Factory__provide; __pyx_type_19dependency_injector_9providers_Factory.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 2037, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 2081, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Factory.tp_print = 0; #endif @@ -126576,7 +129936,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Factory, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2037, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Factory, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2081, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_7Factory___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_7Factory___init__.doc = __pyx_doc_19dependency_injector_9providers_7Factory___init__; @@ -126586,7 +129946,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Factory, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2037, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Factory, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2081, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_7Factory_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_7Factory_4__str__.doc = __pyx_doc_19dependency_injector_9providers_7Factory_4__str__; @@ -126594,29 +129954,29 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Factory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 2037, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Factory, (PyObject *)&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 2037, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 2037, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Factory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 2081, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Factory, (PyObject *)&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 2081, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 2081, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Factory = &__pyx_type_19dependency_injector_9providers_Factory; __pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory = &__pyx_vtable_19dependency_injector_9providers_DelegatedFactory; __pyx_vtable_19dependency_injector_9providers_DelegatedFactory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Factory; __pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_base = __pyx_ptype_19dependency_injector_9providers_Factory; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 2263, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 2316, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 2263, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedFactory, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 2263, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 2263, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 2316, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedFactory, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 2316, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 2316, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedFactory = &__pyx_type_19dependency_injector_9providers_DelegatedFactory; __pyx_vtabptr_19dependency_injector_9providers_AbstractFactory = &__pyx_vtable_19dependency_injector_9providers_AbstractFactory; __pyx_vtable_19dependency_injector_9providers_AbstractFactory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Factory; __pyx_vtable_19dependency_injector_9providers_AbstractFactory.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_15AbstractFactory__provide; __pyx_type_19dependency_injector_9providers_AbstractFactory.tp_base = __pyx_ptype_19dependency_injector_9providers_Factory; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 2285, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 2338, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_AbstractFactory.tp_print = 0; #endif @@ -126625,7 +129985,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2285, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2338, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_15AbstractFactory___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_15AbstractFactory___call__.doc = __pyx_doc_19dependency_injector_9providers_15AbstractFactory___call__; @@ -126633,14 +129993,14 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 2285, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractFactory, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 2285, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 2285, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 2338, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractFactory, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 2338, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 2338, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractFactory = &__pyx_type_19dependency_injector_9providers_AbstractFactory; __pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate = &__pyx_vtable_19dependency_injector_9providers_FactoryDelegate; __pyx_vtable_19dependency_injector_9providers_FactoryDelegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Delegate; __pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Delegate; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 2326, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 2379, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_print = 0; #endif @@ -126649,7 +130009,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2326, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2379, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_15FactoryDelegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_15FactoryDelegate___init__.doc = __pyx_doc_19dependency_injector_9providers_15FactoryDelegate___init__; @@ -126657,22 +130017,22 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 2326, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FactoryDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 2326, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 2326, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 2379, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FactoryDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 2379, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 2379, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_FactoryDelegate = &__pyx_type_19dependency_injector_9providers_FactoryDelegate; __pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate = &__pyx_vtable_19dependency_injector_9providers_FactoryAggregate; __pyx_vtable_19dependency_injector_9providers_FactoryAggregate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_FactoryAggregate.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_16FactoryAggregate__provide; __pyx_vtable_19dependency_injector_9providers_FactoryAggregate.__pyx___get_factory = (struct __pyx_obj_19dependency_injector_9providers_Factory *(*)(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *, PyObject *))__pyx_f_19dependency_injector_9providers_16FactoryAggregate___get_factory; __pyx_type_19dependency_injector_9providers_FactoryAggregate.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 2348, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 2401, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_FactoryAggregate.tp_print = 0; #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2348, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2401, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate___init__.doc = __pyx_doc_19dependency_injector_9providers_16FactoryAggregate___init__; @@ -126682,7 +130042,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2348, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2401, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_4__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_4__getattr__.doc = __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_4__getattr__; @@ -126692,7 +130052,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2348, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2401, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_6__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_6__str__.doc = __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_6__str__; @@ -126700,14 +130060,14 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_FactoryAggregate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 2348, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FactoryAggregate, (PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 2348, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 2348, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_FactoryAggregate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 2401, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FactoryAggregate, (PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 2401, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 2401, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_FactoryAggregate = &__pyx_type_19dependency_injector_9providers_FactoryAggregate; __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton = &__pyx_vtable_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_BaseSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_type_19dependency_injector_9providers_BaseSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 2447, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 2500, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_BaseSingleton.tp_print = 0; #endif @@ -126716,7 +130076,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2447, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2500, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_13BaseSingleton___init__; @@ -126726,7 +130086,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2447, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2500, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton_2__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton_2__str__.doc = __pyx_doc_19dependency_injector_9providers_13BaseSingleton_2__str__; @@ -126734,15 +130094,15 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 2447, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 2447, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 2447, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 2500, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 2500, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 2500, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_BaseSingleton = &__pyx_type_19dependency_injector_9providers_BaseSingleton; __pyx_vtabptr_19dependency_injector_9providers_Singleton = &__pyx_vtable_19dependency_injector_9providers_Singleton; __pyx_vtable_19dependency_injector_9providers_Singleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_Singleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_9Singleton__provide; __pyx_type_19dependency_injector_9providers_Singleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 2634, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 2695, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Singleton.tp_print = 0; #endif @@ -126751,7 +130111,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2634, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2695, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_9Singleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_9Singleton___init__.doc = __pyx_doc_19dependency_injector_9providers_9Singleton___init__; @@ -126759,29 +130119,29 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Singleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 2634, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Singleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 2634, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 2634, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Singleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 2695, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Singleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 2695, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 2695, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Singleton = &__pyx_type_19dependency_injector_9providers_Singleton; __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedSingleton; __pyx_vtable_19dependency_injector_9providers_DelegatedSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Singleton; __pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_Singleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 2702, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 2763, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 2702, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 2702, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 2702, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 2763, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 2763, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 2763, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedSingleton; __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton = &__pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide; __pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 2724, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 2785, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_print = 0; #endif @@ -126790,7 +130150,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2724, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2785, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_19ThreadSafeSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_19ThreadSafeSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_19ThreadSafeSingleton___init__; @@ -126798,29 +130158,29 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 2724, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadSafeSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 2724, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 2724, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 2785, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadSafeSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 2785, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 2785, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton = &__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton; __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedThreadSafeSingleton; __pyx_vtable_19dependency_injector_9providers_DelegatedThreadSafeSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton; __pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 2775, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 2836, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 2775, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedThreadSafeSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 2775, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 2775, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 2836, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedThreadSafeSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 2836, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 2836, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton; __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton = &__pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide; __pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 2797, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 2858, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_print = 0; #endif @@ -126829,7 +130189,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2797, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2858, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_20ThreadLocalSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_20ThreadLocalSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_20ThreadLocalSingleton___init__; @@ -126837,28 +130197,28 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 2797, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadLocalSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 2797, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 2797, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 2858, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadLocalSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 2858, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 2858, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton = &__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton; __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedThreadLocalSingleton; __pyx_vtable_19dependency_injector_9providers_DelegatedThreadLocalSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton; __pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 2873, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 2934, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 2873, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedThreadLocalSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 2873, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 2873, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 2934, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedThreadLocalSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 2934, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 2934, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton; __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton = &__pyx_vtable_19dependency_injector_9providers_AbstractSingleton; __pyx_vtable_19dependency_injector_9providers_AbstractSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 2895, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 2956, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_print = 0; #endif @@ -126867,7 +130227,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2895, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2956, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_17AbstractSingleton___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_17AbstractSingleton___call__.doc = __pyx_doc_19dependency_injector_9providers_17AbstractSingleton___call__; @@ -126875,14 +130235,14 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 2895, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 2895, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 2895, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 2956, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 2956, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 2956, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractSingleton = &__pyx_type_19dependency_injector_9providers_AbstractSingleton; __pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate = &__pyx_vtable_19dependency_injector_9providers_SingletonDelegate; __pyx_vtable_19dependency_injector_9providers_SingletonDelegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Delegate; __pyx_type_19dependency_injector_9providers_SingletonDelegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Delegate; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 2940, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 3001, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_SingletonDelegate.tp_print = 0; #endif @@ -126891,7 +130251,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_SingletonDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2940, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_SingletonDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3001, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_17SingletonDelegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_17SingletonDelegate___init__.doc = __pyx_doc_19dependency_injector_9providers_17SingletonDelegate___init__; @@ -126899,15 +130259,15 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_SingletonDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 2940, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SingletonDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 2940, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 2940, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_SingletonDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 3001, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SingletonDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 3001, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 3001, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_SingletonDelegate = &__pyx_type_19dependency_injector_9providers_SingletonDelegate; __pyx_vtabptr_19dependency_injector_9providers_List = &__pyx_vtable_19dependency_injector_9providers_List; __pyx_vtable_19dependency_injector_9providers_List.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_List.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_4List__provide; __pyx_type_19dependency_injector_9providers_List.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 2962, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 3023, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_List.tp_print = 0; #endif @@ -126916,7 +130276,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_List, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2962, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_List, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3023, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_4List___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_4List___init__.doc = __pyx_doc_19dependency_injector_9providers_4List___init__; @@ -126926,7 +130286,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_List, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2962, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_List, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3023, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_4List_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_4List_4__str__.doc = __pyx_doc_19dependency_injector_9providers_4List_4__str__; @@ -126934,15 +130294,15 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_List.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 2962, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_List, (PyObject *)&__pyx_type_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 2962, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 2962, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_List.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 3023, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_List, (PyObject *)&__pyx_type_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 3023, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 3023, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_List = &__pyx_type_19dependency_injector_9providers_List; __pyx_vtabptr_19dependency_injector_9providers_Dict = &__pyx_vtable_19dependency_injector_9providers_Dict; __pyx_vtable_19dependency_injector_9providers_Dict.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_Dict.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_4Dict__provide; __pyx_type_19dependency_injector_9providers_Dict.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Dict) < 0) __PYX_ERR(1, 3070, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Dict) < 0) __PYX_ERR(1, 3131, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Dict.tp_print = 0; #endif @@ -126951,7 +130311,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dict, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3070, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dict, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3131, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_4Dict___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_4Dict___init__.doc = __pyx_doc_19dependency_injector_9providers_4Dict___init__; @@ -126961,7 +130321,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dict, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3070, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dict, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3131, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_4Dict_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_4Dict_4__str__.doc = __pyx_doc_19dependency_injector_9providers_4Dict_4__str__; @@ -126969,15 +130329,15 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Dict.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Dict) < 0) __PYX_ERR(1, 3070, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Dict, (PyObject *)&__pyx_type_19dependency_injector_9providers_Dict) < 0) __PYX_ERR(1, 3070, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Dict) < 0) __PYX_ERR(1, 3070, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Dict.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Dict) < 0) __PYX_ERR(1, 3131, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Dict, (PyObject *)&__pyx_type_19dependency_injector_9providers_Dict) < 0) __PYX_ERR(1, 3131, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Dict) < 0) __PYX_ERR(1, 3131, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Dict = &__pyx_type_19dependency_injector_9providers_Dict; __pyx_vtabptr_19dependency_injector_9providers_Resource = &__pyx_vtable_19dependency_injector_9providers_Resource; __pyx_vtable_19dependency_injector_9providers_Resource.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_Resource.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Resource__provide; __pyx_type_19dependency_injector_9providers_Resource.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Resource) < 0) __PYX_ERR(1, 3188, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Resource) < 0) __PYX_ERR(1, 3249, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Resource.tp_print = 0; #endif @@ -126986,7 +130346,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Resource, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3188, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Resource, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3249, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_8Resource_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_8Resource_4__str__.doc = __pyx_doc_19dependency_injector_9providers_8Resource_4__str__; @@ -126994,21 +130354,21 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Resource.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Resource) < 0) __PYX_ERR(1, 3188, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Resource, (PyObject *)&__pyx_type_19dependency_injector_9providers_Resource) < 0) __PYX_ERR(1, 3188, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Resource) < 0) __PYX_ERR(1, 3188, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Resource.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Resource) < 0) __PYX_ERR(1, 3249, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Resource, (PyObject *)&__pyx_type_19dependency_injector_9providers_Resource) < 0) __PYX_ERR(1, 3249, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Resource) < 0) __PYX_ERR(1, 3249, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Resource = &__pyx_type_19dependency_injector_9providers_Resource; __pyx_vtabptr_19dependency_injector_9providers_Container = &__pyx_vtable_19dependency_injector_9providers_Container; __pyx_vtable_19dependency_injector_9providers_Container.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_Container.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_9Container__provide; __pyx_type_19dependency_injector_9providers_Container.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Container) < 0) __PYX_ERR(1, 3523, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Container) < 0) __PYX_ERR(1, 3591, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Container.tp_print = 0; #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Container, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3523, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Container, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3591, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_9Container___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_9Container___init__.doc = __pyx_doc_19dependency_injector_9providers_9Container___init__; @@ -127018,7 +130378,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Container, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3523, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Container, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3591, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_9Container_4__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_9Container_4__getattr__.doc = __pyx_doc_19dependency_injector_9providers_9Container_4__getattr__; @@ -127026,21 +130386,21 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Container.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Container) < 0) __PYX_ERR(1, 3523, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Container, (PyObject *)&__pyx_type_19dependency_injector_9providers_Container) < 0) __PYX_ERR(1, 3523, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Container) < 0) __PYX_ERR(1, 3523, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Container.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Container) < 0) __PYX_ERR(1, 3591, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Container, (PyObject *)&__pyx_type_19dependency_injector_9providers_Container) < 0) __PYX_ERR(1, 3591, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Container) < 0) __PYX_ERR(1, 3591, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Container = &__pyx_type_19dependency_injector_9providers_Container; __pyx_vtabptr_19dependency_injector_9providers_Selector = &__pyx_vtable_19dependency_injector_9providers_Selector; __pyx_vtable_19dependency_injector_9providers_Selector.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_Selector.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Selector__provide; __pyx_type_19dependency_injector_9providers_Selector.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Selector) < 0) __PYX_ERR(1, 3667, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Selector) < 0) __PYX_ERR(1, 3735, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Selector.tp_print = 0; #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Selector, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3667, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Selector, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3735, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_8Selector___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_8Selector___init__.doc = __pyx_doc_19dependency_injector_9providers_8Selector___init__; @@ -127050,7 +130410,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Selector, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3667, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Selector, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3735, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_8Selector_4__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_8Selector_4__getattr__.doc = __pyx_doc_19dependency_injector_9providers_8Selector_4__getattr__; @@ -127060,7 +130420,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Selector, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3667, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Selector, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 3735, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_8Selector_6__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_8Selector_6__str__.doc = __pyx_doc_19dependency_injector_9providers_8Selector_6__str__; @@ -127068,70 +130428,70 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Selector.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Selector) < 0) __PYX_ERR(1, 3667, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Selector, (PyObject *)&__pyx_type_19dependency_injector_9providers_Selector) < 0) __PYX_ERR(1, 3667, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Selector) < 0) __PYX_ERR(1, 3667, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Selector.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Selector) < 0) __PYX_ERR(1, 3735, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Selector, (PyObject *)&__pyx_type_19dependency_injector_9providers_Selector) < 0) __PYX_ERR(1, 3735, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Selector) < 0) __PYX_ERR(1, 3735, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Selector = &__pyx_type_19dependency_injector_9providers_Selector; __pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance = &__pyx_vtable_19dependency_injector_9providers_ProvidedInstance; __pyx_vtable_19dependency_injector_9providers_ProvidedInstance.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_ProvidedInstance.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_16ProvidedInstance__provide; __pyx_type_19dependency_injector_9providers_ProvidedInstance.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ProvidedInstance) < 0) __PYX_ERR(1, 3771, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ProvidedInstance) < 0) __PYX_ERR(1, 3858, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_ProvidedInstance.tp_print = 0; #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ProvidedInstance.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance) < 0) __PYX_ERR(1, 3771, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ProvidedInstance, (PyObject *)&__pyx_type_19dependency_injector_9providers_ProvidedInstance) < 0) __PYX_ERR(1, 3771, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ProvidedInstance) < 0) __PYX_ERR(1, 3771, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ProvidedInstance.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance) < 0) __PYX_ERR(1, 3858, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ProvidedInstance, (PyObject *)&__pyx_type_19dependency_injector_9providers_ProvidedInstance) < 0) __PYX_ERR(1, 3858, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ProvidedInstance) < 0) __PYX_ERR(1, 3858, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ProvidedInstance = &__pyx_type_19dependency_injector_9providers_ProvidedInstance; __pyx_vtabptr_19dependency_injector_9providers_AttributeGetter = &__pyx_vtable_19dependency_injector_9providers_AttributeGetter; __pyx_vtable_19dependency_injector_9providers_AttributeGetter.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_AttributeGetter.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_15AttributeGetter__provide; __pyx_type_19dependency_injector_9providers_AttributeGetter.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AttributeGetter) < 0) __PYX_ERR(1, 3844, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AttributeGetter) < 0) __PYX_ERR(1, 3936, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_AttributeGetter.tp_print = 0; #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AttributeGetter.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AttributeGetter) < 0) __PYX_ERR(1, 3844, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AttributeGetter, (PyObject *)&__pyx_type_19dependency_injector_9providers_AttributeGetter) < 0) __PYX_ERR(1, 3844, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AttributeGetter) < 0) __PYX_ERR(1, 3844, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AttributeGetter.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AttributeGetter) < 0) __PYX_ERR(1, 3936, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AttributeGetter, (PyObject *)&__pyx_type_19dependency_injector_9providers_AttributeGetter) < 0) __PYX_ERR(1, 3936, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AttributeGetter) < 0) __PYX_ERR(1, 3936, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AttributeGetter = &__pyx_type_19dependency_injector_9providers_AttributeGetter; __pyx_vtabptr_19dependency_injector_9providers_ItemGetter = &__pyx_vtable_19dependency_injector_9providers_ItemGetter; __pyx_vtable_19dependency_injector_9providers_ItemGetter.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_ItemGetter.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_10ItemGetter__provide; __pyx_type_19dependency_injector_9providers_ItemGetter.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ItemGetter) < 0) __PYX_ERR(1, 3914, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ItemGetter) < 0) __PYX_ERR(1, 4018, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_ItemGetter.tp_print = 0; #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ItemGetter.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ItemGetter) < 0) __PYX_ERR(1, 3914, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ItemGetter, (PyObject *)&__pyx_type_19dependency_injector_9providers_ItemGetter) < 0) __PYX_ERR(1, 3914, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ItemGetter) < 0) __PYX_ERR(1, 3914, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ItemGetter.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ItemGetter) < 0) __PYX_ERR(1, 4018, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ItemGetter, (PyObject *)&__pyx_type_19dependency_injector_9providers_ItemGetter) < 0) __PYX_ERR(1, 4018, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ItemGetter) < 0) __PYX_ERR(1, 4018, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ItemGetter = &__pyx_type_19dependency_injector_9providers_ItemGetter; __pyx_vtabptr_19dependency_injector_9providers_MethodCaller = &__pyx_vtable_19dependency_injector_9providers_MethodCaller; __pyx_vtable_19dependency_injector_9providers_MethodCaller.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_MethodCaller.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_12MethodCaller__provide; __pyx_type_19dependency_injector_9providers_MethodCaller.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_MethodCaller) < 0) __PYX_ERR(1, 3980, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_MethodCaller) < 0) __PYX_ERR(1, 4100, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_MethodCaller.tp_print = 0; #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_MethodCaller.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_MethodCaller) < 0) __PYX_ERR(1, 3980, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MethodCaller, (PyObject *)&__pyx_type_19dependency_injector_9providers_MethodCaller) < 0) __PYX_ERR(1, 3980, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_MethodCaller) < 0) __PYX_ERR(1, 3980, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_MethodCaller.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_MethodCaller) < 0) __PYX_ERR(1, 4100, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MethodCaller, (PyObject *)&__pyx_type_19dependency_injector_9providers_MethodCaller) < 0) __PYX_ERR(1, 4100, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_MethodCaller) < 0) __PYX_ERR(1, 4100, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_MethodCaller = &__pyx_type_19dependency_injector_9providers_MethodCaller; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 4096, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 4246, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_Injection.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Injection.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Injection.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_Injection.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Injection, (PyObject *)&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 4096, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 4096, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Injection, (PyObject *)&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 4246, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 4246, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Injection = &__pyx_type_19dependency_injector_9providers_Injection; __pyx_type_19dependency_injector_9providers_PositionalInjection.tp_base = __pyx_ptype_19dependency_injector_9providers_Injection; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 4100, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 4250, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_PositionalInjection.tp_print = 0; #endif @@ -127140,7 +130500,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 4100, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 4250, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_19PositionalInjection___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_19PositionalInjection___init__.doc = __pyx_doc_19dependency_injector_9providers_19PositionalInjection___init__; @@ -127148,11 +130508,11 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PositionalInjection, (PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 4100, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 4100, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PositionalInjection, (PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 4250, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 4250, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_PositionalInjection = &__pyx_type_19dependency_injector_9providers_PositionalInjection; __pyx_type_19dependency_injector_9providers_NamedInjection.tp_base = __pyx_ptype_19dependency_injector_9providers_Injection; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 4128, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 4278, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_NamedInjection.tp_print = 0; #endif @@ -127161,7 +130521,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 4128, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 4278, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_14NamedInjection___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_14NamedInjection___init__.doc = __pyx_doc_19dependency_injector_9providers_14NamedInjection___init__; @@ -127169,10 +130529,10 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NamedInjection, (PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 4128, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 4128, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NamedInjection, (PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 4278, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 4278, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_NamedInjection = &__pyx_type_19dependency_injector_9providers_NamedInjection; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_OverridingContext) < 0) __PYX_ERR(1, 4198, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_OverridingContext) < 0) __PYX_ERR(1, 4348, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_OverridingContext.tp_print = 0; #endif @@ -127181,7 +130541,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_OverridingContext, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 4198, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_OverridingContext, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 4348, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_17OverridingContext___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_17OverridingContext___init__.doc = __pyx_doc_19dependency_injector_9providers_17OverridingContext___init__; @@ -127189,40 +130549,40 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OverridingContext, (PyObject *)&__pyx_type_19dependency_injector_9providers_OverridingContext) < 0) __PYX_ERR(1, 4198, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_OverridingContext) < 0) __PYX_ERR(1, 4198, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OverridingContext, (PyObject *)&__pyx_type_19dependency_injector_9providers_OverridingContext) < 0) __PYX_ERR(1, 4348, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_OverridingContext) < 0) __PYX_ERR(1, 4348, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_OverridingContext = &__pyx_type_19dependency_injector_9providers_OverridingContext; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_BaseSingletonResetContext) < 0) __PYX_ERR(1, 4234, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_BaseSingletonResetContext) < 0) __PYX_ERR(1, 4384, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_BaseSingletonResetContext.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_BaseSingletonResetContext.tp_dictoffset && __pyx_type_19dependency_injector_9providers_BaseSingletonResetContext.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_BaseSingletonResetContext.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseSingletonResetContext, (PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingletonResetContext) < 0) __PYX_ERR(1, 4234, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_BaseSingletonResetContext) < 0) __PYX_ERR(1, 4234, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseSingletonResetContext, (PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingletonResetContext) < 0) __PYX_ERR(1, 4384, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_BaseSingletonResetContext) < 0) __PYX_ERR(1, 4384, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext = &__pyx_type_19dependency_injector_9providers_BaseSingletonResetContext; __pyx_type_19dependency_injector_9providers_SingletonResetContext.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_SingletonResetContext) < 0) __PYX_ERR(1, 4247, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_SingletonResetContext) < 0) __PYX_ERR(1, 4397, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_SingletonResetContext.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_SingletonResetContext.tp_dictoffset && __pyx_type_19dependency_injector_9providers_SingletonResetContext.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_SingletonResetContext.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SingletonResetContext, (PyObject *)&__pyx_type_19dependency_injector_9providers_SingletonResetContext) < 0) __PYX_ERR(1, 4247, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_SingletonResetContext) < 0) __PYX_ERR(1, 4247, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SingletonResetContext, (PyObject *)&__pyx_type_19dependency_injector_9providers_SingletonResetContext) < 0) __PYX_ERR(1, 4397, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_SingletonResetContext) < 0) __PYX_ERR(1, 4397, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_SingletonResetContext = &__pyx_type_19dependency_injector_9providers_SingletonResetContext; __pyx_type_19dependency_injector_9providers_SingletonFullResetContext.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_SingletonFullResetContext) < 0) __PYX_ERR(1, 4253, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_SingletonFullResetContext) < 0) __PYX_ERR(1, 4403, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers_SingletonFullResetContext.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_SingletonFullResetContext.tp_dictoffset && __pyx_type_19dependency_injector_9providers_SingletonFullResetContext.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_19dependency_injector_9providers_SingletonFullResetContext.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SingletonFullResetContext, (PyObject *)&__pyx_type_19dependency_injector_9providers_SingletonFullResetContext) < 0) __PYX_ERR(1, 4253, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_SingletonFullResetContext) < 0) __PYX_ERR(1, 4253, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SingletonFullResetContext, (PyObject *)&__pyx_type_19dependency_injector_9providers_SingletonFullResetContext) < 0) __PYX_ERR(1, 4403, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_SingletonFullResetContext) < 0) __PYX_ERR(1, 4403, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_SingletonFullResetContext = &__pyx_type_19dependency_injector_9providers_SingletonFullResetContext; if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct____get__) < 0) __PYX_ERR(1, 370, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 @@ -127232,7 +130592,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct____get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct____get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct____get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_1___get__) < 0) __PYX_ERR(1, 439, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_1___get__) < 0) __PYX_ERR(1, 447, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_1___get__.tp_print = 0; #endif @@ -127240,7 +130600,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_1___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_1___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_1___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_2___get__) < 0) __PYX_ERR(1, 571, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_2___get__) < 0) __PYX_ERR(1, 580, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_2___get__.tp_print = 0; #endif @@ -127248,7 +130608,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_2___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_2___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_2___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_3___get__) < 0) __PYX_ERR(1, 743, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_3___get__) < 0) __PYX_ERR(1, 759, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_3___get__.tp_print = 0; #endif @@ -127256,7 +130616,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_3___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_3___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_3___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_4___get__) < 0) __PYX_ERR(1, 952, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_4___get__) < 0) __PYX_ERR(1, 968, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_4___get__.tp_print = 0; #endif @@ -127264,7 +130624,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_4___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_4___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_4___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_5___get__) < 0) __PYX_ERR(1, 1163, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_5___get__) < 0) __PYX_ERR(1, 1184, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_5___get__.tp_print = 0; #endif @@ -127272,7 +130632,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_5___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_5___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_5___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_6__get_self_name) < 0) __PYX_ERR(1, 1433, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_6__get_self_name) < 0) __PYX_ERR(1, 1446, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_6__get_self_name.tp_print = 0; #endif @@ -127280,7 +130640,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_6__get_self_name.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_6__get_self_name = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_6__get_self_name; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(1, 1435, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(1, 1448, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_7_genexpr.tp_print = 0; #endif @@ -127288,7 +130648,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_7_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_7_genexpr = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_7_genexpr; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_8___get__) < 0) __PYX_ERR(1, 1657, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_8___get__) < 0) __PYX_ERR(1, 1670, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_8___get__.tp_print = 0; #endif @@ -127296,7 +130656,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_8___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_8___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_8___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_9___get__) < 0) __PYX_ERR(1, 2028, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_9___get__) < 0) __PYX_ERR(1, 2072, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_9___get__.tp_print = 0; #endif @@ -127304,7 +130664,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_9___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_9___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_9___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_10___get__) < 0) __PYX_ERR(1, 2250, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_10___get__) < 0) __PYX_ERR(1, 2303, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_10___get__.tp_print = 0; #endif @@ -127312,7 +130672,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_10___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_10___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_10___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_11___get__) < 0) __PYX_ERR(1, 2421, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_11___get__) < 0) __PYX_ERR(1, 2474, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_11___get__.tp_print = 0; #endif @@ -127320,7 +130680,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_11___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_11___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_11___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_12___get__) < 0) __PYX_ERR(1, 2615, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_12___get__) < 0) __PYX_ERR(1, 2676, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_12___get__.tp_print = 0; #endif @@ -127328,7 +130688,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_12___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_12___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_12___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_13___get__) < 0) __PYX_ERR(1, 3060, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_13___get__) < 0) __PYX_ERR(1, 3121, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_13___get__.tp_print = 0; #endif @@ -127336,7 +130696,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_13___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_13___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_13___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_14___get__) < 0) __PYX_ERR(1, 3178, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_14___get__) < 0) __PYX_ERR(1, 3239, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_14___get__.tp_print = 0; #endif @@ -127344,7 +130704,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_14___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_14___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_14___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_15___get__) < 0) __PYX_ERR(1, 3358, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_15___get__) < 0) __PYX_ERR(1, 3426, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_15___get__.tp_print = 0; #endif @@ -127352,7 +130712,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_15___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_15___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_15___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_16___get__) < 0) __PYX_ERR(1, 3624, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_16___get__) < 0) __PYX_ERR(1, 3692, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_16___get__.tp_print = 0; #endif @@ -127360,7 +130720,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_16___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_16___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_16___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_17___str__) < 0) __PYX_ERR(1, 3730, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_17___str__) < 0) __PYX_ERR(1, 3802, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_17___str__.tp_print = 0; #endif @@ -127368,7 +130728,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_17___str__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_17___str__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_17___str__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_18_genexpr) < 0) __PYX_ERR(1, 3740, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_18_genexpr) < 0) __PYX_ERR(1, 3812, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_18_genexpr.tp_print = 0; #endif @@ -127376,7 +130736,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_18_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_18_genexpr = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_18_genexpr; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_19___get__) < 0) __PYX_ERR(1, 3752, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_19___get__) < 0) __PYX_ERR(1, 3839, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_19___get__.tp_print = 0; #endif @@ -127384,7 +130744,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_19___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_19___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_19___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_20___get__) < 0) __PYX_ERR(1, 3835, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_20___get__) < 0) __PYX_ERR(1, 3926, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_20___get__.tp_print = 0; #endif @@ -127392,7 +130752,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_20___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_20___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_20___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_21___get__) < 0) __PYX_ERR(1, 3890, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_21___get__) < 0) __PYX_ERR(1, 3993, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_21___get__.tp_print = 0; #endif @@ -127400,7 +130760,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_21___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_21___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_21___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_22___get__) < 0) __PYX_ERR(1, 3960, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_22___get__) < 0) __PYX_ERR(1, 4075, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_22___get__.tp_print = 0; #endif @@ -127408,7 +130768,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_22___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_22___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_22___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_23___get__) < 0) __PYX_ERR(1, 4058, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_23___get__) < 0) __PYX_ERR(1, 4203, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_23___get__.tp_print = 0; #endif @@ -127416,7 +130776,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_9providers___pyx_scope_struct_23___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_9providers___pyx_scope_struct_23___get__ = &__pyx_type_19dependency_injector_9providers___pyx_scope_struct_23___get__; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_24_traverse) < 0) __PYX_ERR(1, 4388, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers___pyx_scope_struct_24_traverse) < 0) __PYX_ERR(1, 4538, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_9providers___pyx_scope_struct_24_traverse.tp_print = 0; #endif @@ -127868,7 +131228,7 @@ if (!__Pyx_RefNanny) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 22, __pyx_L4_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__42, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 22, __pyx_L4_except_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__41, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 22, __pyx_L4_except_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 22, __pyx_L4_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -128404,7 +131764,7 @@ if (!__Pyx_RefNanny) { * copy.deepcopy(obj.im_self, memo), * obj.im_class) */ - __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_9providers_39lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_dependency_injector_providers, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 57, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_9providers_45lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_dependency_injector_providers, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "dependency_injector/providers.pyx":56 @@ -128484,7 +131844,7 @@ if (!__Pyx_RefNanny) { * value = super().before_get(parser, section, option, value, defaults) * return os.path.expandvars(value) */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_9providers_16EnvInterpolation_1before_get, 0, __pyx_n_s_EnvInterpolation_before_get, NULL, __pyx_n_s_dependency_injector_providers, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 66, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_9providers_16EnvInterpolation_1before_get, 0, __pyx_n_s_EnvInterpolation_before_get, NULL, __pyx_n_s_dependency_injector_providers, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_10); PyList_Append(__pyx_t_5, __pyx_t_10); @@ -128583,7 +131943,7 @@ if (!__Pyx_RefNanny) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 88, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_yaml_env_marker_pattern, __pyx_t_9) < 0) __PYX_ERR(1, 88, __pyx_L1_error) @@ -128877,275 +132237,262 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Provider); - /* "dependency_injector/providers.pyx":613 - * """ - * - * def __init__(self, object instance_of=object, default=UNDEFINED): # <<<<<<<<<<<<<< - * """Initializer.""" - * if not isinstance(instance_of, CLASS_TYPES): - */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 613, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_k__4 = __pyx_t_8; - __Pyx_GIVEREF(__pyx_t_8); - __pyx_t_8 = 0; - - /* "dependency_injector/providers.pyx":1181 + /* "dependency_injector/providers.pyx":1202 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedCallable->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1181, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedCallable->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1202, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedCallable); - /* "dependency_injector/providers.pyx":1271 + /* "dependency_injector/providers.pyx":1292 * """ * * _is_coroutine = _is_coroutine_marker # <<<<<<<<<<<<<< * - * def __init__(self, provides, *args, **kwargs): + * def set_provides(self, provides): */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_is_coroutine_marker); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1271, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_is_coroutine_marker); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine->tp_dict, __pyx_n_s_is_coroutine, __pyx_t_8) < 0) __PYX_ERR(1, 1271, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine->tp_dict, __pyx_n_s_is_coroutine, __pyx_t_8) < 0) __PYX_ERR(1, 1292, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Coroutine); - /* "dependency_injector/providers.pyx":1297 + /* "dependency_injector/providers.pyx":1310 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1297, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1310, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine); - /* "dependency_injector/providers.pyx":1493 + /* "dependency_injector/providers.pyx":1506 * self.override(value) * * def from_ini(self, filepath, required=UNDEFINED): # <<<<<<<<<<<<<< * """Load configuration from the ini file. * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1493, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_k__13 = __pyx_t_8; + __pyx_k__12 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":1525 + /* "dependency_injector/providers.pyx":1538 * self.override(merge_dicts(current_config, config)) * * def from_yaml(self, filepath, required=UNDEFINED, loader=None): # <<<<<<<<<<<<<< * """Load configuration from the yaml file. * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1525, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_k__14 = __pyx_t_8; + __pyx_k__13 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":1567 + /* "dependency_injector/providers.pyx":1580 * self.override(merge_dicts(current_config, config)) * * def from_pydantic(self, settings, required=UNDEFINED, **kwargs): # <<<<<<<<<<<<<< * """Load configuration from pydantic settings. * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1567, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_k__15 = __pyx_t_8; + __pyx_k__14 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":1604 + /* "dependency_injector/providers.pyx":1617 * self.from_dict(settings.dict(**kwargs), required=required) * * def from_dict(self, options, required=UNDEFINED): # <<<<<<<<<<<<<< * """Load configuration from the dictionary. * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1604, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_k__16 = __pyx_t_8; + __pyx_k__15 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":1632 + /* "dependency_injector/providers.pyx":1645 * self.override(merge_dicts(current_config, options)) * * def from_env(self, name, default=UNDEFINED, required=UNDEFINED): # <<<<<<<<<<<<<< * """Load configuration value from the environment variable. * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1632, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_k__17 = __pyx_t_8; + __Pyx_GIVEREF(__pyx_t_8); + __pyx_t_8 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_k__18 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1632, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_k__19 = __pyx_t_8; - __Pyx_GIVEREF(__pyx_t_8); - __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":1694 + /* "dependency_injector/providers.pyx":1707 * """ * * DEFAULT_NAME = 'config' # <<<<<<<<<<<<<< * * def __init__(self, name=DEFAULT_NAME, default=None, strict=False): */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration->tp_dict, __pyx_n_s_DEFAULT_NAME, __pyx_n_s_config) < 0) __PYX_ERR(1, 1694, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration->tp_dict, __pyx_n_s_DEFAULT_NAME, __pyx_n_s_config) < 0) __PYX_ERR(1, 1707, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Configuration); - /* "dependency_injector/providers.pyx":1696 + /* "dependency_injector/providers.pyx":1709 * DEFAULT_NAME = 'config' * * def __init__(self, name=DEFAULT_NAME, default=None, strict=False): # <<<<<<<<<<<<<< * self.__name = name * self.__strict = strict */ - __Pyx_GetNameInClass(__pyx_t_8, (PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration, __pyx_n_s_DEFAULT_NAME); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1696, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_8, (PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration, __pyx_n_s_DEFAULT_NAME); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_k__20 = __pyx_t_8; + __pyx_k__19 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":1869 + /* "dependency_injector/providers.pyx":1913 * self.override(value) * * def from_ini(self, filepath, required=UNDEFINED): # <<<<<<<<<<<<<< * """Load configuration from the ini file. * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1869, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1913, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_k__21 = __pyx_t_8; + __pyx_k__20 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":1901 + /* "dependency_injector/providers.pyx":1945 * self.override(merge_dicts(current_config, config)) * * def from_yaml(self, filepath, required=UNDEFINED, loader=None): # <<<<<<<<<<<<<< * """Load configuration from the yaml file. * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1901, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_k__22 = __pyx_t_8; + __pyx_k__21 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":1943 + /* "dependency_injector/providers.pyx":1987 * self.override(merge_dicts(current_config, config)) * * def from_pydantic(self, settings, required=UNDEFINED, **kwargs): # <<<<<<<<<<<<<< * """Load configuration from pydantic settings. * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1943, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_k__23 = __pyx_t_8; + __pyx_k__22 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":1980 + /* "dependency_injector/providers.pyx":2024 * self.from_dict(settings.dict(**kwargs), required=required) * * def from_dict(self, options, required=UNDEFINED): # <<<<<<<<<<<<<< * """Load configuration from the dictionary. * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1980, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_k__24 = __pyx_t_8; + __pyx_k__23 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":2003 + /* "dependency_injector/providers.pyx":2047 * self.override(merge_dicts(current_config, options)) * * def from_env(self, name, default=UNDEFINED, required=UNDEFINED): # <<<<<<<<<<<<<< * """Load configuration value from the environment variable. * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2003, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_k__24 = __pyx_t_8; + __Pyx_GIVEREF(__pyx_t_8); + __pyx_t_8 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_k__25 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UNDEFINED); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2003, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_k__26 = __pyx_t_8; - __Pyx_GIVEREF(__pyx_t_8); - __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":2088 + /* "dependency_injector/providers.pyx":2132 * """ * * provided_type = None # <<<<<<<<<<<<<< * - * def __init__(self, provides, *args, **kwargs): + * def __init__(self, provides=None, *args, **kwargs): */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 2088, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 2132, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Factory); - /* "dependency_injector/providers.pyx":2282 + /* "dependency_injector/providers.pyx":2335 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedFactory->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 2282, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedFactory->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 2335, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedFactory); - /* "dependency_injector/providers.pyx":2362 + /* "dependency_injector/providers.pyx":2415 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * def __init__(self, **factories): */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 2362, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 2415, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_FactoryAggregate); - /* "dependency_injector/providers.pyx":2450 + /* "dependency_injector/providers.pyx":2503 * """Base class of singleton providers.""" * * provided_type = None # <<<<<<<<<<<<<< * - * def __init__(self, provides, *args, **kwargs): + * def __init__(self, provides=None, *args, **kwargs): */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 2450, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 2503, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_BaseSingleton); - /* "dependency_injector/providers.pyx":2721 + /* "dependency_injector/providers.pyx":2782 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 2721, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 2782, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton); - /* "dependency_injector/providers.pyx":2727 + /* "dependency_injector/providers.pyx":2788 * """Thread-safe singleton provider.""" * * storage_lock = threading.RLock() # <<<<<<<<<<<<<< * """Storage reentrant lock. * */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_threading); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2727, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_threading); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_RLock); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2727, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_RLock); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -129160,99 +132507,99 @@ if (!__Pyx_RefNanny) { } __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2727, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton->tp_dict, __pyx_n_s_storage_lock, __pyx_t_8) < 0) __PYX_ERR(1, 2727, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton->tp_dict, __pyx_n_s_storage_lock, __pyx_t_8) < 0) __PYX_ERR(1, 2788, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; PyType_Modified(__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton); - /* "dependency_injector/providers.pyx":2794 + /* "dependency_injector/providers.pyx":2855 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 2794, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 2855, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton); - /* "dependency_injector/providers.pyx":2892 + /* "dependency_injector/providers.pyx":2953 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 2892, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 2953, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton); - /* "dependency_injector/providers.pyx":3505 + /* "dependency_injector/providers.pyx":3573 * * @staticmethod * def _is_resource_subclass(instance): # <<<<<<<<<<<<<< * if sys.version_info < (3, 5): * return False */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_8Resource_39_is_resource_subclass, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3505, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_8Resource_41_is_resource_subclass, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict, __pyx_n_s_is_resource_subclass, __pyx_t_8) < 0) __PYX_ERR(1, 3505, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict, __pyx_n_s_is_resource_subclass, __pyx_t_8) < 0) __PYX_ERR(1, 3573, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Resource); - /* "dependency_injector/providers.pyx":3504 + /* "dependency_injector/providers.pyx":3572 * future_result.set_result(None) * * @staticmethod # <<<<<<<<<<<<<< * def _is_resource_subclass(instance): * if sys.version_info < (3, 5): */ - __Pyx_GetNameInClass(__pyx_t_8, (PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource, __pyx_n_s_is_resource_subclass); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3505, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_8, (PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource, __pyx_n_s_is_resource_subclass); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3504, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict, __pyx_n_s_is_resource_subclass, __pyx_t_1) < 0) __PYX_ERR(1, 3505, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict, __pyx_n_s_is_resource_subclass, __pyx_t_1) < 0) __PYX_ERR(1, 3573, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Resource); - /* "dependency_injector/providers.pyx":3514 + /* "dependency_injector/providers.pyx":3582 * * @staticmethod * def _is_async_resource_subclass(instance): # <<<<<<<<<<<<<< * if sys.version_info < (3, 5): * return False */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_8Resource_41_is_async_resource_subclass, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3514, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_8Resource_43_is_async_resource_subclass, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict, __pyx_n_s_is_async_resource_subclass, __pyx_t_1) < 0) __PYX_ERR(1, 3514, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict, __pyx_n_s_is_async_resource_subclass, __pyx_t_1) < 0) __PYX_ERR(1, 3582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Resource); - /* "dependency_injector/providers.pyx":3513 + /* "dependency_injector/providers.pyx":3581 * return issubclass(instance, resources.Resource) * * @staticmethod # <<<<<<<<<<<<<< * def _is_async_resource_subclass(instance): * if sys.version_info < (3, 5): */ - __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource, __pyx_n_s_is_async_resource_subclass); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3514, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource, __pyx_n_s_is_async_resource_subclass); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3513, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 3581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict, __pyx_n_s_is_async_resource_subclass, __pyx_t_8) < 0) __PYX_ERR(1, 3514, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict, __pyx_n_s_is_async_resource_subclass, __pyx_t_8) < 0) __PYX_ERR(1, 3582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Resource); - /* "dependency_injector/providers.pyx":4259 + /* "dependency_injector/providers.pyx":4409 * * * CHILD_PROVIDERS = (Dependency, DependenciesContainer, Container) # <<<<<<<<<<<<<< * * */ - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4259, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); @@ -129263,79 +132610,79 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); PyTuple_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Container)); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CHILD_PROVIDERS, __pyx_t_8) < 0) __PYX_ERR(1, 4259, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CHILD_PROVIDERS, __pyx_t_8) < 0) __PYX_ERR(1, 4409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":4356 + /* "dependency_injector/providers.pyx":4506 * * * def __add_sys_streams(memo): # <<<<<<<<<<<<<< * """Add system streams to memo dictionary. * */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_25__add_sys_streams, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4356, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_25__add_sys_streams, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_sys_streams, __pyx_t_8) < 0) __PYX_ERR(1, 4356, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_sys_streams, __pyx_t_8) < 0) __PYX_ERR(1, 4506, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":4367 + /* "dependency_injector/providers.pyx":4517 * * * def merge_dicts(dict1, dict2): # <<<<<<<<<<<<<< * """Merge dictionaries recursively. * */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_27merge_dicts, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4367, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_27merge_dicts, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_merge_dicts, __pyx_t_8) < 0) __PYX_ERR(1, 4367, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_merge_dicts, __pyx_t_8) < 0) __PYX_ERR(1, 4517, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":4388 + /* "dependency_injector/providers.pyx":4538 * * * def traverse(*providers, types=None): # <<<<<<<<<<<<<< * """Return providers traversal generator.""" * visited = set() */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_29traverse, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4388, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_29traverse, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_traverse, __pyx_t_8) < 0) __PYX_ERR(1, 4388, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_traverse, __pyx_t_8) < 0) __PYX_ERR(1, 4538, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":4411 + /* "dependency_injector/providers.pyx":4561 * * * def isawaitable(obj): # <<<<<<<<<<<<<< * """Check if object is a coroutine function. * */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_32isawaitable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4411, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_32isawaitable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_isawaitable, __pyx_t_8) < 0) __PYX_ERR(1, 4411, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_isawaitable, __pyx_t_8) < 0) __PYX_ERR(1, 4561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":4422 + /* "dependency_injector/providers.pyx":4572 * * * def iscoroutinefunction(obj): # <<<<<<<<<<<<<< * """Check if object is a coroutine function. * */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_34iscoroutinefunction, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4422, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_34iscoroutinefunction, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_iscoroutinefunction, __pyx_t_8) < 0) __PYX_ERR(1, 4422, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_iscoroutinefunction, __pyx_t_8) < 0) __PYX_ERR(1, 4572, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pyx":4433 + /* "dependency_injector/providers.pyx":4583 * * * def isasyncgenfunction(obj): # <<<<<<<<<<<<<< * """Check if object is an asynchronous generator function. * */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_36isasyncgenfunction, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4433, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_36isasyncgenfunction, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 4583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_isasyncgenfunction, __pyx_t_8) < 0) __PYX_ERR(1, 4433, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_isasyncgenfunction, __pyx_t_8) < 0) __PYX_ERR(1, 4583, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "(tree fragment)":1 @@ -129343,7 +132690,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_41__pyx_unpickle_Provider, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_47__pyx_unpickle_Provider, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Provider, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129355,7 +132702,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2] * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_43__pyx_unpickle_Object, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_49__pyx_unpickle_Object, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Object, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129365,7 +132712,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_45__pyx_unpickle_Self, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_51__pyx_unpickle_Self, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Self, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129377,7 +132724,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__alt_names = __pyx_state[0]; __pyx_result.__async_mode = __pyx_state[1]; __pyx_result.__container = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_47__pyx_unpickle_Delegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_53__pyx_unpickle_Delegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Delegate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129387,7 +132734,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_49__pyx_unpickle_Dependency, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_55__pyx_unpickle_Dependency, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Dependency, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129399,7 +132746,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__default = __pyx_state[1]; __pyx_result.__instance_of = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]; __pyx_result.__parent = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_51__pyx_unpickle_ExternalDependency, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_57__pyx_unpickle_ExternalDependency, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ExternalDependenc, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129409,7 +132756,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_53__pyx_unpickle_DependenciesContainer, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_59__pyx_unpickle_DependenciesContainer, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DependenciesConta, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129421,7 +132768,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__parent = __pyx_state[3]; __pyx_result.__providers = __pyx_state[4]; __pyx_result.__provides = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_55__pyx_unpickle_Callable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_61__pyx_unpickle_Callable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Callable, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129431,7 +132778,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_57__pyx_unpickle_DelegatedCallable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_63__pyx_unpickle_DelegatedCallable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedCallable, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129443,7 +132790,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_59__pyx_unpickle_AbstractCallable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_65__pyx_unpickle_AbstractCallable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AbstractCallable, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129453,7 +132800,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_61__pyx_unpickle_CallableDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_67__pyx_unpickle_CallableDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CallableDelegate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129465,7 +132812,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_63__pyx_unpickle_Coroutine, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_69__pyx_unpickle_Coroutine, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Coroutine, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129475,7 +132822,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_65__pyx_unpickle_DelegatedCoroutine, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_71__pyx_unpickle_DelegatedCoroutine, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedCoroutin, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129487,7 +132834,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_67__pyx_unpickle_AbstractCoroutine, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_73__pyx_unpickle_AbstractCoroutine, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AbstractCoroutine, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129497,7 +132844,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_69__pyx_unpickle_CoroutineDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_75__pyx_unpickle_CoroutineDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CoroutineDelegate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129509,7 +132856,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_71__pyx_unpickle_ConfigurationOption, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_77__pyx_unpickle_ConfigurationOption, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ConfigurationOpti, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129519,7 +132866,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_73__pyx_unpickle_TypedConfigurationOption, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_79__pyx_unpickle_TypedConfigurationOption, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TypedConfiguratio, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129531,7 +132878,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_75__pyx_unpickle_Configuration, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_81__pyx_unpickle_Configuration, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Configuration, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129541,7 +132888,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_77__pyx_unpickle_Factory, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_83__pyx_unpickle_Factory, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Factory, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129553,7 +132900,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__attributes = __pyx_state[1]; __pyx_result.__attributes_len = __pyx_state[2]; __pyx_result.__instantiator = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_79__pyx_unpickle_DelegatedFactory, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_85__pyx_unpickle_DelegatedFactory, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedFactory, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129563,7 +132910,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_81__pyx_unpickle_AbstractFactory, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_87__pyx_unpickle_AbstractFactory, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AbstractFactory, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129575,7 +132922,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__attributes = __pyx_state[1]; __pyx_result.__attributes_len = __pyx_state[2]; __pyx_result.__instantiator = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_83__pyx_unpickle_FactoryDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_89__pyx_unpickle_FactoryDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FactoryDelegate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129585,7 +132932,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_85__pyx_unpickle_FactoryAggregate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_91__pyx_unpickle_FactoryAggregate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FactoryAggregate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129597,7 +132944,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__factories = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_87__pyx_unpickle_BaseSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_93__pyx_unpickle_BaseSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BaseSingleton, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129607,7 +132954,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_89__pyx_unpickle_Singleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_95__pyx_unpickle_Singleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Singleton, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129619,7 +132966,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__instantiator = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__storage = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_91__pyx_unpickle_DelegatedSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_97__pyx_unpickle_DelegatedSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedSingleto, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129629,7 +132976,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_93__pyx_unpickle_ThreadSafeSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_99__pyx_unpickle_ThreadSafeSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ThreadSafeSinglet, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129641,7 +132988,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__instantiator = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__storage = __pyx_state[4]; __pyx_result.__storage_lock = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_95__pyx_unpickle_DelegatedThreadSafeSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_101__pyx_unpickle_DelegatedThreadSafeSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedThreadSa, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129651,7 +132998,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_97__pyx_unpickle_ThreadLocalSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_103__pyx_unpickle_ThreadLocalSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ThreadLocalSingle, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129663,7 +133010,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__instantiator = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__storage = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_99__pyx_unpickle_DelegatedThreadLocalSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_105__pyx_unpickle_DelegatedThreadLocalSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedThreadLo, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129673,7 +133020,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_101__pyx_unpickle_AbstractSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_107__pyx_unpickle_AbstractSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AbstractSingleton, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129685,7 +133032,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__instantiator = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__storage = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_103__pyx_unpickle_SingletonDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_109__pyx_unpickle_SingletonDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SingletonDelegate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129695,7 +133042,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_105__pyx_unpickle_List, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_111__pyx_unpickle_List, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_List, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129707,7 +133054,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_107__pyx_unpickle_Dict, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_113__pyx_unpickle_Dict, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Dict, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129717,7 +133064,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_109__pyx_unpickle_Resource, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_115__pyx_unpickle_Resource, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Resource, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129726,10 +133073,10 @@ if (!__Pyx_RefNanny) { * __pyx_unpickle_Resource__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Resource__set_state(Resource __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__initializer = __pyx_state[4]; __pyx_result.__kwargs = __pyx_state[5]; __pyx_result.__kwargs_len = __pyx_state[6]; __pyx_result.__last_overriding = __pyx_state[7]; __pyx_result.__overridden = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__initialized = __pyx_state[3]; __pyx_result.__kwargs = __pyx_state[4]; __pyx_result.__kwargs_len = __pyx_state[5]; __pyx_result.__last_overriding = __pyx_state[6]; __pyx_result.__overridden = __pyx_state[7]; __pyx_result.__provides = __pyx_state[8]; __pyx_result.__resource = __pyx_state[9]; __pyx_result.__shutdowner = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_111__pyx_unpickle_Container, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_117__pyx_unpickle_Container, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Container, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129739,7 +133086,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_113__pyx_unpickle_Selector, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_119__pyx_unpickle_Selector, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Selector, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129751,7 +133098,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__providers = __pyx_state[3]; __pyx_result.__selector = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_115__pyx_unpickle_ProvidedInstance, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_121__pyx_unpickle_ProvidedInstance, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ProvidedInstance, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129761,7 +133108,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_117__pyx_unpickle_AttributeGetter, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_123__pyx_unpickle_AttributeGetter, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AttributeGetter, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129770,10 +133117,10 @@ if (!__Pyx_RefNanny) { * __pyx_unpickle_AttributeGetter__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_AttributeGetter__set_state(AttributeGetter __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__attribute = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provider = __pyx_state[4] + * __pyx_result.__async_mode = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_119__pyx_unpickle_ItemGetter, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_125__pyx_unpickle_ItemGetter, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ItemGetter, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129783,7 +133130,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_121__pyx_unpickle_MethodCaller, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_127__pyx_unpickle_MethodCaller, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_MethodCaller, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129792,10 +133139,10 @@ if (!__Pyx_RefNanny) { * __pyx_unpickle_MethodCaller__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_MethodCaller__set_state(MethodCaller __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provider = __pyx_state[7] + * __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__async_mode = __pyx_state[2]; __pyx_result.__kwargs = __pyx_state[3]; __pyx_result.__kwargs_len = __pyx_state[4]; __pyx_result.__last_overriding = __pyx_state[5]; __pyx_result.__overridden = __pyx_state[6]; __pyx_result.__provides = __pyx_state[7] * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_123__pyx_unpickle_Injection, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_129__pyx_unpickle_Injection, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Injection, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129805,7 +133152,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_125__pyx_unpickle_PositionalInjection, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_131__pyx_unpickle_PositionalInjection, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PositionalInjecti, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129817,7 +133164,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_127__pyx_unpickle_NamedInjection, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_133__pyx_unpickle_NamedInjection, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_NamedInjection, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129827,7 +133174,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_129__pyx_unpickle_OverridingContext, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_135__pyx_unpickle_OverridingContext, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_OverridingContext, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129839,7 +133186,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__overridden = __pyx_state[0]; __pyx_result.__overriding = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_131__pyx_unpickle_BaseSingletonResetContext, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_137__pyx_unpickle_BaseSingletonResetContext, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BaseSingletonRese, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129849,7 +133196,7 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_133__pyx_unpickle_SingletonResetContext, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_139__pyx_unpickle_SingletonResetContext, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SingletonResetCon, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -129861,7 +133208,7 @@ if (!__Pyx_RefNanny) { * __pyx_result.__singleton = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ - __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_135__pyx_unpickle_SingletonFullResetContext, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_141__pyx_unpickle_SingletonFullResetContext, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SingletonFullRese, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -132681,6 +136028,11 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { 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); +} + /* StringJoin */ #if !CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { @@ -132688,11 +136040,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* value } #endif -/* None */ -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { - PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); -} - /* PyObjectSetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { diff --git a/src/dependency_injector/providers.pxd b/src/dependency_injector/providers.pxd index 1f2a8c41..c83c606e 100644 --- a/src/dependency_injector/providers.pxd +++ b/src/dependency_injector/providers.pxd @@ -203,7 +203,7 @@ cdef class Dict(Provider): cdef class Resource(Provider): - cdef object __initializer + cdef object __provides cdef bint __initialized cdef object __shutdowner cdef object __resource @@ -235,27 +235,27 @@ cdef class Selector(Provider): # Provided instance cdef class ProvidedInstance(Provider): - cdef Provider __provider + cdef object __provides cpdef object _provide(self, tuple args, dict kwargs) cdef class AttributeGetter(Provider): - cdef Provider __provider - cdef object __attribute + cdef object __provides + cdef object __name cpdef object _provide(self, tuple args, dict kwargs) cdef class ItemGetter(Provider): - cdef Provider __provider - cdef object __item + cdef object __provides + cdef object __name cpdef object _provide(self, tuple args, dict kwargs) cdef class MethodCaller(Provider): - cdef Provider __provider + cdef object __provides cdef tuple __args cdef int __args_len cdef tuple __kwargs diff --git a/src/dependency_injector/providers.pyi b/src/dependency_injector/providers.pyi index 25865891..20bc9dda 100644 --- a/src/dependency_injector/providers.pyi +++ b/src/dependency_injector/providers.pyi @@ -79,7 +79,9 @@ class Provider(Generic[T]): class Object(Provider[T]): - def __init__(self, provides: T) -> None: ... + def __init__(self, provides: Optional[T] = None) -> None: ... + def provides(self) -> Optional[T]: ... + def set_provides(self, provides: Optional[T]) -> Object: ... class Self(Provider[T]): @@ -94,16 +96,21 @@ class Delegate(Provider[Provider]): def __init__(self, provides: Optional[Provider] = None) -> None: ... @property def provides(self) -> Optional[Provider]: ... - def set_provides(self, provides: Optional[Provider]): ... + def set_provides(self, provides: Optional[Provider]) -> Delegate: ... class Dependency(Provider[T]): def __init__(self, instance_of: Type[T] = object, default: Optional[Union[Provider, Any]] = None) -> None: ... def __getattr__(self, name: str) -> Any: ... + @property def instance_of(self) -> Type[T]: ... + def set_instance_of(self, instance_of: Type[T]) -> Dependency[T]: ... + @property def default(self) -> Provider[T]: ... + def set_default(self, default: Optional[Union[Provider, Any]]) -> Dependency[T]: ... + @property def is_defined(self) -> bool: ... def provided_by(self, provider: Provider) -> OverridingContext[P]: ... @@ -131,9 +138,10 @@ class DependenciesContainer(Object): class Callable(Provider[T]): - def __init__(self, provides: _Callable[..., T], *args: Injection, **kwargs: Injection) -> None: ... + def __init__(self, provides: Optional[_Callable[..., T]] = None, *args: Injection, **kwargs: Injection) -> None: ... @property - def provides(self) -> T: ... + def provides(self) -> Optional[T]: ... + def set_provides(self, provides: Optional[_Callable[..., T]]) -> Callable[T]: ... @property def args(self) -> Tuple[Injection]: ... def add_args(self, *args: Injection) -> Callable[T]: ... @@ -207,7 +215,19 @@ class Configuration(Object[Any]): def __exit__(self, *exc_info: Any) -> None: ... def __getattr__(self, item: str) -> ConfigurationOption: ... def __getitem__(self, item: Union[str, Provider]) -> ConfigurationOption: ... + def get_name(self) -> str: ... + def set_name(self, name: str) -> Configuration: ... + + def get_default(self) -> _Dict[Any, Any]: ... + def set_default(self, default: _Dict[Any, Any]): ... + + def get_strict(self) -> bool: ... + def set_strict(self, strict: bool) -> Configuration: ... + + def get_children(self) -> _Dict[str, ConfigurationOption]: ... + def set_children(self, children: _Dict[str, ConfigurationOption]) -> Configuration: ... + def get(self, selector: str) -> Any: ... def set(self, selector: str, value: Any) -> OverridingContext[P]: ... def reset_cache(self) -> None: ... @@ -221,11 +241,12 @@ class Configuration(Object[Any]): class Factory(Provider[T]): provided_type: Optional[Type] - def __init__(self, provides: _Callable[..., T], *args: Injection, **kwargs: Injection) -> None: ... + def __init__(self, provides: Optional[_Callable[..., T]] = None, *args: Injection, **kwargs: Injection) -> None: ... @property def cls(self) -> T: ... @property def provides(self) -> T: ... + def set_provides(self, provides: Optional[_Callable[..., T]]) -> Factory[T]: ... @property def args(self) -> Tuple[Injection]: ... def add_args(self, *args: Injection) -> Factory[T]: ... @@ -266,15 +287,17 @@ class FactoryAggregate(Provider): @property def factories(self) -> _Dict[str, Factory]: ... + def set_factories(self, **factories: Factory) -> FactoryAggregate: ... class BaseSingleton(Provider[T]): provided_type = Optional[Type] - def __init__(self, provides: _Callable[..., T], *args: Injection, **kwargs: Injection) -> None: ... + def __init__(self, provides: Optional[_Callable[..., T]] = None, *args: Injection, **kwargs: Injection) -> None: ... @property def cls(self) -> T: ... @property def provides(self) -> T: ... + def set_provides(self, provides: Optional[_Callable[..., T]]) -> BaseSingleton[T]: ... @property def args(self) -> Tuple[Injection]: ... def add_args(self, *args: Injection) -> BaseSingleton[T]: ... @@ -340,19 +363,20 @@ class Dict(Provider[_Dict]): class Resource(Provider[T]): @overload - def __init__(self, initializer: Type[resources.Resource[T]], *args: Injection, **kwargs: Injection) -> None: ... + def __init__(self, provides: Optional[Type[resources.Resource[T]]] = None, *args: Injection, **kwargs: Injection) -> None: ... @overload - def __init__(self, initializer: Type[resources.AsyncResource[T]], *args: Injection, **kwargs: Injection) -> None: ... + def __init__(self, provides: Optional[Type[resources.AsyncResource[T]]] = None, *args: Injection, **kwargs: Injection) -> None: ... @overload - def __init__(self, initializer: _Callable[..., _Iterator[T]], *args: Injection, **kwargs: Injection) -> None: ... + def __init__(self, provides: Optional[_Callable[..., _Iterator[T]]] = None, *args: Injection, **kwargs: Injection) -> None: ... @overload - def __init__(self, initializer: _Callable[..., _AsyncIterator[T]], *args: Injection, **kwargs: Injection) -> None: ... + def __init__(self, provides: Optional[_Callable[..., _AsyncIterator[T]]] = None, *args: Injection, **kwargs: Injection) -> None: ... @overload - def __init__(self, initializer: _Callable[..., _Coroutine[Injection, Injection, T]], *args: Injection, **kwargs: Injection) -> None: ... + def __init__(self, provides: Optional[_Callable[..., _Coroutine[Injection, Injection, T]]] = None, *args: Injection, **kwargs: Injection) -> None: ... @overload - def __init__(self, initializer: _Callable[..., T], *args: Injection, **kwargs: Injection) -> None: ... + def __init__(self, provides: Optional[_Callable[..., T]] = None, *args: Injection, **kwargs: Injection) -> None: ... @property - def initializer(self) -> _Callable[..., Any]: ... + def provides(self) -> Optional[_Callable[..., Any]]: ... + def set_provides(self, provides: Optional[Any]) -> Resource[T]: ... @property def args(self) -> Tuple[Injection]: ... def add_args(self, *args: Injection) -> Resource[T]: ... @@ -383,32 +407,47 @@ class Container(Provider[T]): class Selector(Provider[Any]): - def __init__(self, selector: _Callable[..., Any], **providers: Provider): ... + def __init__(self, selector: Optional[_Callable[..., Any]] = None, **providers: Provider): ... def __getattr__(self, name: str) -> Provider: ... + + @property + def selector(self) -> Optional[_Callable[..., Any]]: ... + def set_selector(self, selector: Optional[_Callable[..., Any]]) -> Selector: ... + @property def providers(self) -> _Dict[str, Provider]: ... + def set_providers(self, **providers: Provider) -> Selector: ... class ProvidedInstanceFluentInterface: def __getattr__(self, item: Any) -> AttributeGetter: ... def __getitem__(self, item: Any) -> ItemGetter: ... def call(self, *args: Injection, **kwargs: Injection) -> MethodCaller: ... + @property + def provides(self) -> Optional[Provider]: ... + def set_provides(self, provides: Optional[Provider]) -> ProvidedInstanceFluentInterface: ... class ProvidedInstance(Provider, ProvidedInstanceFluentInterface): - def __init__(self, provider: Provider) -> None: ... + def __init__(self, provides: Optional[Provider] = None) -> None: ... class AttributeGetter(Provider, ProvidedInstanceFluentInterface): - def __init__(self, provider: Provider, attribute: str) -> None: ... + def __init__(self, provides: Optional[Provider] = None, name: Optional[str] = None) -> None: ... + @property + def name(self) -> Optional[str]: ... + def set_name(self, name: Optional[str]) -> ProvidedInstanceFluentInterface: ... class ItemGetter(Provider, ProvidedInstanceFluentInterface): - def __init__(self, provider: Provider, item: str) -> None: ... + def __init__(self, provides: Optional[Provider] = None, name: Optional[str] = None) -> None: ... + @property + def name(self) -> Optional[str]: ... + def set_name(self, name: Optional[str]) -> ProvidedInstanceFluentInterface: ... class MethodCaller(Provider, ProvidedInstanceFluentInterface): - def __init__(self, provider: Provider, *args: Injection, **kwargs: Injection) -> None: ... + def __init__(self, provides: Optional[Provider] = None, *args: Injection, **kwargs: Injection) -> None: ... class OverridingContext(Generic[T]): diff --git a/src/dependency_injector/providers.pyx b/src/dependency_injector/providers.pyx index 24722c80..c5cc02eb 100644 --- a/src/dependency_injector/providers.pyx +++ b/src/dependency_injector/providers.pyx @@ -400,13 +400,10 @@ cdef class Object(Provider): :type: object """ - def __init__(self, provides): - """Initializer. - - :param provides: Value that have to be provided. - :type provides: object - """ - self.__provides = provides + def __init__(self, provides=None): + """Initialize provider.""" + self.__provides = None + self.set_provides(provides) super(Object, self).__init__() def __deepcopy__(self, memo): @@ -415,7 +412,8 @@ cdef class Object(Provider): if copied is not None: return copied - copied = self.__class__(self.__provides) + copied = _memorized_duplicate(self, memo) + copied.set_provides(self.provides) self._copy_overridings(copied, memo) @@ -435,6 +433,16 @@ cdef class Object(Provider): """ return self.__str__() + @property + def provides(self): + """Return provider's provides.""" + return self.__provides + + def set_provides(self, provides): + """Set provider's provides.""" + self.__provides = provides + return self + @property def related(self): """Return related providers generator.""" @@ -520,11 +528,7 @@ cdef class Delegate(Provider): """ def __init__(self, provides=None): - """Initializer. - - :param provides: Value that have to be provided. - :type provides: :py:class:`Provider` - """ + """Initialize provider.""" self.__provides = None self.set_provides(provides) super(Delegate, self).__init__() @@ -535,11 +539,13 @@ cdef class Delegate(Provider): if copied is not None: return copied - copied = self.__class__() - memo[id(self)] = copied + provides = self.provides + if provides: + provides = deepcopy(self.provides, memo) + + copied = _memorized_duplicate(self, memo) + copied.set_provides(provides) - if self.provides: - copied.set_provides(deepcopy(self.provides, memo)) self._copy_overridings(copied, memo) return copied @@ -560,12 +566,15 @@ cdef class Delegate(Provider): @property def provides(self): + """Return provider's provides.""" return self.__provides def set_provides(self, provides): + """Set provider's provides.""" if provides: provides = ensure_is_provider(provides) self.__provides = provides + return self @property def related(self): @@ -610,20 +619,13 @@ cdef class Dependency(Provider): :type: type """ - def __init__(self, object instance_of=object, default=UNDEFINED): - """Initializer.""" - if not isinstance(instance_of, CLASS_TYPES): - raise TypeError( - 'Argument \'instance_of\' has incorrect type (expected {0}, got {1}))'.format( - CLASS_TYPES, - instance_of, - ) - ) - self.__instance_of = instance_of + def __init__(self, object instance_of=object, default=None): + """Initialize provider.""" + self.__instance_of = None + self.set_instance_of(instance_of) - if default is not UNDEFINED and not isinstance(default, Provider): - default = Object(default) - self.__default = default + self.__default = None + self.set_default(default) self.__parent = None @@ -635,14 +637,9 @@ cdef class Dependency(Provider): if copied is not None: return copied - copied_default = ( - deepcopy(self.__default, memo) - if self.__default is not UNDEFINED - else UNDEFINED - ) - - copied = self.__class__(self.__instance_of, copied_default) - memo[id(self)] = copied + copied = _memorized_duplicate(self, memo) + copied.set_instance_of(self.instance_of) + copied.set_default(deepcopy(self.default, memo)) self._copy_parent(copied, memo) self._copy_overridings(copied, memo) @@ -658,7 +655,7 @@ cdef class Dependency(Provider): """ if self.__last_overriding: result = self.__last_overriding(*args, **kwargs) - elif not self.__last_overriding and self.__default is not UNDEFINED: + elif self.__default: result = self.__default(*args, **kwargs) else: self._raise_undefined_error() @@ -691,7 +688,7 @@ cdef class Dependency(Provider): def __getattr__(self, name): if self.__last_overriding: return getattr(self.__last_overriding, name) - elif self.__default is not UNDEFINED: + elif self.__default: return getattr(self.__default, name) raise AttributeError(f'Provider "{self.__class__.__name__}" has no attribute "{name}"') @@ -716,18 +713,37 @@ cdef class Dependency(Provider): @property def instance_of(self): - """Return class of required dependency.""" + """Return type.""" return self.__instance_of + def set_instance_of(self, instance_of): + """Set type.""" + if not isinstance(instance_of, CLASS_TYPES): + raise TypeError( + '"instance_of" has incorrect type (expected {0}, got {1}))'.format( + CLASS_TYPES, + instance_of, + ), + ) + self.__instance_of = instance_of + return self + @property def default(self): """Return default provider.""" return self.__default + def set_default(self, default): + """Set type.""" + if default and not isinstance(default, Provider): + default = Object(default) + self.__default = default + return self + @property def is_defined(self): """Return True if dependency is defined.""" - return self.__last_overriding or self.__default is not UNDEFINED + return self.__last_overriding or self.__default def provided_by(self, provider): """Set external dependency provider. @@ -742,7 +758,7 @@ cdef class Dependency(Provider): @property def related(self): """Return related providers generator.""" - if self.__default is not UNDEFINED: + if self.__default: yield self.__default yield from super().related @@ -1022,18 +1038,10 @@ cdef class Callable(Provider): some_function.add_kwargs(keyword_argument1=3, keyword_argument=4) """ - def __init__(self, provides, *args, **kwargs): - """Initializer. - - :param provides: Wrapped callable. - :type provides: callable - """ - if not callable(provides): - raise Error('Provider {0} expected to get callable, ' - 'got {0}'.format('.'.join((self.__class__.__module__, - self.__class__.__name__)), - provides)) - self.__provides = provides + def __init__(self, provides=None, *args, **kwargs): + """Initialize provider.""" + self.__provides = None + self.set_provides(provides) self.__args = tuple() self.__args_len = 0 @@ -1055,9 +1063,10 @@ cdef class Callable(Provider): if isinstance(provides, Provider): provides = deepcopy(provides, memo) - copied = self.__class__(provides, - *deepcopy(self.args, memo), - **deepcopy(self.kwargs, memo)) + copied = _memorized_duplicate(self, memo) + copied.set_provides(provides) + copied.set_args(*deepcopy(self.args, memo)) + copied.set_kwargs(**deepcopy(self.kwargs, memo)) self._copy_overridings(copied, memo) @@ -1072,9 +1081,21 @@ cdef class Callable(Provider): @property def provides(self): - """Return wrapped callable.""" + """Return provider's provides.""" return self.__provides + def set_provides(self, provides): + """Set provider's provides.""" + if provides and not callable(provides): + raise Error( + 'Provider {0} expected to get callable, got {1} instead'.format( + _class_qualname(self), + provides, + ), + ) + self.__provides = provides + return self + @property def args(self): """Return positional argument injections.""" @@ -1270,22 +1291,14 @@ cdef class Coroutine(Callable): _is_coroutine = _is_coroutine_marker - def __init__(self, provides, *args, **kwargs): - """Initializer. - - :param provides: Wrapped callable. - :type provides: callable - """ + def set_provides(self, provides): + """Set provider's provides.""" if not asyncio: raise Error('Package asyncio is not available') - - if not asyncio.iscoroutinefunction(provides): - raise Error('Provider {0} expected to get coroutine function, ' - 'got {1}'.format('.'.join((self.__class__.__module__, - self.__class__.__name__)), - provides)) - - super(Coroutine, self).__init__(provides, *args, **kwargs) + if provides and not asyncio.iscoroutinefunction(provides): + raise Error(f'Provider {_class_qualname(self)} expected to get coroutine function, ' + f'got {provides} instead') + return super().set_provides(provides) cdef class DelegatedCoroutine(Coroutine): @@ -1696,29 +1709,23 @@ cdef class Configuration(Object): def __init__(self, name=DEFAULT_NAME, default=None, strict=False): self.__name = name self.__strict = strict - - value = {} - if default is not None: - assert isinstance(default, dict), default - value = default.copy() - self.__children = {} - super().__init__(value) + super().__init__(provides={}) + self.set_default(default) def __deepcopy__(self, memo): - cdef Configuration copied - copied = memo.get(id(self)) if copied is not None: return copied - copied = self.__class__(self.__name, self.__provides, self.__strict) - memo[id(self)] = copied + copied = _memorized_duplicate(self, memo) + copied.set_name(self.get_name()) + copied.set_default(self.get_default()) + copied.set_strict(self.get_strict()) + copied.set_children(deepcopy(self.get_children(), memo)) - copied.__children = deepcopy(self.__children, memo) self._copy_overridings(copied, memo) - return copied def __enter__(self): @@ -1751,8 +1758,45 @@ cdef class Configuration(Object): return child def get_name(self): + """Return name.""" return self.__name + def set_name(self, name): + """Set name.""" + self.__name = name + return self + + def get_default(self): + """Return default.""" + return self.provides + + def set_default(self, default): + """Set default.""" + if not default: + return self + + assert isinstance(default, dict), default + self.set_provides(default.copy()) + return self + + def get_strict(self): + """Return strict flag.""" + return self.__strict + + def set_strict(self, strict): + """Set strict flag.""" + self.__strict = strict + return self + + def get_children(self): + """Return children options.""" + return self.__children + + def set_children(self, children): + """Set children options.""" + self.__children = children + return self + def get(self, selector, required=False): """Return configuration option. @@ -2087,18 +2131,12 @@ cdef class Factory(Provider): provided_type = None - def __init__(self, provides, *args, **kwargs): - """Initializer. - - :param provides: Provided type. - :type provides: type - """ - if (self.__class__.provided_type and - not issubclass(provides, self.__class__.provided_type)): - raise Error('{0} can provide only {1} instances'.format( - self.__class__, self.__class__.provided_type)) - - self.__instantiator = Callable(provides, *args, **kwargs) + def __init__(self, provides=None, *args, **kwargs): + """Initialize provider.""" + self.__instantiator = Callable() + self.set_provides(provides) + self.set_args(*args) + self.set_kwargs(**kwargs) self.__attributes = tuple() self.__attributes_len = 0 @@ -2111,13 +2149,14 @@ cdef class Factory(Provider): if copied is not None: return copied - cls = self.cls - if isinstance(cls, Provider): - cls = deepcopy(cls, memo) + provides = self.provides + if isinstance(provides, Provider): + provides = deepcopy(provides, memo) - copied = self.__class__(cls, - *deepcopy(self.args, memo), - **deepcopy(self.kwargs, memo)) + copied = _memorized_duplicate(self, memo) + copied.set_provides(provides) + copied.set_args(*deepcopy(self.args, memo)) + copied.set_kwargs(**deepcopy(self.kwargs, memo)) copied.set_attributes(**deepcopy(self.attributes, memo)) self._copy_overridings(copied, memo) @@ -2139,9 +2178,23 @@ cdef class Factory(Provider): @property def provides(self): - """Return provided type.""" + """Return provider's provides.""" return self.__instantiator.provides + def set_provides(self, provides): + """Set provider's provides.""" + if (provides + and self.__class__.provided_type and + not issubclass(provides, self.__class__.provided_type)): + raise Error( + '{0} can provide only {1} instances'.format( + _class_qualname(self), + self.__class__.provided_type, + ), + ) + self.__instantiator.set_provides(provides) + return self + @property def args(self): """Return positional argument injections.""" @@ -2362,29 +2415,19 @@ cdef class FactoryAggregate(Provider): __IS_DELEGATED__ = True def __init__(self, **factories): - """Initializer. - - :param factories: Dictionary of aggregate factories. - :type factories: dict[str, :py:class:`Factory`] - """ - for factory in factories.values(): - if isinstance(factory, Factory) is False: - raise Error( - '{0} can aggregate only instances of {1}, given - {2}' - .format(self.__class__, Factory, factory)) - self.__factories = factories + """Initialize provider.""" + self.__factories = {} + self.set_factories(**factories) super(FactoryAggregate, self).__init__() def __deepcopy__(self, memo): """Create and return full copy of provider.""" - cdef FactoryAggregate copied - copied = memo.get(id(self)) if copied is not None: return copied - copied = self.__class__() - copied.__factories = deepcopy(self.__factories, memo) + copied = _memorized_duplicate(self, memo) + copied.set_factories(**deepcopy(self.factories, memo)) self._copy_overridings(copied, memo) @@ -2406,6 +2449,16 @@ cdef class FactoryAggregate(Provider): """Return dictionary of factories, read-only.""" return self.__factories + def set_factories(self, **factories): + """Set factories.""" + for factory in factories.values(): + if isinstance(factory, Factory) is False: + raise Error( + '{0} can aggregate only instances of {1}, given - {2}' + .format(self.__class__, Factory, factory)) + self.__factories = factories + return self + def override(self, _): """Override provider with another provider. @@ -2449,19 +2502,12 @@ cdef class BaseSingleton(Provider): provided_type = None - def __init__(self, provides, *args, **kwargs): - """Initializer. - - :param provides: Provided type. - :type provides: type - """ - if (self.__class__.provided_type and - not issubclass(provides, self.__class__.provided_type)): - raise Error('{0} can provide only {1} instances'.format( - self.__class__, self.__class__.provided_type)) - - self.__instantiator = Factory(provides, *args, **kwargs) - + def __init__(self, provides=None, *args, **kwargs): + """Initialize provider.""" + self.__instantiator = Factory() + self.set_provides(provides) + self.set_args(*args) + self.set_kwargs(**kwargs) super(BaseSingleton, self).__init__() def __str__(self): @@ -2478,13 +2524,14 @@ cdef class BaseSingleton(Provider): if copied is not None: return copied - cls = self.cls - if isinstance(cls, Provider): - cls = deepcopy(cls, memo) + provides = self.provides + if isinstance(provides, Provider): + provides = deepcopy(provides, memo) - copied = self.__class__(cls, - *deepcopy(self.args, memo), - **deepcopy(self.kwargs, memo)) + copied = _memorized_duplicate(self, memo) + copied.set_provides(provides) + copied.set_args(*deepcopy(self.args, memo)) + copied.set_kwargs(**deepcopy(self.kwargs, memo)) copied.set_attributes(**deepcopy(self.attributes, memo)) self._copy_overridings(copied, memo) @@ -2498,9 +2545,23 @@ cdef class BaseSingleton(Provider): @property def provides(self): - """Return provided type.""" + """Return provider's provides.""" return self.__instantiator.provides + def set_provides(self, provides): + """Set provider's provides.""" + if (provides + and self.__class__.provided_type and + not issubclass(provides, self.__class__.provided_type)): + raise Error( + '{0} can provide only {1} instances'.format( + _class_qualname(self), + self.__class__.provided_type, + ), + ) + self.__instantiator.set_provides(provides) + return self + @property def args(self): """Return positional argument injections.""" @@ -2663,7 +2724,7 @@ cdef class Singleton(BaseSingleton): :type: type """ - def __init__(self, provides, *args, **kwargs): + def __init__(self, provides=None, *args, **kwargs): """Initializer. :param provides: Provided type. @@ -2730,7 +2791,7 @@ cdef class ThreadSafeSingleton(BaseSingleton): :type: :py:class:`threading.RLock` """ - def __init__(self, provides, *args, **kwargs): + def __init__(self, provides=None, *args, **kwargs): """Initializer. :param provides: Provided type. @@ -2813,7 +2874,7 @@ cdef class ThreadLocalSingleton(BaseSingleton): :type: type """ - def __init__(self, provides, *args, **kwargs): + def __init__(self, provides=None, *args, **kwargs): """Initializer. :param provides: Provided type. @@ -3188,8 +3249,10 @@ cdef class Dict(Provider): cdef class Resource(Provider): """Resource provider provides a component with initialization and shutdown.""" - def __init__(self, initializer, *args, **kwargs): - self.__initializer = initializer + def __init__(self, provides=None, *args, **kwargs): + self.__provides = None + self.set_provides(provides) + self.__initialized = False self.__resource = None self.__shutdowner = None @@ -3213,11 +3276,11 @@ cdef class Resource(Provider): if self.__initialized: raise Error('Can not copy initialized resource') - copied = self.__class__( - self.__initializer, - *deepcopy(self.args, memo), - **deepcopy(self.kwargs, memo), - ) + copied = _memorized_duplicate(self, memo) + copied.set_provides(_copy_if_provider(self.provides, memo)) + copied.set_args(*deepcopy(self.args, memo)) + copied.set_kwargs(**deepcopy(self.kwargs, memo)) + self._copy_overridings(copied, memo) return copied @@ -3227,12 +3290,17 @@ cdef class Resource(Provider): :rtype: str """ - return represent_provider(provider=self, provides=self.__initializer) + return represent_provider(provider=self, provides=self.provides) @property - def initializer(self): - """Return initializer.""" - return self.__initializer + def provides(self): + """Return provider's provides.""" + return self.__provides + + def set_provides(self, provides): + """Set provider's provides.""" + self.__provides = provides + return self @property def args(self): @@ -3357,7 +3425,7 @@ cdef class Resource(Provider): @property def related(self): """Return related providers generator.""" - yield from filter(is_provider, [self.__initializer]) + yield from filter(is_provider, [self.provides]) yield from filter(is_provider, self.args) yield from filter(is_provider, self.kwargs.values()) yield from super().related @@ -3366,8 +3434,8 @@ cdef class Resource(Provider): if self.__initialized: return self.__resource - if self._is_resource_subclass(self.__initializer): - initializer = self.__initializer() + if self._is_resource_subclass(self.__provides): + initializer = self.__provides() self.__resource = __call( initializer.init, args, @@ -3378,8 +3446,8 @@ cdef class Resource(Provider): self.__kwargs_len, ) self.__shutdowner = initializer.shutdown - elif self._is_async_resource_subclass(self.__initializer): - initializer = self.__initializer() + elif self._is_async_resource_subclass(self.__provides): + initializer = self.__provides() async_init = __call( initializer.init, args, @@ -3391,9 +3459,9 @@ cdef class Resource(Provider): ) self.__initialized = True return self._create_init_future(async_init, initializer.shutdown) - elif inspect.isgeneratorfunction(self.__initializer): + elif inspect.isgeneratorfunction(self.__provides): initializer = __call( - self.__initializer, + self.__provides, args, self.__args, self.__args_len, @@ -3403,9 +3471,9 @@ cdef class Resource(Provider): ) self.__resource = next(initializer) self.__shutdowner = initializer.send - elif iscoroutinefunction(self.__initializer): + elif iscoroutinefunction(self.__provides): initializer = __call( - self.__initializer, + self.__provides, args, self.__args, self.__args_len, @@ -3415,9 +3483,9 @@ cdef class Resource(Provider): ) self.__initialized = True return self._create_init_future(initializer) - elif isasyncgenfunction(self.__initializer): + elif isasyncgenfunction(self.__provides): initializer = __call( - self.__initializer, + self.__provides, args, self.__args, self.__args_len, @@ -3427,9 +3495,9 @@ cdef class Resource(Provider): ) self.__initialized = True return self._create_async_gen_init_future(initializer) - elif callable(self.__initializer): + elif callable(self.__provides): self.__resource = __call( - self.__initializer, + self.__provides, args, self.__args, self.__args_len, @@ -3695,10 +3763,14 @@ cdef class Selector(Provider): assert isinstance(instance_2, SomeOtherClass) """ - def __init__(self, selector, **providers): + def __init__(self, selector=None, **providers): """Initialize provider.""" - self.__selector = selector - self.__providers = providers + self.__selector = None + self.set_selector(selector) + + self.__providers = {} + self.set_providers(**providers) + super(Selector, self).__init__() def __deepcopy__(self, memo): @@ -3707,10 +3779,10 @@ cdef class Selector(Provider): if copied is not None: return copied - copied = self.__class__( - deepcopy(self.__selector, memo), - **deepcopy(self.__providers, memo), - ) + copied = _memorized_duplicate(self, memo) + copied.set_selector(deepcopy(self.__selector, memo)) + copied.set_providers(**deepcopy(self.__providers, memo)) + self._copy_overridings(copied, memo) return copied @@ -3743,11 +3815,26 @@ cdef class Selector(Provider): address=hex(id(self)), ) + @property + def selector(self): + """Return selector.""" + return self.__selector + + def set_selector(self, selector): + """Set selector.""" + self.__selector = selector + return self + @property def providers(self): """Return providers.""" return dict(self.__providers) + def set_providers(self, **providers: Provider): + """Set providers.""" + self.__providers = providers + return self + @property def related(self): """Return related providers generator.""" @@ -3799,219 +3886,21 @@ cdef class ProvidedInstance(Provider): - :py:class:`Dependency` """ - def __init__(self, provider): - self.__provider = provider + def __init__(self, provides=None): + self.__provides = None + self.set_provides(provides) super().__init__() def __repr__(self): - return f'{self.__class__.__name__}(\'{self.__provider}\')' - - def __deepcopy__(self, memo=None): - cdef ProvidedInstance copied + return f'{self.__class__.__name__}(\'{self.__provides}\')' + def __deepcopy__(self, memo): copied = memo.get(id(self)) if copied is not None: return copied - return self.__class__( - deepcopy(self.__provider, memo), - ) - - def __getattr__(self, item): - return AttributeGetter(self, item) - - def __getitem__(self, item): - return ItemGetter(self, item) - - @property - def provides(self): - """Return provider.""" - return self.__provider - - def call(self, *args, **kwargs): - return MethodCaller(self, *args, **kwargs) - - @property - def related(self): - """Return related providers generator.""" - yield self.__provider - yield from super().related - - cpdef object _provide(self, tuple args, dict kwargs): - return self.__provider(*args, **kwargs) - - -cdef class AttributeGetter(Provider): - """Provider that returns the attribute of the injected instance. - - You should not create this provider directly. See :py:class:`ProvidedInstance` instead. - """ - - def __init__(self, provider, attribute): - self.__provider = provider - self.__attribute = attribute - super().__init__() - - def __repr__(self): - return f'{self.__class__.__name__}(\'{self.__attribute}\')' - - def __deepcopy__(self, memo=None): - cdef AttributeGetter copied - - copied = memo.get(id(self)) - if copied is not None: - return copied - - return self.__class__( - deepcopy(self.__provider, memo), - self.__attribute, - ) - - def __getattr__(self, item): - return AttributeGetter(self, item) - - def __getitem__(self, item): - return ItemGetter(self, item) - - @property - def provides(self): - """Return provider.""" - return self.__provider - - @property - def name(self): - """Return name of the attribute.""" - return self.__attribute - - def call(self, *args, **kwargs): - return MethodCaller(self, *args, **kwargs) - - @property - def related(self): - """Return related providers generator.""" - yield self.__provider - yield from super().related - - cpdef object _provide(self, tuple args, dict kwargs): - provided = self.__provider(*args, **kwargs) - if __is_future_or_coroutine(provided): - future_result = asyncio.Future() - provided = asyncio.ensure_future(provided) - provided.add_done_callback(functools.partial(self._async_provide, future_result)) - return future_result - return getattr(provided, self.__attribute) - - def _async_provide(self, future_result, future): - try: - provided = future.result() - result = getattr(provided, self.__attribute) - except Exception: - pass - else: - future_result.set_result(result) - - -cdef class ItemGetter(Provider): - """Provider that returns the item of the injected instance. - - You should not create this provider directly. See :py:class:`ProvidedInstance` instead. - """ - - def __init__(self, Provider provider, object item): - self.__provider = provider - self.__item = item - super().__init__() - - def __repr__(self): - return f'{self.__class__.__name__}(\'{self.__item}\')' - - def __deepcopy__(self, memo=None): - cdef ItemGetter copied - - copied = memo.get(id(self)) - if copied is not None: - return copied - - return self.__class__( - deepcopy(self.__provider, memo), - self.__item, - ) - - def __getattr__(self, item): - return AttributeGetter(self, item) - - def __getitem__(self, item): - return ItemGetter(self, item) - - @property - def provides(self): - """Return provider.""" - return self.__provider - - @property - def name(self): - """Return name of the item.""" - return self.__item - - def call(self, *args, **kwargs): - return MethodCaller(self, *args, **kwargs) - - @property - def related(self): - """Return related providers generator.""" - yield self.__provider - yield from super().related - - cpdef object _provide(self, tuple args, dict kwargs): - provided = self.__provider(*args, **kwargs) - if __is_future_or_coroutine(provided): - future_result = asyncio.Future() - provided = asyncio.ensure_future(provided) - provided.add_done_callback(functools.partial(self._async_provide, future_result)) - return future_result - return provided[self.__item] - - def _async_provide(self, future_result, future): - provided = future.result() - result = provided[self.__item] - future_result.set_result(result) - - -cdef class MethodCaller(Provider): - """Provider that calls the method of the injected instance. - - You should not create this provider directly. See :py:class:`ProvidedInstance` instead. - """ - - def __init__(self, provider, *args, **kwargs): - self.__provider = provider - - self.__args = parse_positional_injections(args) - self.__args_len = len(self.__args) - - self.__kwargs = parse_named_injections(kwargs) - self.__kwargs_len = len(self.__kwargs) - - super().__init__() - - def __repr__(self): - return f'{self.__class__.__name__}({self.__provider})' - - def __deepcopy__(self, memo=None): - cdef MethodCaller copied - - copied = memo.get(id(self)) - if copied is not None: - return copied - - copied = self.__class__(deepcopy(self.__provider, memo)) - copied.__args = deepcopy(self.__args, memo) - copied.__args_len = self.__args_len - copied.__kwargs = deepcopy(self.__kwargs, memo) - copied.__kwargs_len = self.__kwargs_len - - self._copy_overridings(copied, memo) - + copied = _memorized_duplicate(self, memo) + copied.set_provides(_copy_if_provider(self.provides, memo)) return copied def __getattr__(self, item): @@ -4022,8 +3911,245 @@ cdef class MethodCaller(Provider): @property def provides(self): - """Return provider.""" - return self.__provider + """Return provider's provides.""" + return self.__provides + + def set_provides(self, provides): + """Set provider's provides.""" + self.__provides = provides + return self + + def call(self, *args, **kwargs): + return MethodCaller(self, *args, **kwargs) + + @property + def related(self): + """Return related providers generator.""" + if is_provider(self.provides): + yield self.provides + yield from super().related + + cpdef object _provide(self, tuple args, dict kwargs): + return self.__provides(*args, **kwargs) + + +cdef class AttributeGetter(Provider): + """Provider that returns the attribute of the injected instance. + + You should not create this provider directly. See :py:class:`ProvidedInstance` instead. + """ + + def __init__(self, provides=None, name=None): + self.__provides = None + self.set_provides(provides) + + self.__name = None + self.set_name(name) + super().__init__() + + def __repr__(self): + return f'{self.__class__.__name__}(\'{self.name}\')' + + def __deepcopy__(self, memo): + copied = memo.get(id(self)) + if copied is not None: + return copied + + copied = _memorized_duplicate(self, memo) + copied.set_provides(_copy_if_provider(self.provides, memo)) + copied.set_name(self.name) + return copied + + def __getattr__(self, item): + return AttributeGetter(self, item) + + def __getitem__(self, item): + return ItemGetter(self, item) + + @property + def provides(self): + """Return provider's provides.""" + return self.__provides + + def set_provides(self, provides): + """Set provider's provides.""" + self.__provides = provides + return self + + @property + def name(self): + """Return name of the attribute.""" + return self.__name + + def set_name(self, name): + """Set name of the attribute.""" + self.__name = name + return self + + def call(self, *args, **kwargs): + return MethodCaller(self, *args, **kwargs) + + @property + def related(self): + """Return related providers generator.""" + if is_provider(self.provides): + yield self.provides + yield from super().related + + cpdef object _provide(self, tuple args, dict kwargs): + provided = self.provides(*args, **kwargs) + if __is_future_or_coroutine(provided): + future_result = asyncio.Future() + provided = asyncio.ensure_future(provided) + provided.add_done_callback(functools.partial(self._async_provide, future_result)) + return future_result + return getattr(provided, self.name) + + def _async_provide(self, future_result, future): + try: + provided = future.result() + result = getattr(provided, self.name) + except Exception as exception: + future_result.set_exception(exception) + else: + future_result.set_result(result) + + +cdef class ItemGetter(Provider): + """Provider that returns the item of the injected instance. + + You should not create this provider directly. See :py:class:`ProvidedInstance` instead. + """ + + def __init__(self, provides=None, name=None): + self.__provides = None + self.set_provides(provides) + + self.__name = None + self.set_name(name) + super().__init__() + + def __repr__(self): + return f'{self.__class__.__name__}(\'{self.name}\')' + + def __deepcopy__(self, memo): + copied = memo.get(id(self)) + if copied is not None: + return copied + + copied = _memorized_duplicate(self, memo) + copied.set_provides(_copy_if_provider(self.provides, memo)) + copied.set_name(self.name) + return copied + + def __getattr__(self, item): + return AttributeGetter(self, item) + + def __getitem__(self, item): + return ItemGetter(self, item) + + @property + def provides(self): + """Return provider's provides.""" + return self.__provides + + def set_provides(self, provides): + """Set provider's provides.""" + self.__provides = provides + return self + + @property + def name(self): + """Return name of the item.""" + return self.__name + + def set_name(self, name): + """Set name of the item.""" + self.__name = name + return self + + def call(self, *args, **kwargs): + return MethodCaller(self, *args, **kwargs) + + @property + def related(self): + """Return related providers generator.""" + if is_provider(self.provides): + yield self.provides + yield from super().related + + cpdef object _provide(self, tuple args, dict kwargs): + provided = self.provides(*args, **kwargs) + if __is_future_or_coroutine(provided): + future_result = asyncio.Future() + provided = asyncio.ensure_future(provided) + provided.add_done_callback(functools.partial(self._async_provide, future_result)) + return future_result + return provided[self.name] + + def _async_provide(self, future_result, future): + try: + provided = future.result() + result = provided[self.name] + except Exception as exception: + future_result.set_exception(exception) + else: + future_result.set_result(result) + + +cdef class MethodCaller(Provider): + """Provider that calls the method of the injected instance. + + You should not create this provider directly. See :py:class:`ProvidedInstance` instead. + """ + + def __init__(self, provides=None, *args, **kwargs): + self.__provides = None + self.set_provides(provides) + + self.__args = tuple() + self.__args_len = 0 + self.set_args(*args) + + self.__kwargs = tuple() + self.__kwargs_len = 0 + self.set_kwargs(**kwargs) + + super().__init__() + + def __repr__(self): + return f'{self.__class__.__name__}({self.provides})' + + def __deepcopy__(self, memo): + copied = memo.get(id(self)) + if copied is not None: + return copied + + copied = _memorized_duplicate(self, memo) + copied.set_provides(_copy_if_provider(self.provides, memo)) + copied.set_args(*deepcopy(self.args, memo)) + copied.set_kwargs(**deepcopy(self.kwargs, memo)) + self._copy_overridings(copied, memo) + return copied + + def __getattr__(self, item): + return AttributeGetter(self, item) + + def __getitem__(self, item): + return ItemGetter(self, item) + + def call(self, *args, **kwargs): + return MethodCaller(self, *args, **kwargs) + + @property + def provides(self): + """Return provider's provides.""" + return self.__provides + + def set_provides(self, provides): + """Set provider's provides.""" + self.__provides = provides + return self @property def args(self): @@ -4038,6 +4164,17 @@ cdef class MethodCaller(Provider): args.append(arg.__value) return tuple(args) + def set_args(self, *args): + """Set positional argument injections. + + Existing positional argument injections are dropped. + + :return: Reference ``self`` + """ + self.__args = parse_positional_injections(args) + self.__args_len = len(self.__args) + return self + @property def kwargs(self): """Return keyword argument injections.""" @@ -4051,19 +4188,28 @@ cdef class MethodCaller(Provider): kwargs[kwarg.__name] = kwarg.__value return kwargs - def call(self, *args, **kwargs): - return MethodCaller(self, *args, **kwargs) + def set_kwargs(self, **kwargs): + """Set keyword argument injections. + + Existing keyword argument injections are dropped. + + :return: Reference ``self`` + """ + self.__kwargs = parse_named_injections(kwargs) + self.__kwargs_len = len(self.__kwargs) + return self @property def related(self): """Return related providers generator.""" - yield self.__provider + if is_provider(self.provides): + yield self.provides yield from filter(is_provider, self.args) yield from filter(is_provider, self.kwargs.values()) yield from super().related cpdef object _provide(self, tuple args, dict kwargs): - call = self.__provider() + call = self.provides() if __is_future_or_coroutine(call): future_result = asyncio.Future() call = asyncio.ensure_future(call) @@ -4080,17 +4226,21 @@ cdef class MethodCaller(Provider): ) def _async_provide(self, future_result, args, kwargs, future): - call = future.result() - result = __call( - call, - args, - self.__args, - self.__args_len, - kwargs, - self.__kwargs, - self.__kwargs_len, - ) - future_result.set_result(result) + try: + call = future.result() + result = __call( + call, + args, + self.__args, + self.__args_len, + kwargs, + self.__kwargs, + self.__kwargs_len, + ) + except Exception as exception: + future_result.set_exception(exception) + else: + future_result.set_result(result) cdef class Injection(object): @@ -4449,3 +4599,22 @@ cpdef _copy_parent(object from_, object to, dict memo): else from_.parent ) to.assign_parent(copied_parent) + + +cpdef object _memorized_duplicate(object instance, dict memo): + copied = instance.__class__() + memo[id(instance)] = copied + return copied + + +cpdef object _copy_if_provider(object instance, dict memo): + if not is_provider(instance): + return instance + return deepcopy(instance, memo) + + +cpdef str _class_qualname(object instance): + name = getattr(instance.__class__, '__qualname__', None) + if not name: + name = '.'.join((instance.__class__.__module__, instance.__class__.__name__)) + return name \ No newline at end of file diff --git a/src/dependency_injector/schema.py b/src/dependency_injector/schema.py new file mode 100644 index 00000000..58873cf6 --- /dev/null +++ b/src/dependency_injector/schema.py @@ -0,0 +1,231 @@ +"""Schema module.""" + +import builtins +import importlib +from typing import Dict, Any, Type, Optional + +from . import containers, providers + + +ContainerSchema = Dict[Any, Any] +ProviderSchema = Dict[Any, Any] + + +class SchemaProcessorV1: + + def __init__(self, schema: ContainerSchema) -> None: + self._schema = schema + self._container = containers.DynamicContainer() + + def process(self): + """Process schema.""" + self._create_providers(self._schema['container']) + self._setup_injections(self._schema['container']) + + def get_providers(self): + """Return providers.""" + return self._container.providers + + def _create_providers( + self, + provider_schema: ProviderSchema, + container: Optional[containers.Container] = None, + ) -> None: + if container is None: + container = self._container + for provider_name, data in provider_schema.items(): + provider = None + + if 'provider' in data: + provider_type = _get_provider_cls(data['provider']) + args = [] + + # provides = data.get('provides') + # if provides: + # provides = _import_string(provides) + # if provides: + # args.append(provides) + + provider = provider_type(*args) + + if provider is None: + provider = providers.Container(containers.DynamicContainer) + + container.set_provider(provider_name, provider) + + if isinstance(provider, providers.Container): + self._create_providers(provider_schema=data, container=provider) + + def _setup_injections( # noqa: C901 + self, + provider_schema: ProviderSchema, + container: Optional[containers.Container] = None, + ) -> None: + if container is None: + container = self._container + + for provider_name, data in provider_schema.items(): + provider = getattr(container, provider_name) + args = [] + kwargs = {} + + provides = data.get('provides') + if provides: + if isinstance(provides, str) and provides.startswith('container.'): + provides = self._resolve_provider(provides[len('container.'):]) + else: + provides = _import_string(provides) + provider.set_provides(provides) + + arg_injections = data.get('args') + if arg_injections: + for arg in arg_injections: + injection = None + + if isinstance(arg, str) and arg.startswith('container.'): + injection = self._resolve_provider(arg[len('container.'):]) + + # TODO: refactoring + if isinstance(arg, dict): + provider_args = [] + provider_type = _get_provider_cls(arg.get('provider')) + provides = arg.get('provides') + if provides: + if isinstance(provides, str) and provides.startswith('container.'): + provides = self._resolve_provider(provides[len('container.'):]) + else: + provides = _import_string(provides) + provider_args.append(provides) + for provider_arg in arg.get('args', []): + if isinstance(provider_arg, str) \ + and provider_arg.startswith('container.'): + provider_args.append( + self._resolve_provider(provider_arg[len('container.'):]), + ) + injection = provider_type(*provider_args) + + if not injection: + injection = arg + + args.append(injection) + if args: + provider.add_args(*args) + + kwarg_injections = data.get('kwargs') + if kwarg_injections: + for name, arg in kwarg_injections.items(): + injection = None + + if isinstance(arg, str) and arg.startswith('container.'): + injection = self._resolve_provider(arg[len('container.'):]) + + # TODO: refactoring + if isinstance(arg, dict): + provider_args = [] + provider_type = _get_provider_cls(arg.get('provider')) + provides = arg.get('provides') + if provides: + if isinstance(provides, str) and provides.startswith('container.'): + provides = self._resolve_provider(provides[len('container.'):]) + else: + provides = _import_string(provides) + provider_args.append(provides) + for provider_arg in arg.get('args', []): + if isinstance(provider_arg, str) \ + and provider_arg.startswith('container.'): + provider_args.append( + self._resolve_provider(provider_arg[len('container.'):]), + ) + injection = provider_type(*provider_args) + + if not injection: + injection = arg + + kwargs[name] = injection + if kwargs: + provider.add_kwargs(**kwargs) + + if isinstance(provider, providers.Container): + self._setup_injections(provider_schema=data, container=provider) + + def _resolve_provider(self, name: str) -> Optional[providers.Provider]: + segments = name.split('.') + try: + provider = getattr(self._container, segments[0]) + except AttributeError: + return None + + for segment in segments[1:]: + parentheses = '' + if '(' in segment and ')' in segment: + parentheses = segment[segment.find('('):segment.rfind(')')+1] + segment = segment.replace(parentheses, '') + + try: + provider = getattr(provider, segment) + except AttributeError: + # TODO + return None + + if parentheses: + # TODO + provider = provider() + + return provider + + +def build_schema(schema: ContainerSchema) -> Dict[str, providers.Provider]: + """Build provider schema.""" + schema_processor = SchemaProcessorV1(schema) + schema_processor.process() + return schema_processor.get_providers() + + +def _get_provider_cls(provider_cls_name: str) -> Type[providers.Provider]: + std_provider_type = _fetch_provider_cls_from_std(provider_cls_name) + if std_provider_type: + return std_provider_type + + custom_provider_type = _import_provider_cls(provider_cls_name) + if custom_provider_type: + return custom_provider_type + + raise SchemaError(f'Undefined provider class "{provider_cls_name}"') + + +def _fetch_provider_cls_from_std(provider_cls_name: str) -> Optional[Type[providers.Provider]]: + return getattr(providers, provider_cls_name, None) + + +def _import_provider_cls(provider_cls_name: str) -> Optional[Type[providers.Provider]]: + try: + cls = _import_string(provider_cls_name) + except (ImportError, ValueError) as exception: + raise SchemaError(f'Can not import provider "{provider_cls_name}"') from exception + except AttributeError: + return None + else: + if isinstance(cls, type) and not issubclass(cls, providers.Provider): + raise SchemaError(f'Provider class "{cls}" is not a subclass of providers base class') + return cls + + +def _import_string(string_name: str) -> Optional[object]: + segments = string_name.split('.') + + if len(segments) == 1: + member = getattr(builtins, segments[0], None) + if member: + return member + + module_name = '.'.join(segments[:-1]) + if not module_name: + return None + + member = segments[-1] + module = importlib.import_module(module_name) + return getattr(module, member, None) + + +class SchemaError(Exception): + """Schema-related error.""" diff --git a/src/dependency_injector/wiring.py b/src/dependency_injector/wiring.py index ab92c6fc..029cc069 100644 --- a/src/dependency_injector/wiring.py +++ b/src/dependency_injector/wiring.py @@ -771,7 +771,7 @@ class ProvidedInstance(Modifier): def modify( self, - provider: providers.ConfigurationOption, + provider: providers.Provider, providers_map: ProvidersMap, ) -> providers.Provider: provider = provider.provided @@ -860,7 +860,7 @@ class AutoLoader: @property def installed(self): - return self._path_hook is not None + return self._path_hook in sys.path_hooks def install(self): if self.installed: diff --git a/tests/unit/containers/test_declarative_py2_py3.py b/tests/unit/containers/test_declarative_py2_py3.py index a25ed8ce..8bf8b8e2 100644 --- a/tests/unit/containers/test_declarative_py2_py3.py +++ b/tests/unit/containers/test_declarative_py2_py3.py @@ -412,7 +412,7 @@ class DeclarativeContainerTests(unittest.TestCase): class Services(containers.DeclarativeContainer): a = providers.Dependency() c = providers.Factory(C, a=a) - b = providers.Factory(B, fa=a.delegate()) + b = providers.Factory(B, fa=a.provider) a = providers.Factory(A) assert isinstance(Services(a=a).c().a, A) # ok diff --git a/tests/unit/providers/test_async_py36.py b/tests/unit/providers/test_async_py36.py index 81510efc..a971ff03 100644 --- a/tests/unit/providers/test_async_py36.py +++ b/tests/unit/providers/test_async_py36.py @@ -655,6 +655,32 @@ class ProvidedInstanceTests(AsyncTestCase): self.assertIs(instance2.resource, RESOURCE1) self.assertIs(instance1.resource, instance2.resource) + def test_provided_attribute_error(self): + async def raise_exception(): + raise RuntimeError() + + class TestContainer(containers.DeclarativeContainer): + client = providers.Factory(raise_exception) + + container = TestContainer() + + with self.assertRaises(RuntimeError): + self._run(container.client.provided.attr()) + + def test_provided_attribute_undefined_attribute(self): + class TestClient: + def __init__(self, resource): + self.resource = resource + + class TestContainer(containers.DeclarativeContainer): + resource = providers.Resource(init_resource, providers.Object(RESOURCE1)) + client = providers.Factory(TestClient, resource=resource) + + container = TestContainer() + + with self.assertRaises(AttributeError): + self._run(container.client.provided.attr()) + def test_provided_item(self): class TestClient: def __init__(self, resource): @@ -685,6 +711,28 @@ class ProvidedInstanceTests(AsyncTestCase): self.assertIs(instance2.resource, RESOURCE1) self.assertIs(instance1.resource, instance2.resource) + def test_provided_item_error(self): + async def raise_exception(): + raise RuntimeError() + + class TestContainer(containers.DeclarativeContainer): + client = providers.Factory(raise_exception) + + container = TestContainer() + + with self.assertRaises(RuntimeError): + self._run(container.client.provided['item']()) + + def test_provided_item_undefined_item(self): + class TestContainer(containers.DeclarativeContainer): + resource = providers.Resource(init_resource, providers.Object(RESOURCE1)) + client = providers.Factory(dict, resource=resource) + + container = TestContainer() + + with self.assertRaises(KeyError): + self._run(container.client.provided['item']()) + def test_provided_method_call(self): class TestClient: def __init__(self, resource): @@ -715,6 +763,31 @@ class ProvidedInstanceTests(AsyncTestCase): self.assertIs(instance2.resource, RESOURCE1) self.assertIs(instance1.resource, instance2.resource) + def test_provided_method_call_parent_error(self): + async def raise_exception(): + raise RuntimeError() + + class TestContainer(containers.DeclarativeContainer): + client = providers.Factory(raise_exception) + + container = TestContainer() + + with self.assertRaises(RuntimeError): + self._run(container.client.provided.method.call()()) + + def test_provided_method_call_error(self): + class TestClient: + def method(self): + raise RuntimeError() + + class TestContainer(containers.DeclarativeContainer): + client = providers.Factory(TestClient) + + container = TestContainer() + + with self.assertRaises(RuntimeError): + self._run(container.client.provided.method.call()()) + class DependencyTests(AsyncTestCase): @@ -996,7 +1069,7 @@ class AsyncProvidersWithAsyncDependenciesTests(AsyncTestCase): container = Container() service = self._run(container.service()) - self.assertEquals(service, {'service': 'ok', 'db': {'db': 'ok'}}) + self.assertEqual(service, {'service': 'ok', 'db': {'db': 'ok'}}) class AsyncProviderWithAwaitableObjectTests(AsyncTestCase): diff --git a/tests/unit/providers/test_base_py2_py3.py b/tests/unit/providers/test_base_py2_py3.py index 83ac61b5..290d328e 100644 --- a/tests/unit/providers/test_base_py2_py3.py +++ b/tests/unit/providers/test_base_py2_py3.py @@ -1,6 +1,7 @@ """Dependency injector base providers unit tests.""" import unittest +import warnings from dependency_injector import ( containers, @@ -21,13 +22,14 @@ class ProviderTests(unittest.TestCase): self.assertRaises(NotImplementedError, self.provider.__call__) def test_delegate(self): - delegate1 = self.provider.delegate() + with warnings.catch_warnings(): + warnings.simplefilter('ignore') + delegate1 = self.provider.delegate() + delegate2 = self.provider.delegate() self.assertIsInstance(delegate1, providers.Delegate) self.assertIs(delegate1(), self.provider) - delegate2 = self.provider.delegate() - self.assertIsInstance(delegate2, providers.Delegate) self.assertIs(delegate2(), self.provider) @@ -150,6 +152,17 @@ class ObjectProviderTests(unittest.TestCase): def test_is_provider(self): self.assertTrue(providers.is_provider(providers.Object(object()))) + def test_init_optional_provides(self): + instance = object() + provider = providers.Object() + provider.set_provides(instance) + self.assertIs(provider.provides, instance) + self.assertIs(provider(), instance) + + def test_set_provides_returns_self(self): + provider = providers.Object() + self.assertIs(provider.set_provides(object()), provider) + def test_provided_instance_provider(self): provider = providers.Object(object()) self.assertIsInstance(provider.provided, providers.ProvidedInstance) @@ -289,6 +302,16 @@ class DelegateTests(unittest.TestCase): def test_is_provider(self): self.assertTrue(providers.is_provider(self.delegate)) + def test_init_optional_provides(self): + provider = providers.Delegate() + provider.set_provides(self.delegated) + self.assertIs(provider.provides, self.delegated) + self.assertIs(provider(), self.delegated) + + def test_set_provides_returns_self(self): + provider = providers.Delegate() + self.assertIs(provider.set_provides(self.delegated), provider) + def test_init_with_not_provider(self): self.assertRaises(errors.Error, providers.Delegate, object()) @@ -312,6 +335,24 @@ class DependencyTests(unittest.TestCase): def setUp(self): self.provider = providers.Dependency(instance_of=list) + def test_init_optional(self): + list_provider = providers.List(1, 2, 3) + provider = providers.Dependency() + provider.set_instance_of(list) + provider.set_default(list_provider) + + self.assertIs(provider.instance_of, list) + self.assertIs(provider.default, list_provider) + self.assertEqual(provider(), [1, 2, 3]) + + def test_set_instance_of_returns_self(self): + provider = providers.Dependency() + self.assertIs(provider.set_instance_of(list), provider) + + def test_set_default_returns_self(self): + provider = providers.Dependency() + self.assertIs(provider.set_default(providers.Provider()), provider) + def test_init_with_not_class(self): self.assertRaises(TypeError, providers.Dependency, object()) diff --git a/tests/unit/providers/test_callables_py2_py3.py b/tests/unit/providers/test_callables_py2_py3.py index d24fd6eb..112f5d7d 100644 --- a/tests/unit/providers/test_callables_py2_py3.py +++ b/tests/unit/providers/test_callables_py2_py3.py @@ -22,6 +22,16 @@ class CallableTests(unittest.TestCase): def test_init_with_not_callable(self): self.assertRaises(errors.Error, providers.Callable, 123) + def test_init_optional_provides(self): + provider = providers.Callable() + provider.set_provides(object) + self.assertIs(provider.provides, object) + self.assertIsInstance(provider(), object) + + def test_set_provides_returns_self(self): + provider = providers.Callable() + self.assertIs(provider.set_provides(object), provider) + def test_provided_instance_provider(self): provider = providers.Callable(_example) self.assertIsInstance(provider.provided, providers.ProvidedInstance) diff --git a/tests/unit/providers/test_configuration_py2_py3.py b/tests/unit/providers/test_configuration_py2_py3.py index 1036e3c2..f7df9175 100644 --- a/tests/unit/providers/test_configuration_py2_py3.py +++ b/tests/unit/providers/test_configuration_py2_py3.py @@ -28,6 +28,28 @@ class ConfigTests(unittest.TestCase): def tearDown(self): del self.config + def test_init_optional(self): + provider = providers.Configuration() + provider.set_name('myconfig') + provider.set_default({'foo': 'bar'}) + provider.set_strict(True) + + self.assertEqual(provider.get_name(), 'myconfig') + self.assertEqual(provider.get_default(), {'foo': 'bar'}) + self.assertTrue(provider.get_strict()) + + def test_set_name_returns_self(self): + provider = providers.Configuration() + self.assertIs(provider.set_name('myconfig'), provider) + + def test_set_default_returns_self(self): + provider = providers.Configuration() + self.assertIs(provider.set_default({}), provider) + + def test_set_strict_returns_self(self): + provider = providers.Configuration() + self.assertIs(provider.set_strict(True), provider) + def test_default_name(self): config = providers.Configuration() self.assertEqual(config.get_name(), 'config') diff --git a/tests/unit/providers/test_coroutines_py35.py b/tests/unit/providers/test_coroutines_py35.py index c19a58c9..54f4cb00 100644 --- a/tests/unit/providers/test_coroutines_py35.py +++ b/tests/unit/providers/test_coroutines_py35.py @@ -1,8 +1,8 @@ """Dependency injector coroutine providers unit tests.""" import asyncio - import unittest +import warnings from dependency_injector import ( providers, @@ -43,6 +43,16 @@ class CoroutineTests(AsyncTestCase): def test_init_with_not_coroutine(self): self.assertRaises(errors.Error, providers.Coroutine, lambda: None) + def test_init_optional_provides(self): + provider = providers.Coroutine() + provider.set_provides(_example) + self.assertIs(provider.provides, _example) + self.assertEqual(run(provider(1, 2, 3, 4)), (1, 2, 3, 4)) + + def test_set_provides_returns_self(self): + provider = providers.Coroutine() + self.assertIs(provider.set_provides(_example), provider) + def test_call_with_positional_args(self): provider = providers.Coroutine(_example, 1, 2, 3, 4) self.assertTupleEqual(self._run(provider()), (1, 2, 3, 4)) @@ -232,9 +242,12 @@ class AbstractCoroutineTests(AsyncTestCase): providers.Coroutine) def test_call_overridden_by_coroutine(self): - @asyncio.coroutine - def _abstract_example(): - raise RuntimeError('Should not be raised') + with warnings.catch_warnings(): + warnings.simplefilter('ignore') + + @asyncio.coroutine + def _abstract_example(): + raise RuntimeError('Should not be raised') provider = providers.AbstractCoroutine(_abstract_example) provider.override(providers.Coroutine(_example)) @@ -242,9 +255,12 @@ class AbstractCoroutineTests(AsyncTestCase): self.assertTrue(self._run(provider(1, 2, 3, 4)), (1, 2, 3, 4)) def test_call_overridden_by_delegated_coroutine(self): - @asyncio.coroutine - def _abstract_example(): - raise RuntimeError('Should not be raised') + with warnings.catch_warnings(): + warnings.simplefilter('ignore') + + @asyncio.coroutine + def _abstract_example(): + raise RuntimeError('Should not be raised') provider = providers.AbstractCoroutine(_abstract_example) provider.override(providers.DelegatedCoroutine(_example)) diff --git a/tests/unit/providers/test_factories_py2_py3.py b/tests/unit/providers/test_factories_py2_py3.py index 1a6a82e5..bd16220c 100644 --- a/tests/unit/providers/test_factories_py2_py3.py +++ b/tests/unit/providers/test_factories_py2_py3.py @@ -34,6 +34,16 @@ class FactoryTests(unittest.TestCase): def test_init_with_not_callable(self): self.assertRaises(errors.Error, providers.Factory, 123) + def test_init_optional_provides(self): + provider = providers.Factory() + provider.set_provides(object) + self.assertIs(provider.provides, object) + self.assertIsInstance(provider(), object) + + def test_set_provides_returns_self(self): + provider = providers.Factory() + self.assertIs(provider.set_provides(object), provider) + def test_init_with_valid_provided_type(self): class ExampleProvider(providers.Factory): provided_type = Example @@ -502,6 +512,26 @@ class FactoryAggregateTests(unittest.TestCase): example_a=providers.Factory(self.ExampleA), example_b=object()) + def test_init_optional_factories(self): + provider = providers.FactoryAggregate() + provider.set_factories( + example_a=self.example_a_factory, + example_b=self.example_b_factory, + ) + self.assertEqual( + provider.factories, + { + 'example_a': self.example_a_factory, + 'example_b': self.example_b_factory, + }, + ) + self.assertIsInstance(provider('example_a'), self.ExampleA) + self.assertIsInstance(provider('example_b'), self.ExampleB) + + def test_set_provides_returns_self(self): + provider = providers.FactoryAggregate() + self.assertIs(provider.set_factories(example_a=self.example_a_factory), provider) + def test_call(self): object_a = self.factory_aggregate('example_a', 1, 2, init_arg3=3, init_arg4=4) diff --git a/tests/unit/providers/test_provided_instance_py2_py3.py b/tests/unit/providers/test_provided_instance_py2_py3.py index d1e8345b..8cad2d19 100644 --- a/tests/unit/providers/test_provided_instance_py2_py3.py +++ b/tests/unit/providers/test_provided_instance_py2_py3.py @@ -126,6 +126,44 @@ class ProvidedInstanceTests(unittest.TestCase): ) +class LazyInitTests(unittest.TestCase): + + def test_provided_instance(self): + provides = providers.Object(object()) + provider = providers.ProvidedInstance() + provider.set_provides(provides) + self.assertIs(provider.provides, provides) + self.assertIs(provider.set_provides(providers.Provider()), provider) + + def test_attribute_getter(self): + provides = providers.Object(object()) + provider = providers.AttributeGetter() + provider.set_provides(provides) + provider.set_name('__dict__') + self.assertIs(provider.provides, provides) + self.assertEqual(provider.name, '__dict__') + self.assertIs(provider.set_provides(providers.Provider()), provider) + self.assertIs(provider.set_name('__dict__'), provider) + + def test_item_getter(self): + provides = providers.Object({'foo': 'bar'}) + provider = providers.ItemGetter() + provider.set_provides(provides) + provider.set_name('foo') + self.assertIs(provider.provides, provides) + self.assertEqual(provider.name, 'foo') + self.assertIs(provider.set_provides(providers.Provider()), provider) + self.assertIs(provider.set_name('foo'), provider) + + def test_method_caller(self): + provides = providers.Object(lambda: 42) + provider = providers.MethodCaller() + provider.set_provides(provides) + self.assertIs(provider.provides, provides) + self.assertEqual(provider(), 42) + self.assertIs(provider.set_provides(providers.Provider()), provider) + + class ProvidedInstancePuzzleTests(unittest.TestCase): def test_puzzled(self): diff --git a/tests/unit/providers/test_resource_py35.py b/tests/unit/providers/test_resource_py35.py index b32acf17..3a912307 100644 --- a/tests/unit/providers/test_resource_py35.py +++ b/tests/unit/providers/test_resource_py35.py @@ -29,6 +29,16 @@ class ResourceTests(unittest.TestCase): def test_is_provider(self): self.assertTrue(providers.is_provider(providers.Resource(init_fn))) + def test_init_optional_provides(self): + provider = providers.Resource() + provider.set_provides(init_fn) + self.assertIs(provider.provides, init_fn) + self.assertEqual(provider(), (tuple(), dict())) + + def test_set_provides_returns_self(self): + provider = providers.Resource() + self.assertIs(provider.set_provides(init_fn), provider) + def test_provided_instance_provider(self): provider = providers.Resource(init_fn) self.assertIsInstance(provider.provided, providers.ProvidedInstance) diff --git a/tests/unit/providers/test_selector_py2_py3.py b/tests/unit/providers/test_selector_py2_py3.py index f9cd16b5..14ad32e3 100644 --- a/tests/unit/providers/test_selector_py2_py3.py +++ b/tests/unit/providers/test_selector_py2_py3.py @@ -16,6 +16,28 @@ class SelectorTests(unittest.TestCase): def test_is_provider(self): self.assertTrue(providers.is_provider(providers.Selector(self.selector))) + def test_init_optional(self): + one = providers.Object(1) + two = providers.Object(2) + + provider = providers.Selector() + provider.set_selector(self.selector) + provider.set_providers(one=one, two=two) + + self.assertEqual(provider.providers, {'one': one, 'two': two}) + with self.selector.override('one'): + self.assertEqual(provider(), one()) + with self.selector.override('two'): + self.assertEqual(provider(), two()) + + def test_set_selector_returns_self(self): + provider = providers.Selector() + self.assertIs(provider.set_selector(self.selector), provider) + + def test_set_providers_returns_self(self): + provider = providers.Selector() + self.assertIs(provider.set_providers(one=providers.Provider()), provider) + def test_provided_instance_provider(self): provider = providers.Selector(self.selector) self.assertIsInstance(provider.provided, providers.ProvidedInstance) diff --git a/tests/unit/providers/test_singletons_py2_py3.py b/tests/unit/providers/test_singletons_py2_py3.py index 24a8c73f..2ea492f6 100644 --- a/tests/unit/providers/test_singletons_py2_py3.py +++ b/tests/unit/providers/test_singletons_py2_py3.py @@ -36,6 +36,16 @@ class _BaseSingletonTestCase(object): def test_init_with_not_callable(self): self.assertRaises(errors.Error, self.singleton_cls, 123) + def test_init_optional_provides(self): + provider = self.singleton_cls() + provider.set_provides(object) + self.assertIs(provider.provides, object) + self.assertIsInstance(provider(), object) + + def test_set_provides_returns_self(self): + provider = self.singleton_cls() + self.assertIs(provider.set_provides(object), provider) + def test_init_with_valid_provided_type(self): class ExampleProvider(self.singleton_cls): provided_type = Example diff --git a/tests/unit/samples/schemasample/__init__.py b/tests/unit/samples/schemasample/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/samples/schemasample/container-boto3-session.yml b/tests/unit/samples/schemasample/container-boto3-session.yml new file mode 100644 index 00000000..1c10c085 --- /dev/null +++ b/tests/unit/samples/schemasample/container-boto3-session.yml @@ -0,0 +1,27 @@ +version: "1" + +container: + + config: + provider: Configuration + + session: + provider: Singleton + provides: boto3.session.Session + kwargs: + aws_access_key_id: container.config.aws_access_key_id + aws_secret_access_key: container.config.aws_secret_access_key + aws_session_token: container.config.aws_session_token + region_name: container.config.aws_region_name + + s3_client: + provider: Factory + provides: container.session.provided.client.call() + kwargs: + service_name: s3 + + sqs_client: + provider: Factory + provides: container.session.provided.client.call() + kwargs: + service_name: sqs diff --git a/tests/unit/samples/schemasample/container-multiple-inline.yml b/tests/unit/samples/schemasample/container-multiple-inline.yml new file mode 100644 index 00000000..a089508f --- /dev/null +++ b/tests/unit/samples/schemasample/container-multiple-inline.yml @@ -0,0 +1,58 @@ +version: "1" + +container: + + core: + config: + provider: Configuration + + gateways: + database_client: + provider: Singleton + provides: sqlite3.connect + args: + - provider: Callable + provides: schemasample.utils.return_ + args: + - container.core.config.database.dsn + + s3_client: + provider: Singleton + provides: boto3.client + kwargs: + service_name: s3 + aws_access_key_id: container.core.config.aws.access_key_id + aws_secret_access_key: container.core.config.aws.secret_access_key + + services: + user: + provider: Factory + provides: schemasample.services.UserService + kwargs: + db: + provider: Callable + provides: schemasample.utils.return_ + args: + - container.gateways.database_client + + auth: + provider: Factory + provides: schemasample.services.AuthService + kwargs: + db: + provider: Callable + provides: schemasample.utils.return_ + args: + - container.gateways.database_client + token_ttl: container.core.config.auth.token_ttl.as_int() + + photo: + provider: Factory + provides: schemasample.services.PhotoService + kwargs: + db: + provider: Callable + provides: schemasample.utils.return_ + args: + - container.gateways.database_client + s3: container.gateways.s3_client diff --git a/tests/unit/samples/schemasample/container-multiple-reordered.yml b/tests/unit/samples/schemasample/container-multiple-reordered.yml new file mode 100644 index 00000000..245c4f37 --- /dev/null +++ b/tests/unit/samples/schemasample/container-multiple-reordered.yml @@ -0,0 +1,43 @@ +version: "1" + +container: + + services: + user: + provider: Factory + provides: schemasample.services.UserService + kwargs: + db: container.gateways.database_client + + auth: + provider: Factory + provides: schemasample.services.AuthService + kwargs: + db: container.gateways.database_client + token_ttl: container.core.config.auth.token_ttl.as_int() + + photo: + provider: Factory + provides: schemasample.services.PhotoService + kwargs: + db: container.gateways.database_client + s3: container.gateways.s3_client + + gateways: + database_client: + provider: Singleton + provides: sqlite3.connect + args: + - container.core.config.database.dsn + + s3_client: + provider: Singleton + provides: boto3.client + kwargs: + service_name: s3 + aws_access_key_id: core.config.aws.access_key_id + aws_secret_access_key: core.config.aws.secret_access_key + + core: + config: + provider: Configuration diff --git a/tests/unit/samples/schemasample/container-multiple.yml b/tests/unit/samples/schemasample/container-multiple.yml new file mode 100644 index 00000000..03a5221a --- /dev/null +++ b/tests/unit/samples/schemasample/container-multiple.yml @@ -0,0 +1,43 @@ +version: "1" + +container: + + core: + config: + provider: Configuration + + gateways: + database_client: + provider: Singleton + provides: sqlite3.connect + args: + - container.core.config.database.dsn + + s3_client: + provider: Singleton + provides: boto3.client + kwargs: + service_name: s3 + aws_access_key_id: container.core.config.aws.access_key_id + aws_secret_access_key: container.core.config.aws.secret_access_key + + services: + user: + provider: Factory + provides: schemasample.services.UserService + kwargs: + db: container.gateways.database_client + + auth: + provider: Factory + provides: schemasample.services.AuthService + kwargs: + db: container.gateways.database_client + token_ttl: container.core.config.auth.token_ttl.as_int() + + photo: + provider: Factory + provides: schemasample.services.PhotoService + kwargs: + db: container.gateways.database_client + s3: container.gateways.s3_client diff --git a/tests/unit/samples/schemasample/container-single.yml b/tests/unit/samples/schemasample/container-single.yml new file mode 100644 index 00000000..ad732992 --- /dev/null +++ b/tests/unit/samples/schemasample/container-single.yml @@ -0,0 +1,39 @@ +version: "1" + +container: + config: + provider: Configuration + + database_client: + provider: Singleton + provides: sqlite3.connect + args: + - container.config.database.dsn + + s3_client: + provider: Singleton + provides: boto3.client + kwargs: + service_name: s3 + aws_access_key_id: container.config.aws.access_key_id + aws_secret_access_key: container.config.aws.secret_access_key + + user_service: + provider: Factory + provides: schemasample.services.UserService + kwargs: + db: container.database_client + + auth_service: + provider: Factory + provides: schemasample.services.AuthService + kwargs: + db: container.database_client + token_ttl: container.config.auth.token_ttl.as_int() + + photo_service: + provider: Factory + provides: schemasample.services.PhotoService + kwargs: + db: container.database_client + s3: container.s3_client diff --git a/tests/unit/samples/schemasample/services.py b/tests/unit/samples/schemasample/services.py new file mode 100644 index 00000000..338888e3 --- /dev/null +++ b/tests/unit/samples/schemasample/services.py @@ -0,0 +1,56 @@ +"""Services module.""" + +import logging +import sqlite3 +from typing import Dict + +from mypy_boto3_s3 import S3Client + + +class BaseService: + + def __init__(self) -> None: + self.logger = logging.getLogger( + f'{__name__}.{self.__class__.__name__}', + ) + + +class UserService(BaseService): + + def __init__(self, db: sqlite3.Connection) -> None: + self.db = db + super().__init__() + + def get_user(self, email: str) -> Dict[str, str]: + self.logger.debug('User %s has been found in database', email) + return {'email': email, 'password_hash': '...'} + + +class AuthService(BaseService): + + def __init__(self, db: sqlite3.Connection, token_ttl: int) -> None: + self.db = db + self.token_ttl = token_ttl + super().__init__() + + def authenticate(self, user: Dict[str, str], password: str) -> None: + assert password is not None + self.logger.debug( + 'User %s has been successfully authenticated', + user['email'], + ) + + +class PhotoService(BaseService): + + def __init__(self, db: sqlite3.Connection, s3: S3Client) -> None: + self.db = db + self.s3 = s3 + super().__init__() + + def upload_photo(self, user: Dict[str, str], photo_path: str) -> None: + self.logger.debug( + 'Photo %s has been successfully uploaded by user %s', + photo_path, + user['email'], + ) diff --git a/tests/unit/samples/schemasample/utils.py b/tests/unit/samples/schemasample/utils.py new file mode 100644 index 00000000..4b371b2b --- /dev/null +++ b/tests/unit/samples/schemasample/utils.py @@ -0,0 +1,2 @@ +def return_(instance): + return instance diff --git a/tests/unit/samples/wiringsamples/imports.py b/tests/unit/samples/wiringsamples/imports.py new file mode 100644 index 00000000..243c9117 --- /dev/null +++ b/tests/unit/samples/wiringsamples/imports.py @@ -0,0 +1,13 @@ +"""Test module for wiring.""" + +import sys + +if 'pypy' not in sys.version.lower(): + import numpy # noqa + from numpy import * # noqa + + import scipy # noqa + from scipy import * # noqa + + import builtins # noqa + from builtins import * # noqa diff --git a/tests/unit/samples/wiringsamples/module.py b/tests/unit/samples/wiringsamples/module.py index eabfb525..333de332 100644 --- a/tests/unit/samples/wiringsamples/module.py +++ b/tests/unit/samples/wiringsamples/module.py @@ -1,7 +1,6 @@ """Test module for wiring.""" from decimal import Decimal -import sys from typing import Callable from dependency_injector import providers @@ -129,16 +128,3 @@ def test_class_decorator(service: Service = Provide[Container.service]): def test_container(container: Container = Provide[Container]): return container.service() - - -# Import tests - -if 'pypy' not in sys.version.lower(): - import numpy # noqa - from numpy import * # noqa - - import scipy # noqa - from scipy import * # noqa - - import builtins # noqa - from builtins import * # noqa diff --git a/tests/unit/schema/__init__.py b/tests/unit/schema/__init__.py new file mode 100644 index 00000000..15936b4f --- /dev/null +++ b/tests/unit/schema/__init__.py @@ -0,0 +1 @@ +"""Schema tests.""" diff --git a/tests/unit/schema/test_containers_api_py36.py b/tests/unit/schema/test_containers_api_py36.py new file mode 100644 index 00000000..eb44bd4d --- /dev/null +++ b/tests/unit/schema/test_containers_api_py36.py @@ -0,0 +1,162 @@ +import contextlib +import json +import os.path +import tempfile +import unittest + +import yaml +from dependency_injector import containers, providers, errors + + +class FromSchemaTests(unittest.TestCase): + + def test(self): + container = containers.DynamicContainer() + container.from_schema( + { + 'version': '1', + 'container': { + 'provider1': { + 'provider': 'Factory', + 'provides': 'list', + 'args': [1, 2, 3], + }, + 'provider2': { + 'provider': 'Factory', + 'provides': 'dict', + 'kwargs': { + 'one': 'container.provider1', + 'two': 2, + }, + }, + }, + }, + ) + + self.assertIsInstance(container.provider1, providers.Factory) + self.assertIs(container.provider1.provides, list) + self.assertEqual(container.provider1.args, (1, 2, 3)) + + self.assertIsInstance(container.provider2, providers.Factory) + self.assertIs(container.provider2.provides, dict) + self.assertEqual(container.provider2.kwargs, {'one': container.provider1, 'two': 2}) + + +class FromYamlSchemaTests(unittest.TestCase): + + def test(self): + container = containers.DynamicContainer() + + with tempfile.TemporaryDirectory() as tmp_dir: + schema_path = os.path.join(tmp_dir, 'schema.yml') + with open(schema_path, 'w') as file: + file.write(""" + version: "1" + container: + provider1: + provider: Factory + provides: list + args: + - 1 + - 2 + - 3 + provider2: + provider: Factory + provides: dict + kwargs: + one: container.provider1 + two: 2 + """) + + container.from_yaml_schema(schema_path) + + self.assertIsInstance(container.provider1, providers.Factory) + self.assertIs(container.provider1.provides, list) + self.assertEqual(container.provider1.args, (1, 2, 3)) + + self.assertIsInstance(container.provider2, providers.Factory) + self.assertIs(container.provider2.provides, dict) + self.assertEqual(container.provider2.kwargs, {'one': container.provider1, 'two': 2}) + + def test_with_loader(self): + container = containers.DynamicContainer() + + with tempfile.TemporaryDirectory() as tmp_dir: + schema_path = os.path.join(tmp_dir, 'schema.yml') + with open(schema_path, 'w') as file: + file.write(""" + version: "1" + container: + provider: + provider: Factory + provides: list + args: [1, 2, 3] + """) + + container.from_yaml_schema(schema_path, loader=yaml.Loader) + + self.assertIsInstance(container.provider, providers.Factory) + self.assertIs(container.provider.provides, list) + self.assertEqual(container.provider.args, (1, 2, 3)) + + def test_no_yaml_installed(self): + @contextlib.contextmanager + def no_yaml_module(): + containers.yaml = None + yield + containers.yaml = yaml + + container = containers.DynamicContainer() + with no_yaml_module(): + with self.assertRaises(errors.Error) as error: + container.from_yaml_schema('./no-yaml-installed.yml') + + self.assertEqual( + error.exception.args[0], + 'Unable to load yaml schema - PyYAML is not installed. ' + 'Install PyYAML or install Dependency Injector with yaml extras: ' + '"pip install dependency-injector[yaml]"', + ) + + +class FromJsonSchemaTests(unittest.TestCase): + + def test(self): + container = containers.DynamicContainer() + + with tempfile.TemporaryDirectory() as tmp_dir: + schema_path = os.path.join(tmp_dir, 'schema.json') + with open(schema_path, 'w') as file: + file.write( + json.dumps( + { + 'version': '1', + 'container': { + 'provider1': { + 'provider': 'Factory', + 'provides': 'list', + 'args': [1, 2, 3], + }, + 'provider2': { + 'provider': 'Factory', + 'provides': 'dict', + 'kwargs': { + 'one': 'container.provider1', + 'two': 2, + }, + }, + }, + }, + indent=4, + ), + ) + + container.from_json_schema(schema_path) + + self.assertIsInstance(container.provider1, providers.Factory) + self.assertIs(container.provider1.provides, list) + self.assertEqual(container.provider1.args, (1, 2, 3)) + + self.assertIsInstance(container.provider2, providers.Factory) + self.assertIs(container.provider2.provides, dict) + self.assertEqual(container.provider2.kwargs, {'one': container.provider1, 'two': 2}) diff --git a/tests/unit/schema/test_integration_py36.py b/tests/unit/schema/test_integration_py36.py new file mode 100644 index 00000000..2cc77e1a --- /dev/null +++ b/tests/unit/schema/test_integration_py36.py @@ -0,0 +1,293 @@ +import sqlite3 +import unittest + +from dependency_injector import containers + +# Runtime import +import os +_TOP_DIR = os.path.abspath( + os.path.sep.join(( + os.path.dirname(__file__), + '../', + )), +) +_SAMPLES_DIR = os.path.abspath( + os.path.sep.join(( + os.path.dirname(__file__), + '../samples/', + )), +) +import sys +sys.path.append(_SAMPLES_DIR) + +from schemasample.services import UserService, AuthService, PhotoService + + +class TestSchemaSingleContainer(unittest.TestCase): + + def test(self): + container = containers.DynamicContainer() + container.from_yaml_schema(f'{_SAMPLES_DIR}/schemasample/container-single.yml') + container.config.from_dict({ + 'database': { + 'dsn': ':memory:', + }, + 'aws': { + 'access_key_id': 'KEY', + 'secret_access_key': 'SECRET', + }, + 'auth': { + 'token_ttl': 3600, + }, + }) + + # User service + user_service1 = container.user_service() + user_service2 = container.user_service() + self.assertIsInstance(user_service1, UserService) + self.assertIsInstance(user_service2, UserService) + self.assertIsNot(user_service1, user_service2) + + self.assertIsInstance(user_service1.db, sqlite3.Connection) + self.assertIsInstance(user_service2.db, sqlite3.Connection) + self.assertIs(user_service1.db, user_service2.db) + + # Auth service + auth_service1 = container.auth_service() + auth_service2 = container.auth_service() + self.assertIsInstance(auth_service1, AuthService) + self.assertIsInstance(auth_service2, AuthService) + self.assertIsNot(auth_service1, auth_service2) + + self.assertIsInstance(auth_service1.db, sqlite3.Connection) + self.assertIsInstance(auth_service2.db, sqlite3.Connection) + self.assertIs(auth_service1.db, auth_service2.db) + self.assertIs(auth_service1.db, container.database_client()) + self.assertIs(auth_service2.db, container.database_client()) + + self.assertEqual(auth_service1.token_ttl, 3600) + self.assertEqual(auth_service2.token_ttl, 3600) + + # Photo service + photo_service1 = container.photo_service() + photo_service2 = container.photo_service() + self.assertIsInstance(photo_service1, PhotoService) + self.assertIsInstance(photo_service2, PhotoService) + self.assertIsNot(photo_service1, photo_service2) + + self.assertIsInstance(photo_service1.db, sqlite3.Connection) + self.assertIsInstance(photo_service2.db, sqlite3.Connection) + self.assertIs(photo_service1.db, photo_service2.db) + self.assertIs(photo_service1.db, container.database_client()) + self.assertIs(photo_service2.db, container.database_client()) + + self.assertIs(photo_service1.s3, photo_service2.s3) + self.assertIs(photo_service1.s3, container.s3_client()) + self.assertIs(photo_service2.s3, container.s3_client()) + + +class TestSchemaMultipleContainers(unittest.TestCase): + + def test(self): + container = containers.DynamicContainer() + container.from_yaml_schema(f'{_SAMPLES_DIR}/schemasample/container-multiple.yml') + container.core.config.from_dict({ + 'database': { + 'dsn': ':memory:', + }, + 'aws': { + 'access_key_id': 'KEY', + 'secret_access_key': 'SECRET', + }, + 'auth': { + 'token_ttl': 3600, + }, + }) + + # User service + user_service1 = container.services.user() + user_service2 = container.services.user() + self.assertIsInstance(user_service1, UserService) + self.assertIsInstance(user_service2, UserService) + self.assertIsNot(user_service1, user_service2) + + self.assertIsInstance(user_service1.db, sqlite3.Connection) + self.assertIsInstance(user_service2.db, sqlite3.Connection) + self.assertIs(user_service1.db, user_service2.db) + + # Auth service + auth_service1 = container.services.auth() + auth_service2 = container.services.auth() + self.assertIsInstance(auth_service1, AuthService) + self.assertIsInstance(auth_service2, AuthService) + self.assertIsNot(auth_service1, auth_service2) + + self.assertIsInstance(auth_service1.db, sqlite3.Connection) + self.assertIsInstance(auth_service2.db, sqlite3.Connection) + self.assertIs(auth_service1.db, auth_service2.db) + self.assertIs(auth_service1.db, container.gateways.database_client()) + self.assertIs(auth_service2.db, container.gateways.database_client()) + + self.assertEqual(auth_service1.token_ttl, 3600) + self.assertEqual(auth_service2.token_ttl, 3600) + + # Photo service + photo_service1 = container.services.photo() + photo_service2 = container.services.photo() + self.assertIsInstance(photo_service1, PhotoService) + self.assertIsInstance(photo_service2, PhotoService) + self.assertIsNot(photo_service1, photo_service2) + + self.assertIsInstance(photo_service1.db, sqlite3.Connection) + self.assertIsInstance(photo_service2.db, sqlite3.Connection) + self.assertIs(photo_service1.db, photo_service2.db) + self.assertIs(photo_service1.db, container.gateways.database_client()) + self.assertIs(photo_service2.db, container.gateways.database_client()) + + self.assertIs(photo_service1.s3, photo_service2.s3) + self.assertIs(photo_service1.s3, container.gateways.s3_client()) + self.assertIs(photo_service2.s3, container.gateways.s3_client()) + + +class TestSchemaMultipleContainersReordered(unittest.TestCase): + + def test(self): + container = containers.DynamicContainer() + container.from_yaml_schema(f'{_SAMPLES_DIR}/schemasample/container-multiple-reordered.yml') + container.core.config.from_dict({ + 'database': { + 'dsn': ':memory:', + }, + 'aws': { + 'access_key_id': 'KEY', + 'secret_access_key': 'SECRET', + }, + 'auth': { + 'token_ttl': 3600, + }, + }) + + # User service + user_service1 = container.services.user() + user_service2 = container.services.user() + self.assertIsInstance(user_service1, UserService) + self.assertIsInstance(user_service2, UserService) + self.assertIsNot(user_service1, user_service2) + + self.assertIsInstance(user_service1.db, sqlite3.Connection) + self.assertIsInstance(user_service2.db, sqlite3.Connection) + self.assertIs(user_service1.db, user_service2.db) + + # Auth service + auth_service1 = container.services.auth() + auth_service2 = container.services.auth() + self.assertIsInstance(auth_service1, AuthService) + self.assertIsInstance(auth_service2, AuthService) + self.assertIsNot(auth_service1, auth_service2) + + self.assertIsInstance(auth_service1.db, sqlite3.Connection) + self.assertIsInstance(auth_service2.db, sqlite3.Connection) + self.assertIs(auth_service1.db, auth_service2.db) + self.assertIs(auth_service1.db, container.gateways.database_client()) + self.assertIs(auth_service2.db, container.gateways.database_client()) + + self.assertEqual(auth_service1.token_ttl, 3600) + self.assertEqual(auth_service2.token_ttl, 3600) + + # Photo service + photo_service1 = container.services.photo() + photo_service2 = container.services.photo() + self.assertIsInstance(photo_service1, PhotoService) + self.assertIsInstance(photo_service2, PhotoService) + self.assertIsNot(photo_service1, photo_service2) + + self.assertIsInstance(photo_service1.db, sqlite3.Connection) + self.assertIsInstance(photo_service2.db, sqlite3.Connection) + self.assertIs(photo_service1.db, photo_service2.db) + self.assertIs(photo_service1.db, container.gateways.database_client()) + self.assertIs(photo_service2.db, container.gateways.database_client()) + + self.assertIs(photo_service1.s3, photo_service2.s3) + self.assertIs(photo_service1.s3, container.gateways.s3_client()) + self.assertIs(photo_service2.s3, container.gateways.s3_client()) + + +class TestSchemaMultipleContainersWithInlineProviders(unittest.TestCase): + + def test(self): + container = containers.DynamicContainer() + container.from_yaml_schema(f'{_SAMPLES_DIR}/schemasample/container-multiple-inline.yml') + container.core.config.from_dict({ + 'database': { + 'dsn': ':memory:', + }, + 'aws': { + 'access_key_id': 'KEY', + 'secret_access_key': 'SECRET', + }, + 'auth': { + 'token_ttl': 3600, + }, + }) + + # User service + user_service1 = container.services.user() + user_service2 = container.services.user() + self.assertIsInstance(user_service1, UserService) + self.assertIsInstance(user_service2, UserService) + self.assertIsNot(user_service1, user_service2) + + self.assertIsInstance(user_service1.db, sqlite3.Connection) + self.assertIsInstance(user_service2.db, sqlite3.Connection) + self.assertIs(user_service1.db, user_service2.db) + + # Auth service + auth_service1 = container.services.auth() + auth_service2 = container.services.auth() + self.assertIsInstance(auth_service1, AuthService) + self.assertIsInstance(auth_service2, AuthService) + self.assertIsNot(auth_service1, auth_service2) + + self.assertIsInstance(auth_service1.db, sqlite3.Connection) + self.assertIsInstance(auth_service2.db, sqlite3.Connection) + self.assertIs(auth_service1.db, auth_service2.db) + self.assertIs(auth_service1.db, container.gateways.database_client()) + self.assertIs(auth_service2.db, container.gateways.database_client()) + + self.assertEqual(auth_service1.token_ttl, 3600) + self.assertEqual(auth_service2.token_ttl, 3600) + + # Photo service + photo_service1 = container.services.photo() + photo_service2 = container.services.photo() + self.assertIsInstance(photo_service1, PhotoService) + self.assertIsInstance(photo_service2, PhotoService) + self.assertIsNot(photo_service1, photo_service2) + + self.assertIsInstance(photo_service1.db, sqlite3.Connection) + self.assertIsInstance(photo_service2.db, sqlite3.Connection) + self.assertIs(photo_service1.db, photo_service2.db) + self.assertIs(photo_service1.db, container.gateways.database_client()) + self.assertIs(photo_service2.db, container.gateways.database_client()) + + self.assertIs(photo_service1.s3, photo_service2.s3) + self.assertIs(photo_service1.s3, container.gateways.s3_client()) + self.assertIs(photo_service2.s3, container.gateways.s3_client()) + + +class TestSchemaBoto3Session(unittest.TestCase): + + def test(self): + container = containers.DynamicContainer() + container.from_yaml_schema(f'{_SAMPLES_DIR}/schemasample/container-boto3-session.yml') + container.config.from_dict( + { + 'aws_access_key_id': 'key', + 'aws_secret_access_key': 'secret', + 'aws_session_token': 'token', + 'aws_region_name': 'us-east-1', + }, + ) + + self.assertEqual(container.s3_client().__class__.__name__, 'S3') + self.assertEqual(container.sqs_client().__class__.__name__, 'SQS') diff --git a/tests/unit/wiring/test_wiring_py36.py b/tests/unit/wiring/test_wiring_py36.py index 91e7df5e..64ff7fc7 100644 --- a/tests/unit/wiring/test_wiring_py36.py +++ b/tests/unit/wiring/test_wiring_py36.py @@ -437,6 +437,7 @@ class AutoLoaderTest(unittest.TestCase): def test_register_container(self): register_loader_containers(self.container) importlib.reload(module) + importlib.import_module('wiringsamples.imports') service = module.test_function() self.assertIsInstance(service, Service) diff --git a/tests/unit/wiring/test_wiring_string_ids_py36.py b/tests/unit/wiring/test_wiring_string_ids_py36.py index 09d0d70c..be546db8 100644 --- a/tests/unit/wiring/test_wiring_string_ids_py36.py +++ b/tests/unit/wiring/test_wiring_string_ids_py36.py @@ -1,4 +1,6 @@ +import contextlib from decimal import Decimal +import importlib import unittest from dependency_injector.wiring import ( @@ -6,6 +8,8 @@ from dependency_injector.wiring import ( Provide, Provider, Closing, + register_loader_containers, + unregister_loader_containers, ) from dependency_injector import containers, providers, errors @@ -409,27 +413,27 @@ class WiringAsyncInjectionsTest(AsyncTestCase): self.assertEqual(asyncinjections.resource2.shutdown_counter, 2) -# class AutoLoaderTest(unittest.TestCase): -# -# container: Container -# -# def setUp(self) -> None: -# self.container = Container(config={'a': {'b': {'c': 10}}}) -# importlib.reload(module) -# -# def tearDown(self) -> None: -# with contextlib.suppress(ValueError): -# unregister_loader_containers(self.container) -# -# self.container.unwire() -# -# @classmethod -# def tearDownClass(cls) -> None: -# importlib.reload(module) -# -# def test_register_container(self): -# register_loader_containers(self.container) -# importlib.reload(module) -# -# service = module.test_function() -# self.assertIsInstance(service, Service) +class AutoLoaderTest(unittest.TestCase): + + container: Container + + def setUp(self) -> None: + self.container = Container(config={'a': {'b': {'c': 10}}}) + importlib.reload(module) + + def tearDown(self) -> None: + with contextlib.suppress(ValueError): + unregister_loader_containers(self.container) + + self.container.unwire() + + @classmethod + def tearDownClass(cls) -> None: + importlib.reload(module) + + def test_register_container(self): + register_loader_containers(self.container) + importlib.reload(module) + + service = module.test_function() + self.assertIsInstance(service, Service) diff --git a/tox.ini b/tox.ini index 595cd458..ce920813 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,8 @@ deps= fastapi numpy scipy + boto3 + mypy_boto3_s3 extras= yaml pydantic @@ -68,6 +70,8 @@ commands= deps= httpx fastapi + boto3 + mypy_boto3_s3 extras= yaml flask