mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-07-04 12:23:14 +03:00
Add fix and tests
This commit is contained in:
parent
77769d8dd6
commit
4cfe11506f
|
@ -3514,6 +3514,7 @@ static const char __pyx_k_async_ordered_shutdown[] = "_async_ordered_shutdown";
|
||||||
static const char __pyx_k_copy_locals__decorator[] = "copy.<locals>._decorator";
|
static const char __pyx_k_copy_locals__decorator[] = "copy.<locals>._decorator";
|
||||||
static const char __pyx_k_DynamicContainer___init[] = "DynamicContainer.__init__";
|
static const char __pyx_k_DynamicContainer___init[] = "DynamicContainer.__init__";
|
||||||
static const char __pyx_k_DynamicContainer_unwire[] = "DynamicContainer.unwire";
|
static const char __pyx_k_DynamicContainer_unwire[] = "DynamicContainer.unwire";
|
||||||
|
static const char __pyx_k_new_container_providers[] = "new_container_providers";
|
||||||
static const char __pyx_k_DynamicContainer_override[] = "DynamicContainer.override";
|
static const char __pyx_k_DynamicContainer_override[] = "DynamicContainer.override";
|
||||||
static const char __pyx_k_DynamicContainer_traverse[] = "DynamicContainer.traverse";
|
static const char __pyx_k_DynamicContainer_traverse[] = "DynamicContainer.traverse";
|
||||||
static const char __pyx_k_DeclarativeContainer___new[] = "DeclarativeContainer.__new__";
|
static const char __pyx_k_DeclarativeContainer___new[] = "DeclarativeContainer.__new__";
|
||||||
|
@ -3524,6 +3525,7 @@ static const char __pyx_k_has_undefined_dependencies[] = "\" has undefined depen
|
||||||
static const char __pyx_k_override_locals__decorator[] = "override.<locals>._decorator";
|
static const char __pyx_k_override_locals__decorator[] = "override.<locals>._decorator";
|
||||||
static const char __pyx_k_DynamicContainer___deepcopy[] = "DynamicContainer.__deepcopy__";
|
static const char __pyx_k_DynamicContainer___deepcopy[] = "DynamicContainer.__deepcopy__";
|
||||||
static const char __pyx_k_get_memo_for_matching_names[] = "_get_memo_for_matching_names";
|
static const char __pyx_k_get_memo_for_matching_names[] = "_get_memo_for_matching_names";
|
||||||
|
static const char __pyx_k_new_container_cls_providers[] = "new_container_cls_providers";
|
||||||
static const char __pyx_k_DynamicContainer_from_schema[] = "DynamicContainer.from_schema";
|
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_DynamicContainer_parent_name[] = "DynamicContainer.parent_name";
|
||||||
static const char __pyx_k_SingletonResetContext___exit[] = "SingletonResetContext.__exit__";
|
static const char __pyx_k_SingletonResetContext___exit[] = "SingletonResetContext.__exit__";
|
||||||
|
@ -3776,6 +3778,8 @@ static PyObject *__pyx_n_s_name;
|
||||||
static PyObject *__pyx_n_s_name_2;
|
static PyObject *__pyx_n_s_name_2;
|
||||||
static PyObject *__pyx_n_s_new;
|
static PyObject *__pyx_n_s_new;
|
||||||
static PyObject *__pyx_n_s_new_container;
|
static PyObject *__pyx_n_s_new_container;
|
||||||
|
static PyObject *__pyx_n_s_new_container_cls_providers;
|
||||||
|
static PyObject *__pyx_n_s_new_container_providers;
|
||||||
static PyObject *__pyx_n_s_object;
|
static PyObject *__pyx_n_s_object;
|
||||||
static PyObject *__pyx_n_s_open;
|
static PyObject *__pyx_n_s_open;
|
||||||
static PyObject *__pyx_n_s_other_resource;
|
static PyObject *__pyx_n_s_other_resource;
|
||||||
|
@ -17987,7 +17991,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_memo_for
|
||||||
* if name not in source_providers:
|
* if name not in source_providers:
|
||||||
* continue # <<<<<<<<<<<<<<
|
* continue # <<<<<<<<<<<<<<
|
||||||
* source_provider = source_providers[name]
|
* source_provider = source_providers[name]
|
||||||
*
|
* memo[id(source_provider)] = provider
|
||||||
*/
|
*/
|
||||||
goto __pyx_L3_continue;
|
goto __pyx_L3_continue;
|
||||||
|
|
||||||
|
@ -18004,29 +18008,29 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_memo_for
|
||||||
* if name not in source_providers:
|
* if name not in source_providers:
|
||||||
* continue
|
* continue
|
||||||
* source_provider = source_providers[name] # <<<<<<<<<<<<<<
|
* source_provider = source_providers[name] # <<<<<<<<<<<<<<
|
||||||
*
|
|
||||||
* memo[id(source_provider)] = provider
|
* memo[id(source_provider)] = provider
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
__pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_source_providers, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error)
|
__pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_source_providers, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
__Pyx_XDECREF_SET(__pyx_v_source_provider, __pyx_t_1);
|
__Pyx_XDECREF_SET(__pyx_v_source_provider, __pyx_t_1);
|
||||||
__pyx_t_1 = 0;
|
__pyx_t_1 = 0;
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":756
|
/* "dependency_injector/containers.pyx":755
|
||||||
|
* continue
|
||||||
* source_provider = source_providers[name]
|
* source_provider = source_providers[name]
|
||||||
*
|
|
||||||
* memo[id(source_provider)] = provider # <<<<<<<<<<<<<<
|
* memo[id(source_provider)] = provider # <<<<<<<<<<<<<<
|
||||||
|
*
|
||||||
* if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'):
|
* if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'):
|
||||||
* sub_memo = _get_memo_for_matching_names(provider.providers, source_provider.providers)
|
|
||||||
*/
|
*/
|
||||||
__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_source_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
|
__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_source_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
if (unlikely(PyDict_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_provider) < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
|
if (unlikely(PyDict_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_provider) < 0)) __PYX_ERR(0, 755, __pyx_L1_error)
|
||||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":757
|
/* "dependency_injector/containers.pyx":757
|
||||||
*
|
|
||||||
* memo[id(source_provider)] = provider
|
* memo[id(source_provider)] = provider
|
||||||
|
*
|
||||||
* if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'): # <<<<<<<<<<<<<<
|
* if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'): # <<<<<<<<<<<<<<
|
||||||
* sub_memo = _get_memo_for_matching_names(provider.providers, source_provider.providers)
|
* sub_memo = _get_memo_for_matching_names(provider.providers, source_provider.providers)
|
||||||
* memo.update(sub_memo)
|
* memo.update(sub_memo)
|
||||||
|
@ -18045,7 +18049,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_memo_for
|
||||||
if (__pyx_t_10) {
|
if (__pyx_t_10) {
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":758
|
/* "dependency_injector/containers.pyx":758
|
||||||
* memo[id(source_provider)] = provider
|
*
|
||||||
* if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'):
|
* if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'):
|
||||||
* sub_memo = _get_memo_for_matching_names(provider.providers, source_provider.providers) # <<<<<<<<<<<<<<
|
* sub_memo = _get_memo_for_matching_names(provider.providers, source_provider.providers) # <<<<<<<<<<<<<<
|
||||||
* memo.update(sub_memo)
|
* memo.update(sub_memo)
|
||||||
|
@ -18075,8 +18079,8 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy__get_memo_for
|
||||||
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":757
|
/* "dependency_injector/containers.pyx":757
|
||||||
*
|
|
||||||
* memo[id(source_provider)] = provider
|
* memo[id(source_provider)] = provider
|
||||||
|
*
|
||||||
* if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'): # <<<<<<<<<<<<<<
|
* if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'): # <<<<<<<<<<<<<<
|
||||||
* sub_memo = _get_memo_for_matching_names(provider.providers, source_provider.providers)
|
* sub_memo = _get_memo_for_matching_names(provider.providers, source_provider.providers)
|
||||||
* memo.update(sub_memo)
|
* memo.update(sub_memo)
|
||||||
|
@ -18160,9 +18164,11 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P
|
||||||
struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_10_copy *__pyx_cur_scope;
|
struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_10_copy *__pyx_cur_scope;
|
||||||
struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_10_copy *__pyx_outer_scope;
|
struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_10_copy *__pyx_outer_scope;
|
||||||
PyObject *__pyx_v_memo = NULL;
|
PyObject *__pyx_v_memo = NULL;
|
||||||
|
PyObject *__pyx_v_new_container_cls_providers = NULL;
|
||||||
PyObject *__pyx_v_providers_copy = NULL;
|
PyObject *__pyx_v_providers_copy = NULL;
|
||||||
PyObject *__pyx_v_name = NULL;
|
PyObject *__pyx_v_name = NULL;
|
||||||
PyObject *__pyx_v_provider = NULL;
|
PyObject *__pyx_v_provider = NULL;
|
||||||
|
PyObject *__pyx_v_new_container_providers = NULL;
|
||||||
PyObject *__pyx_r = NULL;
|
PyObject *__pyx_r = NULL;
|
||||||
__Pyx_RefNannyDeclarations
|
__Pyx_RefNannyDeclarations
|
||||||
PyObject *__pyx_t_1 = NULL;
|
PyObject *__pyx_t_1 = NULL;
|
||||||
|
@ -18199,7 +18205,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P
|
||||||
* memo = {}
|
* memo = {}
|
||||||
* memo.update(_get_memo_for_matching_names(new_container.cls_providers, base_container.providers)) # <<<<<<<<<<<<<<
|
* memo.update(_get_memo_for_matching_names(new_container.cls_providers, base_container.providers)) # <<<<<<<<<<<<<<
|
||||||
*
|
*
|
||||||
* providers_copy = providers.deepcopy(base_container.providers, memo)
|
* new_container_cls_providers = dict(new_container.cls_providers)
|
||||||
*/
|
*/
|
||||||
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_container, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_container, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
|
@ -18219,18 +18225,33 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P
|
||||||
/* "dependency_injector/containers.pyx":766
|
/* "dependency_injector/containers.pyx":766
|
||||||
* memo.update(_get_memo_for_matching_names(new_container.cls_providers, base_container.providers))
|
* memo.update(_get_memo_for_matching_names(new_container.cls_providers, base_container.providers))
|
||||||
*
|
*
|
||||||
|
* new_container_cls_providers = dict(new_container.cls_providers) # <<<<<<<<<<<<<<
|
||||||
|
*
|
||||||
|
* providers_copy = providers.deepcopy(base_container.providers, memo)
|
||||||
|
*/
|
||||||
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_container, __pyx_n_s_cls_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L1_error)
|
||||||
|
__Pyx_GOTREF(__pyx_t_2);
|
||||||
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 766, __pyx_L1_error)
|
||||||
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||||
|
__pyx_v_new_container_cls_providers = ((PyObject*)__pyx_t_3);
|
||||||
|
__pyx_t_3 = 0;
|
||||||
|
|
||||||
|
/* "dependency_injector/containers.pyx":768
|
||||||
|
* new_container_cls_providers = dict(new_container.cls_providers)
|
||||||
|
*
|
||||||
* providers_copy = providers.deepcopy(base_container.providers, memo) # <<<<<<<<<<<<<<
|
* providers_copy = providers.deepcopy(base_container.providers, memo) # <<<<<<<<<<<<<<
|
||||||
* for name, provider in six.iteritems(providers_copy):
|
* for name, provider in six.iteritems(providers_copy):
|
||||||
* setattr(new_container, name, provider)
|
* setattr(new_container, name, provider)
|
||||||
*/
|
*/
|
||||||
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 766, __pyx_L1_error)
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_3);
|
__Pyx_GOTREF(__pyx_t_2);
|
||||||
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 766, __pyx_L1_error)
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||||
if (unlikely(!__pyx_cur_scope->__pyx_v_base_container)) { __Pyx_RaiseClosureNameError("base_container"); __PYX_ERR(0, 766, __pyx_L1_error) }
|
if (unlikely(!__pyx_cur_scope->__pyx_v_base_container)) { __Pyx_RaiseClosureNameError("base_container"); __PYX_ERR(0, 768, __pyx_L1_error) }
|
||||||
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_base_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 766, __pyx_L1_error)
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_base_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_3);
|
__Pyx_GOTREF(__pyx_t_2);
|
||||||
__pyx_t_4 = NULL;
|
__pyx_t_4 = NULL;
|
||||||
__pyx_t_5 = 0;
|
__pyx_t_5 = 0;
|
||||||
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
|
||||||
|
@ -18245,52 +18266,52 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P
|
||||||
}
|
}
|
||||||
#if CYTHON_FAST_PYCALL
|
#if CYTHON_FAST_PYCALL
|
||||||
if (PyFunction_Check(__pyx_t_1)) {
|
if (PyFunction_Check(__pyx_t_1)) {
|
||||||
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_memo};
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_memo};
|
||||||
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __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, 768, __pyx_L1_error)
|
||||||
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||||
__Pyx_GOTREF(__pyx_t_2);
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#if CYTHON_FAST_PYCCALL
|
#if CYTHON_FAST_PYCCALL
|
||||||
if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
|
||||||
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_memo};
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_memo};
|
||||||
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __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, 768, __pyx_L1_error)
|
||||||
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||||
__Pyx_GOTREF(__pyx_t_2);
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 766, __pyx_L1_error)
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 768, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_6);
|
__Pyx_GOTREF(__pyx_t_6);
|
||||||
if (__pyx_t_4) {
|
if (__pyx_t_4) {
|
||||||
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
||||||
}
|
}
|
||||||
__Pyx_GIVEREF(__pyx_t_3);
|
__Pyx_GIVEREF(__pyx_t_2);
|
||||||
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
|
||||||
__Pyx_INCREF(__pyx_v_memo);
|
__Pyx_INCREF(__pyx_v_memo);
|
||||||
__Pyx_GIVEREF(__pyx_v_memo);
|
__Pyx_GIVEREF(__pyx_v_memo);
|
||||||
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_memo);
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_memo);
|
||||||
__pyx_t_3 = 0;
|
__pyx_t_2 = 0;
|
||||||
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L1_error)
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 768, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_2);
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||||
}
|
}
|
||||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||||
__pyx_v_providers_copy = __pyx_t_2;
|
__pyx_v_providers_copy = __pyx_t_3;
|
||||||
__pyx_t_2 = 0;
|
__pyx_t_3 = 0;
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":767
|
/* "dependency_injector/containers.pyx":769
|
||||||
*
|
*
|
||||||
* providers_copy = providers.deepcopy(base_container.providers, memo)
|
* providers_copy = providers.deepcopy(base_container.providers, memo)
|
||||||
* for name, provider in six.iteritems(providers_copy): # <<<<<<<<<<<<<<
|
* for name, provider in six.iteritems(providers_copy): # <<<<<<<<<<<<<<
|
||||||
* setattr(new_container, name, provider)
|
* setattr(new_container, name, provider)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__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, 767, __pyx_L1_error)
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 769, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_6);
|
__Pyx_GOTREF(__pyx_t_6);
|
||||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||||
__pyx_t_1 = NULL;
|
__pyx_t_1 = NULL;
|
||||||
|
@ -18303,58 +18324,252 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P
|
||||||
__Pyx_DECREF_SET(__pyx_t_6, function);
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
__pyx_t_2 = (__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_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;
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||||
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 769, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_2);
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||||
if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
|
if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
|
||||||
__pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
|
__pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
|
||||||
__pyx_t_8 = NULL;
|
__pyx_t_8 = NULL;
|
||||||
} else {
|
} else {
|
||||||
__pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 767, __pyx_L1_error)
|
__pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 769, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_6);
|
__Pyx_GOTREF(__pyx_t_6);
|
||||||
__pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 767, __pyx_L1_error)
|
__pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 769, __pyx_L1_error)
|
||||||
}
|
}
|
||||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (likely(!__pyx_t_8)) {
|
if (likely(!__pyx_t_8)) {
|
||||||
if (likely(PyList_CheckExact(__pyx_t_6))) {
|
if (likely(PyList_CheckExact(__pyx_t_6))) {
|
||||||
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
|
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
|
||||||
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
||||||
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 767, __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, 769, __pyx_L1_error)
|
||||||
#else
|
#else
|
||||||
__pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __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, 769, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_2);
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
|
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
|
||||||
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
||||||
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 767, __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, 769, __pyx_L1_error)
|
||||||
#else
|
#else
|
||||||
__pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __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, 769, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_2);
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
__pyx_t_2 = __pyx_t_8(__pyx_t_6);
|
__pyx_t_3 = __pyx_t_8(__pyx_t_6);
|
||||||
if (unlikely(!__pyx_t_2)) {
|
if (unlikely(!__pyx_t_3)) {
|
||||||
PyObject* exc_type = PyErr_Occurred();
|
PyObject* exc_type = PyErr_Occurred();
|
||||||
if (exc_type) {
|
if (exc_type) {
|
||||||
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
||||||
else __PYX_ERR(0, 767, __pyx_L1_error)
|
else __PYX_ERR(0, 769, __pyx_L1_error)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
__Pyx_GOTREF(__pyx_t_2);
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
}
|
}
|
||||||
if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
|
if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
|
||||||
PyObject* sequence = __pyx_t_2;
|
PyObject* sequence = __pyx_t_3;
|
||||||
Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
|
Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
|
||||||
if (unlikely(size != 2)) {
|
if (unlikely(size != 2)) {
|
||||||
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
||||||
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
||||||
__PYX_ERR(0, 767, __pyx_L1_error)
|
__PYX_ERR(0, 769, __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_2 = PyTuple_GET_ITEM(sequence, 1);
|
||||||
|
} else {
|
||||||
|
__pyx_t_1 = PyList_GET_ITEM(sequence, 0);
|
||||||
|
__pyx_t_2 = PyList_GET_ITEM(sequence, 1);
|
||||||
|
}
|
||||||
|
__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, 769, __pyx_L1_error)
|
||||||
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
|
__pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __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, 769, __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;
|
||||||
|
index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
|
||||||
|
__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, 769, __pyx_L1_error)
|
||||||
|
__pyx_t_9 = NULL;
|
||||||
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||||
|
goto __pyx_L6_unpacking_done;
|
||||||
|
__pyx_L5_unpacking_failed:;
|
||||||
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||||
|
__pyx_t_9 = NULL;
|
||||||
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
||||||
|
__PYX_ERR(0, 769, __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_2);
|
||||||
|
__pyx_t_2 = 0;
|
||||||
|
|
||||||
|
/* "dependency_injector/containers.pyx":770
|
||||||
|
* providers_copy = providers.deepcopy(base_container.providers, memo)
|
||||||
|
* for name, provider in six.iteritems(providers_copy):
|
||||||
|
* setattr(new_container, name, provider) # <<<<<<<<<<<<<<
|
||||||
|
*
|
||||||
|
* new_container_providers = providers.deepcopy(new_container_cls_providers, memo)
|
||||||
|
*/
|
||||||
|
__pyx_t_10 = PyObject_SetAttr(__pyx_v_new_container, __pyx_v_name, __pyx_v_provider); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 770, __pyx_L1_error)
|
||||||
|
|
||||||
|
/* "dependency_injector/containers.pyx":769
|
||||||
|
*
|
||||||
|
* providers_copy = providers.deepcopy(base_container.providers, memo)
|
||||||
|
* for name, provider in six.iteritems(providers_copy): # <<<<<<<<<<<<<<
|
||||||
|
* setattr(new_container, name, provider)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||||
|
|
||||||
|
/* "dependency_injector/containers.pyx":772
|
||||||
|
* setattr(new_container, name, provider)
|
||||||
|
*
|
||||||
|
* new_container_providers = providers.deepcopy(new_container_cls_providers, memo) # <<<<<<<<<<<<<<
|
||||||
|
* for name, provider in new_container_providers.items():
|
||||||
|
* setattr(new_container, name, provider)
|
||||||
|
*/
|
||||||
|
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_providers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error)
|
||||||
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
|
||||||
|
__Pyx_GOTREF(__pyx_t_2);
|
||||||
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||||
|
__pyx_t_3 = NULL;
|
||||||
|
__pyx_t_5 = 0;
|
||||||
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
||||||
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
||||||
|
if (likely(__pyx_t_3)) {
|
||||||
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
||||||
|
__Pyx_INCREF(__pyx_t_3);
|
||||||
|
__Pyx_INCREF(function);
|
||||||
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
||||||
|
__pyx_t_5 = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#if CYTHON_FAST_PYCALL
|
||||||
|
if (PyFunction_Check(__pyx_t_2)) {
|
||||||
|
PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_new_container_cls_providers, __pyx_v_memo};
|
||||||
|
__pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)
|
||||||
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||||
|
__Pyx_GOTREF(__pyx_t_6);
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
#if CYTHON_FAST_PYCCALL
|
||||||
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
|
||||||
|
PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_new_container_cls_providers, __pyx_v_memo};
|
||||||
|
__pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)
|
||||||
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||||
|
__Pyx_GOTREF(__pyx_t_6);
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
__pyx_t_1 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __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;
|
||||||
|
}
|
||||||
|
__Pyx_INCREF(__pyx_v_new_container_cls_providers);
|
||||||
|
__Pyx_GIVEREF(__pyx_v_new_container_cls_providers);
|
||||||
|
PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_5, __pyx_v_new_container_cls_providers);
|
||||||
|
__Pyx_INCREF(__pyx_v_memo);
|
||||||
|
__Pyx_GIVEREF(__pyx_v_memo);
|
||||||
|
PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_5, __pyx_v_memo);
|
||||||
|
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __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;
|
||||||
|
__pyx_v_new_container_providers = __pyx_t_6;
|
||||||
|
__pyx_t_6 = 0;
|
||||||
|
|
||||||
|
/* "dependency_injector/containers.pyx":773
|
||||||
|
*
|
||||||
|
* new_container_providers = providers.deepcopy(new_container_cls_providers, memo)
|
||||||
|
* for name, provider in new_container_providers.items(): # <<<<<<<<<<<<<<
|
||||||
|
* setattr(new_container, name, provider)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_container_providers, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __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_6 = (__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_6)) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
|
__Pyx_GOTREF(__pyx_t_6);
|
||||||
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||||
|
if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
|
||||||
|
__pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
|
||||||
|
__pyx_t_8 = NULL;
|
||||||
|
} else {
|
||||||
|
__pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
|
__Pyx_GOTREF(__pyx_t_2);
|
||||||
|
__pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
|
}
|
||||||
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||||
|
for (;;) {
|
||||||
|
if (likely(!__pyx_t_8)) {
|
||||||
|
if (likely(PyList_CheckExact(__pyx_t_2))) {
|
||||||
|
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
|
||||||
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
||||||
|
__pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
|
#else
|
||||||
|
__pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
|
__Pyx_GOTREF(__pyx_t_6);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
|
||||||
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
||||||
|
__pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
|
#else
|
||||||
|
__pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
|
__Pyx_GOTREF(__pyx_t_6);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
__pyx_t_6 = __pyx_t_8(__pyx_t_2);
|
||||||
|
if (unlikely(!__pyx_t_6)) {
|
||||||
|
PyObject* exc_type = PyErr_Occurred();
|
||||||
|
if (exc_type) {
|
||||||
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
||||||
|
else __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
__Pyx_GOTREF(__pyx_t_6);
|
||||||
|
}
|
||||||
|
if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
|
||||||
|
PyObject* sequence = __pyx_t_6;
|
||||||
|
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, 773, __pyx_L1_error)
|
||||||
}
|
}
|
||||||
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
||||||
if (likely(PyTuple_CheckExact(sequence))) {
|
if (likely(PyTuple_CheckExact(sequence))) {
|
||||||
|
@ -18367,58 +18582,58 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P
|
||||||
__Pyx_INCREF(__pyx_t_1);
|
__Pyx_INCREF(__pyx_t_1);
|
||||||
__Pyx_INCREF(__pyx_t_3);
|
__Pyx_INCREF(__pyx_t_3);
|
||||||
#else
|
#else
|
||||||
__pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
|
__pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
__pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 767, __pyx_L1_error)
|
__pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_3);
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
#endif
|
#endif
|
||||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||||
} else {
|
} else {
|
||||||
Py_ssize_t index = -1;
|
Py_ssize_t index = -1;
|
||||||
__pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 767, __pyx_L1_error)
|
__pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_4);
|
__Pyx_GOTREF(__pyx_t_4);
|
||||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||||
__pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
|
__pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
|
||||||
index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
|
index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L9_unpacking_failed;
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
|
index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
|
||||||
__Pyx_GOTREF(__pyx_t_3);
|
__Pyx_GOTREF(__pyx_t_3);
|
||||||
if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 767, __pyx_L1_error)
|
if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
__pyx_t_9 = NULL;
|
__pyx_t_9 = NULL;
|
||||||
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||||
goto __pyx_L6_unpacking_done;
|
goto __pyx_L10_unpacking_done;
|
||||||
__pyx_L5_unpacking_failed:;
|
__pyx_L9_unpacking_failed:;
|
||||||
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||||
__pyx_t_9 = NULL;
|
__pyx_t_9 = NULL;
|
||||||
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
||||||
__PYX_ERR(0, 767, __pyx_L1_error)
|
__PYX_ERR(0, 773, __pyx_L1_error)
|
||||||
__pyx_L6_unpacking_done:;
|
__pyx_L10_unpacking_done:;
|
||||||
}
|
}
|
||||||
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
|
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
|
||||||
__pyx_t_1 = 0;
|
__pyx_t_1 = 0;
|
||||||
__Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_3);
|
__Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_3);
|
||||||
__pyx_t_3 = 0;
|
__pyx_t_3 = 0;
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":768
|
/* "dependency_injector/containers.pyx":774
|
||||||
* providers_copy = providers.deepcopy(base_container.providers, memo)
|
* new_container_providers = providers.deepcopy(new_container_cls_providers, memo)
|
||||||
* for name, provider in six.iteritems(providers_copy):
|
* for name, provider in new_container_providers.items():
|
||||||
* setattr(new_container, name, provider) # <<<<<<<<<<<<<<
|
* setattr(new_container, name, provider) # <<<<<<<<<<<<<<
|
||||||
*
|
*
|
||||||
* return new_container
|
* return new_container
|
||||||
*/
|
*/
|
||||||
__pyx_t_10 = PyObject_SetAttr(__pyx_v_new_container, __pyx_v_name, __pyx_v_provider); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 768, __pyx_L1_error)
|
__pyx_t_10 = PyObject_SetAttr(__pyx_v_new_container, __pyx_v_name, __pyx_v_provider); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":767
|
/* "dependency_injector/containers.pyx":773
|
||||||
*
|
*
|
||||||
* providers_copy = providers.deepcopy(base_container.providers, memo)
|
* new_container_providers = providers.deepcopy(new_container_cls_providers, memo)
|
||||||
* for name, provider in six.iteritems(providers_copy): # <<<<<<<<<<<<<<
|
* for name, provider in new_container_providers.items(): # <<<<<<<<<<<<<<
|
||||||
* setattr(new_container, name, provider)
|
* setattr(new_container, name, provider)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":770
|
/* "dependency_injector/containers.pyx":776
|
||||||
* setattr(new_container, name, provider)
|
* setattr(new_container, name, provider)
|
||||||
*
|
*
|
||||||
* return new_container # <<<<<<<<<<<<<<
|
* return new_container # <<<<<<<<<<<<<<
|
||||||
|
@ -18449,9 +18664,11 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_4copy_2_decorator(P
|
||||||
__pyx_r = NULL;
|
__pyx_r = NULL;
|
||||||
__pyx_L0:;
|
__pyx_L0:;
|
||||||
__Pyx_XDECREF(__pyx_v_memo);
|
__Pyx_XDECREF(__pyx_v_memo);
|
||||||
|
__Pyx_XDECREF(__pyx_v_new_container_cls_providers);
|
||||||
__Pyx_XDECREF(__pyx_v_providers_copy);
|
__Pyx_XDECREF(__pyx_v_providers_copy);
|
||||||
__Pyx_XDECREF(__pyx_v_name);
|
__Pyx_XDECREF(__pyx_v_name);
|
||||||
__Pyx_XDECREF(__pyx_v_provider);
|
__Pyx_XDECREF(__pyx_v_provider);
|
||||||
|
__Pyx_XDECREF(__pyx_v_new_container_providers);
|
||||||
__Pyx_XGIVEREF(__pyx_r);
|
__Pyx_XGIVEREF(__pyx_r);
|
||||||
__Pyx_RefNannyFinishContext();
|
__Pyx_RefNannyFinishContext();
|
||||||
return __pyx_r;
|
return __pyx_r;
|
||||||
|
@ -18512,7 +18729,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_6copy(CYTHON_UNUSED
|
||||||
__pyx_v__decorator = __pyx_t_1;
|
__pyx_v__decorator = __pyx_t_1;
|
||||||
__pyx_t_1 = 0;
|
__pyx_t_1 = 0;
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":771
|
/* "dependency_injector/containers.pyx":777
|
||||||
*
|
*
|
||||||
* return new_container
|
* return new_container
|
||||||
* return _decorator # <<<<<<<<<<<<<<
|
* return _decorator # <<<<<<<<<<<<<<
|
||||||
|
@ -18545,7 +18762,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_6copy(CYTHON_UNUSED
|
||||||
return __pyx_r;
|
return __pyx_r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":774
|
/* "dependency_injector/containers.pyx":780
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* cpdef bint is_container(object instance): # <<<<<<<<<<<<<<
|
* cpdef bint is_container(object instance): # <<<<<<<<<<<<<<
|
||||||
|
@ -18564,21 +18781,21 @@ static int __pyx_f_19dependency_injector_10containers_is_container(PyObject *__p
|
||||||
int __pyx_clineno = 0;
|
int __pyx_clineno = 0;
|
||||||
__Pyx_RefNannySetupContext("is_container", 0);
|
__Pyx_RefNannySetupContext("is_container", 0);
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":782
|
/* "dependency_injector/containers.pyx":788
|
||||||
* :rtype: bool
|
* :rtype: bool
|
||||||
* """
|
* """
|
||||||
* return getattr(instance, '__IS_CONTAINER__', False) is True # <<<<<<<<<<<<<<
|
* 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, 782, __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, 788, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
__pyx_t_2 = (__pyx_t_1 == Py_True);
|
__pyx_t_2 = (__pyx_t_1 == Py_True);
|
||||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||||
__pyx_r = __pyx_t_2;
|
__pyx_r = __pyx_t_2;
|
||||||
goto __pyx_L0;
|
goto __pyx_L0;
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":774
|
/* "dependency_injector/containers.pyx":780
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* cpdef bint is_container(object instance): # <<<<<<<<<<<<<<
|
* cpdef bint is_container(object instance): # <<<<<<<<<<<<<<
|
||||||
|
@ -18619,7 +18836,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_8is_container(CYTHO
|
||||||
int __pyx_clineno = 0;
|
int __pyx_clineno = 0;
|
||||||
__Pyx_RefNannySetupContext("is_container", 0);
|
__Pyx_RefNannySetupContext("is_container", 0);
|
||||||
__Pyx_XDECREF(__pyx_r);
|
__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, 774, __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, 780, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
__pyx_r = __pyx_t_1;
|
__pyx_r = __pyx_t_1;
|
||||||
__pyx_t_1 = 0;
|
__pyx_t_1 = 0;
|
||||||
|
@ -18636,7 +18853,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_8is_container(CYTHO
|
||||||
return __pyx_r;
|
return __pyx_r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":785
|
/* "dependency_injector/containers.pyx":791
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* cpdef object _check_provider_type(object container, object provider): # <<<<<<<<<<<<<<
|
* cpdef object _check_provider_type(object container, object provider): # <<<<<<<<<<<<<<
|
||||||
|
@ -18663,40 +18880,40 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type
|
||||||
int __pyx_clineno = 0;
|
int __pyx_clineno = 0;
|
||||||
__Pyx_RefNannySetupContext("_check_provider_type", 0);
|
__Pyx_RefNannySetupContext("_check_provider_type", 0);
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":786
|
/* "dependency_injector/containers.pyx":792
|
||||||
*
|
*
|
||||||
* cpdef object _check_provider_type(object container, object provider):
|
* cpdef object _check_provider_type(object container, object provider):
|
||||||
* if not isinstance(provider, container.provider_type): # <<<<<<<<<<<<<<
|
* if not isinstance(provider, container.provider_type): # <<<<<<<<<<<<<<
|
||||||
* raise errors.Error('{0} can contain only {1} '
|
* raise errors.Error('{0} can contain only {1} '
|
||||||
* 'instances'.format(container, container.provider_type))
|
* '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, 786, __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, 792, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__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, 786, __pyx_L1_error)
|
__pyx_t_2 = PyObject_IsInstance(__pyx_v_provider, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 792, __pyx_L1_error)
|
||||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||||
__pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
|
__pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
|
||||||
if (unlikely(__pyx_t_3)) {
|
if (unlikely(__pyx_t_3)) {
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":787
|
/* "dependency_injector/containers.pyx":793
|
||||||
* cpdef object _check_provider_type(object container, object provider):
|
* cpdef object _check_provider_type(object container, object provider):
|
||||||
* if not isinstance(provider, container.provider_type):
|
* if not isinstance(provider, container.provider_type):
|
||||||
* raise errors.Error('{0} can contain only {1} ' # <<<<<<<<<<<<<<
|
* raise errors.Error('{0} can contain only {1} ' # <<<<<<<<<<<<<<
|
||||||
* 'instances'.format(container, container.provider_type))
|
* 'instances'.format(container, container.provider_type))
|
||||||
*/
|
*/
|
||||||
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error)
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_4);
|
__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, 787, __pyx_L1_error)
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_5);
|
__Pyx_GOTREF(__pyx_t_5);
|
||||||
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":788
|
/* "dependency_injector/containers.pyx":794
|
||||||
* if not isinstance(provider, container.provider_type):
|
* if not isinstance(provider, container.provider_type):
|
||||||
* raise errors.Error('{0} can contain only {1} '
|
* raise errors.Error('{0} can contain only {1} '
|
||||||
* 'instances'.format(container, container.provider_type)) # <<<<<<<<<<<<<<
|
* '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, 788, __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, 794, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_6);
|
__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, 788, __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, 794, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_7);
|
__Pyx_GOTREF(__pyx_t_7);
|
||||||
__pyx_t_8 = NULL;
|
__pyx_t_8 = NULL;
|
||||||
__pyx_t_9 = 0;
|
__pyx_t_9 = 0;
|
||||||
|
@ -18713,7 +18930,7 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type
|
||||||
#if CYTHON_FAST_PYCALL
|
#if CYTHON_FAST_PYCALL
|
||||||
if (PyFunction_Check(__pyx_t_6)) {
|
if (PyFunction_Check(__pyx_t_6)) {
|
||||||
PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_container, __pyx_t_7};
|
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, 788, __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, 794, __pyx_L1_error)
|
||||||
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
||||||
__Pyx_GOTREF(__pyx_t_4);
|
__Pyx_GOTREF(__pyx_t_4);
|
||||||
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
||||||
|
@ -18722,14 +18939,14 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type
|
||||||
#if CYTHON_FAST_PYCCALL
|
#if CYTHON_FAST_PYCCALL
|
||||||
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
||||||
PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_container, __pyx_t_7};
|
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, 788, __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, 794, __pyx_L1_error)
|
||||||
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
||||||
__Pyx_GOTREF(__pyx_t_4);
|
__Pyx_GOTREF(__pyx_t_4);
|
||||||
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
__pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 788, __pyx_L1_error)
|
__pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 794, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_10);
|
__Pyx_GOTREF(__pyx_t_10);
|
||||||
if (__pyx_t_8) {
|
if (__pyx_t_8) {
|
||||||
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
|
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
|
||||||
|
@ -18740,7 +18957,7 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type
|
||||||
__Pyx_GIVEREF(__pyx_t_7);
|
__Pyx_GIVEREF(__pyx_t_7);
|
||||||
PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
|
PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
|
||||||
__pyx_t_7 = 0;
|
__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, 788, __pyx_L1_error)
|
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_4);
|
__Pyx_GOTREF(__pyx_t_4);
|
||||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||||
}
|
}
|
||||||
|
@ -18758,14 +18975,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_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_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||||
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||||
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||||
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
||||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||||
__PYX_ERR(0, 787, __pyx_L1_error)
|
__PYX_ERR(0, 793, __pyx_L1_error)
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":786
|
/* "dependency_injector/containers.pyx":792
|
||||||
*
|
*
|
||||||
* cpdef object _check_provider_type(object container, object provider):
|
* cpdef object _check_provider_type(object container, object provider):
|
||||||
* if not isinstance(provider, container.provider_type): # <<<<<<<<<<<<<<
|
* if not isinstance(provider, container.provider_type): # <<<<<<<<<<<<<<
|
||||||
|
@ -18774,7 +18991,7 @@ static PyObject *__pyx_f_19dependency_injector_10containers__check_provider_type
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* "dependency_injector/containers.pyx":785
|
/* "dependency_injector/containers.pyx":791
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* cpdef object _check_provider_type(object container, object provider): # <<<<<<<<<<<<<<
|
* cpdef object _check_provider_type(object container, object provider): # <<<<<<<<<<<<<<
|
||||||
|
@ -18835,11 +19052,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_11_check_provider_t
|
||||||
case 1:
|
case 1:
|
||||||
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--;
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--;
|
||||||
else {
|
else {
|
||||||
__Pyx_RaiseArgtupleInvalid("_check_provider_type", 1, 2, 2, 1); __PYX_ERR(0, 785, __pyx_L3_error)
|
__Pyx_RaiseArgtupleInvalid("_check_provider_type", 1, 2, 2, 1); __PYX_ERR(0, 791, __pyx_L3_error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (unlikely(kw_args > 0)) {
|
if (unlikely(kw_args > 0)) {
|
||||||
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_provider_type") < 0)) __PYX_ERR(0, 785, __pyx_L3_error)
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_provider_type") < 0)) __PYX_ERR(0, 791, __pyx_L3_error)
|
||||||
}
|
}
|
||||||
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
||||||
goto __pyx_L5_argtuple_error;
|
goto __pyx_L5_argtuple_error;
|
||||||
|
@ -18852,7 +19069,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_11_check_provider_t
|
||||||
}
|
}
|
||||||
goto __pyx_L4_argument_unpacking_done;
|
goto __pyx_L4_argument_unpacking_done;
|
||||||
__pyx_L5_argtuple_error:;
|
__pyx_L5_argtuple_error:;
|
||||||
__Pyx_RaiseArgtupleInvalid("_check_provider_type", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 785, __pyx_L3_error)
|
__Pyx_RaiseArgtupleInvalid("_check_provider_type", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 791, __pyx_L3_error)
|
||||||
__pyx_L3_error:;
|
__pyx_L3_error:;
|
||||||
__Pyx_AddTraceback("dependency_injector.containers._check_provider_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
__Pyx_AddTraceback("dependency_injector.containers._check_provider_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
||||||
__Pyx_RefNannyFinishContext();
|
__Pyx_RefNannyFinishContext();
|
||||||
|
@ -18874,7 +19091,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_10_check_provider_t
|
||||||
int __pyx_clineno = 0;
|
int __pyx_clineno = 0;
|
||||||
__Pyx_RefNannySetupContext("_check_provider_type", 0);
|
__Pyx_RefNannySetupContext("_check_provider_type", 0);
|
||||||
__Pyx_XDECREF(__pyx_r);
|
__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, 785, __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, 791, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_t_1);
|
__Pyx_GOTREF(__pyx_t_1);
|
||||||
__pyx_r = __pyx_t_1;
|
__pyx_r = __pyx_t_1;
|
||||||
__pyx_t_1 = 0;
|
__pyx_t_1 = 0;
|
||||||
|
@ -26352,6 +26569,8 @@ 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_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_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
|
||||||
{&__pyx_n_s_new_container, __pyx_k_new_container, sizeof(__pyx_k_new_container), 0, 0, 1, 1},
|
{&__pyx_n_s_new_container, __pyx_k_new_container, sizeof(__pyx_k_new_container), 0, 0, 1, 1},
|
||||||
|
{&__pyx_n_s_new_container_cls_providers, __pyx_k_new_container_cls_providers, sizeof(__pyx_k_new_container_cls_providers), 0, 0, 1, 1},
|
||||||
|
{&__pyx_n_s_new_container_providers, __pyx_k_new_container_providers, sizeof(__pyx_k_new_container_providers), 0, 0, 1, 1},
|
||||||
{&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 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_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
|
||||||
{&__pyx_n_s_other_resource, __pyx_k_other_resource, sizeof(__pyx_k_other_resource), 0, 0, 1, 1},
|
{&__pyx_n_s_other_resource, __pyx_k_other_resource, sizeof(__pyx_k_other_resource), 0, 0, 1, 1},
|
||||||
|
@ -26565,10 +26784,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
|
||||||
* memo = {}
|
* memo = {}
|
||||||
* memo.update(_get_memo_for_matching_names(new_container.cls_providers, base_container.providers))
|
* memo.update(_get_memo_for_matching_names(new_container.cls_providers, base_container.providers))
|
||||||
*/
|
*/
|
||||||
__pyx_tuple__19 = PyTuple_Pack(5, __pyx_n_s_new_container, __pyx_n_s_memo, __pyx_n_s_providers_copy, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 762, __pyx_L1_error)
|
__pyx_tuple__19 = PyTuple_Pack(7, __pyx_n_s_new_container, __pyx_n_s_memo, __pyx_n_s_new_container_cls_providers, __pyx_n_s_providers_copy, __pyx_n_s_name, __pyx_n_s_provider, __pyx_n_s_new_container_providers); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 762, __pyx_L1_error)
|
||||||
__Pyx_GOTREF(__pyx_tuple__19);
|
__Pyx_GOTREF(__pyx_tuple__19);
|
||||||
__Pyx_GIVEREF(__pyx_tuple__19);
|
__Pyx_GIVEREF(__pyx_tuple__19);
|
||||||
__pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 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_src_dependency_injector_containe, __pyx_n_s_decorator, 762, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 762, __pyx_L1_error)
|
__pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 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_src_dependency_injector_containe, __pyx_n_s_decorator, 762, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 762, __pyx_L1_error)
|
||||||
|
|
||||||
/* "cfunc.to_py":65
|
/* "cfunc.to_py":65
|
||||||
* @cname("__Pyx_CFunc_void____object____object____object____object___to_py")
|
* @cname("__Pyx_CFunc_void____object____object____object____object___to_py")
|
||||||
|
|
|
@ -752,8 +752,8 @@ def copy(object base_container):
|
||||||
if name not in source_providers:
|
if name not in source_providers:
|
||||||
continue
|
continue
|
||||||
source_provider = source_providers[name]
|
source_provider = source_providers[name]
|
||||||
|
|
||||||
memo[id(source_provider)] = provider
|
memo[id(source_provider)] = provider
|
||||||
|
|
||||||
if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'):
|
if hasattr(provider, 'providers') and hasattr(source_provider, 'providers'):
|
||||||
sub_memo = _get_memo_for_matching_names(provider.providers, source_provider.providers)
|
sub_memo = _get_memo_for_matching_names(provider.providers, source_provider.providers)
|
||||||
memo.update(sub_memo)
|
memo.update(sub_memo)
|
||||||
|
@ -763,10 +763,16 @@ def copy(object base_container):
|
||||||
memo = {}
|
memo = {}
|
||||||
memo.update(_get_memo_for_matching_names(new_container.cls_providers, base_container.providers))
|
memo.update(_get_memo_for_matching_names(new_container.cls_providers, base_container.providers))
|
||||||
|
|
||||||
|
new_container_cls_providers = dict(new_container.cls_providers)
|
||||||
|
|
||||||
providers_copy = providers.deepcopy(base_container.providers, memo)
|
providers_copy = providers.deepcopy(base_container.providers, memo)
|
||||||
for name, provider in six.iteritems(providers_copy):
|
for name, provider in six.iteritems(providers_copy):
|
||||||
setattr(new_container, name, provider)
|
setattr(new_container, name, provider)
|
||||||
|
|
||||||
|
new_container_providers = providers.deepcopy(new_container_cls_providers, memo)
|
||||||
|
for name, provider in new_container_providers.items():
|
||||||
|
setattr(new_container, name, provider)
|
||||||
|
|
||||||
return new_container
|
return new_container
|
||||||
return _decorator
|
return _decorator
|
||||||
|
|
||||||
|
|
|
@ -308,17 +308,31 @@ class DeclarativeContainerTests(unittest.TestCase):
|
||||||
self.assertIsNot(_Container1.p11, _Container2.p11)
|
self.assertIsNot(_Container1.p11, _Container2.p11)
|
||||||
self.assertIsNot(_Container1.p12, _Container2.p12)
|
self.assertIsNot(_Container1.p12, _Container2.p12)
|
||||||
|
|
||||||
self.assertIs(_Container.p12.kwargs['p11'], _Container.p11)
|
self.assertEqual(_Container.p12(), {'p11': 0})
|
||||||
self.assertIs(_Container1.p12.kwargs['p11'], _Container1.p11)
|
self.assertEqual(_Container1.p12(), {'p11': 1})
|
||||||
self.assertIs(_Container2.p12.kwargs['p11'], _Container2.p11)
|
self.assertEqual(_Container2.p12(), {'p11': 2})
|
||||||
|
|
||||||
self.assertEqual(_Container.p12(), dict(p11=0))
|
|
||||||
self.assertEqual(_Container1.p12(), dict(p11=1))
|
|
||||||
self.assertEqual(_Container2.p12(), dict(p11=2))
|
|
||||||
|
|
||||||
self.assertEqual(_Container1.p13(), 11)
|
self.assertEqual(_Container1.p13(), 11)
|
||||||
self.assertEqual(_Container2.p13(), 22)
|
self.assertEqual(_Container2.p13(), 22)
|
||||||
|
|
||||||
|
def test_copy_with_parent_dependency(self):
|
||||||
|
# See: https://github.com/ets-labs/python-dependency-injector/issues/477
|
||||||
|
class Base(containers.DeclarativeContainer):
|
||||||
|
p11 = providers.Object(0)
|
||||||
|
p12 = providers.Factory(dict, p11=p11)
|
||||||
|
|
||||||
|
@containers.copy(Base)
|
||||||
|
class New(Base):
|
||||||
|
p13 = providers.Factory(dict, p12=Base.p12)
|
||||||
|
|
||||||
|
new1 = New()
|
||||||
|
new2 = New(p11=1)
|
||||||
|
new3 = New(p11=2)
|
||||||
|
|
||||||
|
self.assertEqual(new1.p13(), {'p12': {'p11': 0}})
|
||||||
|
self.assertEqual(new2.p13(), {'p12': {'p11': 1}})
|
||||||
|
self.assertEqual(new3.p13(), {'p12': {'p11': 2}})
|
||||||
|
|
||||||
def test_copy_with_replacing_subcontainer_providers(self):
|
def test_copy_with_replacing_subcontainer_providers(self):
|
||||||
# See: https://github.com/ets-labs/python-dependency-injector/issues/374
|
# See: https://github.com/ets-labs/python-dependency-injector/issues/374
|
||||||
class X(containers.DeclarativeContainer):
|
class X(containers.DeclarativeContainer):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user