mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-22 21:46:17 +03:00
Fix .delegate() deprecation
This commit is contained in:
parent
82548b8d98
commit
6dd668ac3d
|
@ -3158,7 +3158,6 @@ static const char __pyx_k_callback[] = "callback";
|
|||
static const char __pyx_k_category[] = "category";
|
||||
static const char __pyx_k_deepcopy[] = "deepcopy";
|
||||
static const char __pyx_k_defaults[] = "defaults";
|
||||
static const char __pyx_k_delegate[] = "delegate";
|
||||
static const char __pyx_k_endswith[] = "endswith";
|
||||
static const char __pyx_k_filepath[] = "filepath";
|
||||
static const char __pyx_k_get_name[] = "get_name";
|
||||
|
@ -3563,7 +3562,6 @@ static PyObject *__pyx_n_s_deepcopy;
|
|||
static PyObject *__pyx_n_s_deepcopy_dispatch;
|
||||
static PyObject *__pyx_n_s_default;
|
||||
static PyObject *__pyx_n_s_defaults;
|
||||
static PyObject *__pyx_n_s_delegate;
|
||||
static PyObject *__pyx_n_s_dependency_injector_providers;
|
||||
static PyObject *__pyx_n_s_dict;
|
||||
static PyObject *__pyx_n_s_dict1;
|
||||
|
@ -7463,8 +7461,6 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_8provider__
|
|||
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;
|
||||
|
@ -7473,28 +7469,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_8provider__
|
|||
/* "dependency_injector/providers.pyx":274
|
||||
* :rtype: :py:class:`Delegate`
|
||||
* """
|
||||
* return self.delegate() # <<<<<<<<<<<<<<
|
||||
* return Delegate(self) # <<<<<<<<<<<<<<
|
||||
*
|
||||
* cpdef object _provide(self, tuple args, dict kwargs):
|
||||
*/
|
||||
__Pyx_XDECREF(__pyx_r);
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delegate); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 274, __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, 274, __pyx_L1_error)
|
||||
__pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 274, __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;
|
||||
|
@ -7510,8 +7491,6 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_8provider__
|
|||
/* 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.Provider.provider.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
||||
__pyx_r = NULL;
|
||||
__pyx_L0:;
|
||||
|
@ -7521,7 +7500,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_8provider__
|
|||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":276
|
||||
* return self.delegate()
|
||||
* return Delegate(self)
|
||||
*
|
||||
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
||||
* """Providing strategy implementation.
|
||||
|
@ -7633,7 +7612,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_8Provider__provide(CYT
|
|||
__PYX_ERR(1, 283, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/providers.pyx":276
|
||||
* return self.delegate()
|
||||
* return Delegate(self)
|
||||
*
|
||||
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
||||
* """Providing strategy implementation.
|
||||
|
@ -84650,7 +84629,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|||
{&__pyx_n_s_deepcopy_dispatch, __pyx_k_deepcopy_dispatch, sizeof(__pyx_k_deepcopy_dispatch), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_defaults, __pyx_k_defaults, sizeof(__pyx_k_defaults), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_delegate, __pyx_k_delegate, sizeof(__pyx_k_delegate), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_dependency_injector_providers, __pyx_k_dependency_injector_providers, sizeof(__pyx_k_dependency_injector_providers), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_dict1, __pyx_k_dict1, sizeof(__pyx_k_dict1), 0, 0, 1, 1},
|
||||
|
|
|
@ -271,7 +271,7 @@ cdef class Provider(object):
|
|||
|
||||
:rtype: :py:class:`Delegate`
|
||||
"""
|
||||
return self.delegate()
|
||||
return Delegate(self)
|
||||
|
||||
cpdef object _provide(self, tuple args, dict kwargs):
|
||||
"""Providing strategy implementation.
|
||||
|
|
Loading…
Reference in New Issue
Block a user