mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 17:47:02 +03:00
Fix Python 2 tests
This commit is contained in:
parent
0fab16db94
commit
5ccee194c7
|
@ -22558,7 +22558,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6set_provid
|
|||
* """Set provider's provides."""
|
||||
* if provides and not callable(provides): # <<<<<<<<<<<<<<
|
||||
* raise Error(
|
||||
* f'Provider {self.__class__.__qualname__} expected to get callable, '
|
||||
* f'Provider {_class_qualname(self)} expected to get callable, '
|
||||
*/
|
||||
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_provides); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1073, __pyx_L1_error)
|
||||
if (__pyx_t_2) {
|
||||
|
@ -22576,7 +22576,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6set_provid
|
|||
* """Set provider's provides."""
|
||||
* if provides and not callable(provides):
|
||||
* raise Error( # <<<<<<<<<<<<<<
|
||||
* f'Provider {self.__class__.__qualname__} expected to get callable, '
|
||||
* f'Provider {_class_qualname(self)} expected to get callable, '
|
||||
* f'got {provides} instead'
|
||||
*/
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1074, __pyx_L1_error)
|
||||
|
@ -22585,7 +22585,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6set_provid
|
|||
/* "dependency_injector/providers.pyx":1075
|
||||
* if provides and not callable(provides):
|
||||
* raise Error(
|
||||
* f'Provider {self.__class__.__qualname__} expected to get callable, ' # <<<<<<<<<<<<<<
|
||||
* f'Provider {_class_qualname(self)} expected to get callable, ' # <<<<<<<<<<<<<<
|
||||
* f'got {provides} instead'
|
||||
* )
|
||||
*/
|
||||
|
@ -22597,19 +22597,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6set_provid
|
|||
__pyx_t_7 += 9;
|
||||
__Pyx_GIVEREF(__pyx_kp_u_Provider_2);
|
||||
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Provider_2);
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1075, __pyx_L1_error)
|
||||
__pyx_t_9 = __pyx_f_19dependency_injector_9providers__class_qualname(((PyObject *)__pyx_v_self), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1075, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_qualname); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1075, __pyx_L1_error)
|
||||
__pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1075, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1075, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
__pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
|
||||
__pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
|
||||
__Pyx_GIVEREF(__pyx_t_9);
|
||||
PyTuple_SET_ITEM(__pyx_t_6, 1, __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_6, 1, __pyx_t_10);
|
||||
__pyx_t_10 = 0;
|
||||
__Pyx_INCREF(__pyx_kp_u_expected_to_get_callable_got);
|
||||
__pyx_t_7 += 31;
|
||||
__Pyx_GIVEREF(__pyx_kp_u_expected_to_get_callable_got);
|
||||
|
@ -22617,18 +22614,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6set_provid
|
|||
|
||||
/* "dependency_injector/providers.pyx":1076
|
||||
* raise Error(
|
||||
* f'Provider {self.__class__.__qualname__} expected to get callable, '
|
||||
* f'Provider {_class_qualname(self)} expected to get callable, '
|
||||
* f'got {provides} instead' # <<<<<<<<<<<<<<
|
||||
* )
|
||||
* self.__provides = provides
|
||||
*/
|
||||
__pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_provides, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1076, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
|
||||
__pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
|
||||
__Pyx_GIVEREF(__pyx_t_9);
|
||||
PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_9);
|
||||
__pyx_t_9 = 0;
|
||||
__pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_provides, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1076, __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_6, 3, __pyx_t_10);
|
||||
__pyx_t_10 = 0;
|
||||
__Pyx_INCREF(__pyx_kp_u_instead);
|
||||
__pyx_t_7 += 8;
|
||||
__Pyx_GIVEREF(__pyx_kp_u_instead);
|
||||
|
@ -22637,12 +22634,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6set_provid
|
|||
/* "dependency_injector/providers.pyx":1075
|
||||
* if provides and not callable(provides):
|
||||
* raise Error(
|
||||
* f'Provider {self.__class__.__qualname__} expected to get callable, ' # <<<<<<<<<<<<<<
|
||||
* f'Provider {_class_qualname(self)} expected to get callable, ' # <<<<<<<<<<<<<<
|
||||
* f'got {provides} instead'
|
||||
* )
|
||||
*/
|
||||
__pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1075, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1075, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
__pyx_t_6 = NULL;
|
||||
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
|
||||
|
@ -22654,9 +22651,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6set_provid
|
|||
__Pyx_DECREF_SET(__pyx_t_5, function);
|
||||
}
|
||||
}
|
||||
__pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9);
|
||||
__pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10);
|
||||
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1074, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
|
@ -22669,7 +22666,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6set_provid
|
|||
* """Set provider's provides."""
|
||||
* if provides and not callable(provides): # <<<<<<<<<<<<<<
|
||||
* raise Error(
|
||||
* f'Provider {self.__class__.__qualname__} expected to get callable, '
|
||||
* f'Provider {_class_qualname(self)} expected to get callable, '
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -42293,7 +42290,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6set_provide
|
|||
* and self.__class__.provided_type and
|
||||
* not issubclass(provides, self.__class__.provided_type)): # <<<<<<<<<<<<<<
|
||||
* raise Error(
|
||||
* f'{self.__class__.__qualname__} can provide only '
|
||||
* f'{_class_qualname(self)} can provide only '
|
||||
*/
|
||||
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2139, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
|
@ -42319,7 +42316,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6set_provide
|
|||
* and self.__class__.provided_type and
|
||||
* not issubclass(provides, self.__class__.provided_type)):
|
||||
* raise Error( # <<<<<<<<<<<<<<
|
||||
* f'{self.__class__.__qualname__} can provide only '
|
||||
* f'{_class_qualname(self)} can provide only '
|
||||
* f'{self.__class__.provided_type} instances'
|
||||
*/
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2140, __pyx_L1_error)
|
||||
|
@ -42328,7 +42325,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6set_provide
|
|||
/* "dependency_injector/providers.pyx":2141
|
||||
* not issubclass(provides, self.__class__.provided_type)):
|
||||
* raise Error(
|
||||
* f'{self.__class__.__qualname__} can provide only ' # <<<<<<<<<<<<<<
|
||||
* f'{_class_qualname(self)} can provide only ' # <<<<<<<<<<<<<<
|
||||
* f'{self.__class__.provided_type} instances'
|
||||
* )
|
||||
*/
|
||||
|
@ -42336,19 +42333,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6set_provide
|
|||
__Pyx_GOTREF(__pyx_t_6);
|
||||
__pyx_t_7 = 0;
|
||||
__pyx_t_8 = 127;
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2141, __pyx_L1_error)
|
||||
__pyx_t_9 = __pyx_f_19dependency_injector_9providers__class_qualname(((PyObject *)__pyx_v_self), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2141, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_qualname); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2141, __pyx_L1_error)
|
||||
__pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2141, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2141, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
__pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
|
||||
__pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
|
||||
__Pyx_GIVEREF(__pyx_t_9);
|
||||
PyTuple_SET_ITEM(__pyx_t_6, 0, __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_6, 0, __pyx_t_10);
|
||||
__pyx_t_10 = 0;
|
||||
__Pyx_INCREF(__pyx_kp_u_can_provide_only);
|
||||
__pyx_t_7 += 18;
|
||||
__Pyx_GIVEREF(__pyx_kp_u_can_provide_only);
|
||||
|
@ -42356,24 +42350,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6set_provide
|
|||
|
||||
/* "dependency_injector/providers.pyx":2142
|
||||
* raise Error(
|
||||
* f'{self.__class__.__qualname__} can provide only '
|
||||
* f'{_class_qualname(self)} can provide only '
|
||||
* f'{self.__class__.provided_type} instances' # <<<<<<<<<<<<<<
|
||||
* )
|
||||
* self.__instantiator.set_provides(provides)
|
||||
*/
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2142, __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, 2142, __pyx_L1_error)
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2142, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2142, __pyx_L1_error)
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2142, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
__pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
|
||||
__pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
|
||||
__Pyx_GIVEREF(__pyx_t_9);
|
||||
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_9);
|
||||
__pyx_t_9 = 0;
|
||||
__pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2142, __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_6, 2, __pyx_t_10);
|
||||
__pyx_t_10 = 0;
|
||||
__Pyx_INCREF(__pyx_kp_u_instances);
|
||||
__pyx_t_7 += 10;
|
||||
__Pyx_GIVEREF(__pyx_kp_u_instances);
|
||||
|
@ -42382,12 +42376,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6set_provide
|
|||
/* "dependency_injector/providers.pyx":2141
|
||||
* not issubclass(provides, self.__class__.provided_type)):
|
||||
* raise Error(
|
||||
* f'{self.__class__.__qualname__} can provide only ' # <<<<<<<<<<<<<<
|
||||
* f'{_class_qualname(self)} can provide only ' # <<<<<<<<<<<<<<
|
||||
* f'{self.__class__.provided_type} instances'
|
||||
* )
|
||||
*/
|
||||
__pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2141, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2141, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
__pyx_t_6 = NULL;
|
||||
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
||||
|
@ -42399,9 +42393,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6set_provide
|
|||
__Pyx_DECREF_SET(__pyx_t_4, function);
|
||||
}
|
||||
}
|
||||
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9);
|
||||
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10);
|
||||
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2140, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_3);
|
||||
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||
|
@ -42427,18 +42421,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6set_provide
|
|||
*/
|
||||
__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, 2144, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
__pyx_t_9 = NULL;
|
||||
__pyx_t_10 = NULL;
|
||||
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
||||
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
|
||||
if (likely(__pyx_t_9)) {
|
||||
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
|
||||
if (likely(__pyx_t_10)) {
|
||||
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
||||
__Pyx_INCREF(__pyx_t_9);
|
||||
__Pyx_INCREF(__pyx_t_10);
|
||||
__Pyx_INCREF(function);
|
||||
__Pyx_DECREF_SET(__pyx_t_4, function);
|
||||
}
|
||||
}
|
||||
__pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provides);
|
||||
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provides);
|
||||
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2144, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_3);
|
||||
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||
|
@ -49171,7 +49165,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_
|
|||
* and self.__class__.provided_type and
|
||||
* not issubclass(provides, self.__class__.provided_type)): # <<<<<<<<<<<<<<
|
||||
* raise Error(
|
||||
* f'{self.__class__.__qualname__} can provide only '
|
||||
* f'{_class_qualname(self)} can provide only '
|
||||
*/
|
||||
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2504, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
|
@ -49197,7 +49191,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_
|
|||
* and self.__class__.provided_type and
|
||||
* not issubclass(provides, self.__class__.provided_type)):
|
||||
* raise Error( # <<<<<<<<<<<<<<
|
||||
* f'{self.__class__.__qualname__} can provide only '
|
||||
* f'{_class_qualname(self)} can provide only '
|
||||
* f'{self.__class__.provided_type} instances'
|
||||
*/
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2505, __pyx_L1_error)
|
||||
|
@ -49206,7 +49200,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_
|
|||
/* "dependency_injector/providers.pyx":2506
|
||||
* not issubclass(provides, self.__class__.provided_type)):
|
||||
* raise Error(
|
||||
* f'{self.__class__.__qualname__} can provide only ' # <<<<<<<<<<<<<<
|
||||
* f'{_class_qualname(self)} can provide only ' # <<<<<<<<<<<<<<
|
||||
* f'{self.__class__.provided_type} instances'
|
||||
* )
|
||||
*/
|
||||
|
@ -49214,19 +49208,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_
|
|||
__Pyx_GOTREF(__pyx_t_6);
|
||||
__pyx_t_7 = 0;
|
||||
__pyx_t_8 = 127;
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2506, __pyx_L1_error)
|
||||
__pyx_t_9 = __pyx_f_19dependency_injector_9providers__class_qualname(((PyObject *)__pyx_v_self), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2506, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_qualname); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2506, __pyx_L1_error)
|
||||
__pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2506, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2506, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
__pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
|
||||
__pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
|
||||
__Pyx_GIVEREF(__pyx_t_9);
|
||||
PyTuple_SET_ITEM(__pyx_t_6, 0, __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_6, 0, __pyx_t_10);
|
||||
__pyx_t_10 = 0;
|
||||
__Pyx_INCREF(__pyx_kp_u_can_provide_only);
|
||||
__pyx_t_7 += 18;
|
||||
__Pyx_GIVEREF(__pyx_kp_u_can_provide_only);
|
||||
|
@ -49234,24 +49225,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_
|
|||
|
||||
/* "dependency_injector/providers.pyx":2507
|
||||
* raise Error(
|
||||
* f'{self.__class__.__qualname__} can provide only '
|
||||
* f'{_class_qualname(self)} can provide only '
|
||||
* f'{self.__class__.provided_type} instances' # <<<<<<<<<<<<<<
|
||||
* )
|
||||
* self.__instantiator.set_provides(provides)
|
||||
*/
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2507, __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, 2507, __pyx_L1_error)
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2507, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2507, __pyx_L1_error)
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2507, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
__pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
|
||||
__pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
|
||||
__Pyx_GIVEREF(__pyx_t_9);
|
||||
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_9);
|
||||
__pyx_t_9 = 0;
|
||||
__pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2507, __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_6, 2, __pyx_t_10);
|
||||
__pyx_t_10 = 0;
|
||||
__Pyx_INCREF(__pyx_kp_u_instances);
|
||||
__pyx_t_7 += 10;
|
||||
__Pyx_GIVEREF(__pyx_kp_u_instances);
|
||||
|
@ -49260,12 +49251,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_
|
|||
/* "dependency_injector/providers.pyx":2506
|
||||
* not issubclass(provides, self.__class__.provided_type)):
|
||||
* raise Error(
|
||||
* f'{self.__class__.__qualname__} can provide only ' # <<<<<<<<<<<<<<
|
||||
* f'{_class_qualname(self)} can provide only ' # <<<<<<<<<<<<<<
|
||||
* f'{self.__class__.provided_type} instances'
|
||||
* )
|
||||
*/
|
||||
__pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2506, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2506, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
__pyx_t_6 = NULL;
|
||||
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
||||
|
@ -49277,9 +49268,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_
|
|||
__Pyx_DECREF_SET(__pyx_t_4, function);
|
||||
}
|
||||
}
|
||||
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9);
|
||||
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10);
|
||||
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2505, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_3);
|
||||
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||
|
@ -49305,18 +49296,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6set_
|
|||
*/
|
||||
__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, 2509, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
__pyx_t_9 = NULL;
|
||||
__pyx_t_10 = NULL;
|
||||
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
||||
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
|
||||
if (likely(__pyx_t_9)) {
|
||||
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
|
||||
if (likely(__pyx_t_10)) {
|
||||
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
||||
__Pyx_INCREF(__pyx_t_9);
|
||||
__Pyx_INCREF(__pyx_t_10);
|
||||
__Pyx_INCREF(function);
|
||||
__Pyx_DECREF_SET(__pyx_t_4, function);
|
||||
}
|
||||
}
|
||||
__pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provides);
|
||||
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provides);
|
||||
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2509, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_3);
|
||||
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||
|
|
|
@ -1072,7 +1072,7 @@ cdef class Callable(Provider):
|
|||
"""Set provider's provides."""
|
||||
if provides and not callable(provides):
|
||||
raise Error(
|
||||
f'Provider {self.__class__.__qualname__} expected to get callable, '
|
||||
f'Provider {_class_qualname(self)} expected to get callable, '
|
||||
f'got {provides} instead'
|
||||
)
|
||||
self.__provides = provides
|
||||
|
@ -2138,7 +2138,7 @@ cdef class Factory(Provider):
|
|||
and self.__class__.provided_type and
|
||||
not issubclass(provides, self.__class__.provided_type)):
|
||||
raise Error(
|
||||
f'{self.__class__.__qualname__} can provide only '
|
||||
f'{_class_qualname(self)} can provide only '
|
||||
f'{self.__class__.provided_type} instances'
|
||||
)
|
||||
self.__instantiator.set_provides(provides)
|
||||
|
@ -2503,7 +2503,7 @@ cdef class BaseSingleton(Provider):
|
|||
and self.__class__.provided_type and
|
||||
not issubclass(provides, self.__class__.provided_type)):
|
||||
raise Error(
|
||||
f'{self.__class__.__qualname__} can provide only '
|
||||
f'{_class_qualname(self)} can provide only '
|
||||
f'{self.__class__.provided_type} instances'
|
||||
)
|
||||
self.__instantiator.set_provides(provides)
|
||||
|
|
Loading…
Reference in New Issue
Block a user