mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-21 17:16:46 +03:00
Drop Python 3.4 support (#518)
* Update gitignore * Drop Python 3.4 support * Update change log * Fix typo in changelog
This commit is contained in:
parent
284dee6e58
commit
4cc4ca9188
2
.github/workflows/tests-and-linters.yml
vendored
2
.github/workflows/tests-and-linters.yml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
|||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]
|
||||
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -36,6 +36,7 @@ reports/
|
|||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
.hypothesis/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
@ -54,7 +55,7 @@ target/
|
|||
.idea/
|
||||
|
||||
# Virtualenv
|
||||
venv/
|
||||
venv*/
|
||||
|
||||
# SQLite
|
||||
*.db
|
||||
|
|
|
@ -13,6 +13,8 @@ Develop
|
|||
``container.wire(modules=["yourapp.module1"])``.
|
||||
- Add container wiring configuration ``wiring_config = containers.WiringConfiguration()``.
|
||||
- Add support of ``with`` statement for ``container.override_providers()`` method.
|
||||
- Drop support of Python 3.4. There are no immediate breaking changes, but Dependency Injector
|
||||
will no longer be tested on Python 3.4 and any bugs will not be fixed.
|
||||
- Update documentation and fix typos.
|
||||
|
||||
4.36.2
|
||||
|
|
1
setup.py
1
setup.py
|
@ -96,7 +96,6 @@ setup(name="dependency-injector",
|
|||
"Programming Language :: Python :: 2",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.4",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
|
|
|
@ -94529,13 +94529,13 @@ static PyObject *__pyx_gb_19dependency_injector_9providers_30generator20(__pyx_C
|
|||
*
|
||||
*
|
||||
* def isawaitable(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is a coroutine function.
|
||||
*
|
||||
* """Check if object is a coroutine function."""
|
||||
* try:
|
||||
*/
|
||||
|
||||
/* Python wrapper */
|
||||
static PyObject *__pyx_pw_19dependency_injector_9providers_32isawaitable(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
|
||||
static char __pyx_doc_19dependency_injector_9providers_31isawaitable[] = "Check if object is a coroutine function.\n\n Return False for any object in Python 3.4 or below.\n ";
|
||||
static char __pyx_doc_19dependency_injector_9providers_31isawaitable[] = "Check if object is a coroutine function.";
|
||||
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_32isawaitable = {"isawaitable", (PyCFunction)__pyx_pw_19dependency_injector_9providers_32isawaitable, METH_O, __pyx_doc_19dependency_injector_9providers_31isawaitable};
|
||||
static PyObject *__pyx_pw_19dependency_injector_9providers_32isawaitable(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
|
||||
PyObject *__pyx_r = 0;
|
||||
|
@ -94563,9 +94563,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("isawaitable", 0);
|
||||
|
||||
/* "dependency_injector/providers.pyx":4750
|
||||
* Return False for any object in Python 3.4 or below.
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4747
|
||||
* def isawaitable(obj):
|
||||
* """Check if object is a coroutine function."""
|
||||
* try: # <<<<<<<<<<<<<<
|
||||
* return inspect.isawaitable(obj)
|
||||
* except AttributeError:
|
||||
|
@ -94579,17 +94579,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_
|
|||
__Pyx_XGOTREF(__pyx_t_3);
|
||||
/*try:*/ {
|
||||
|
||||
/* "dependency_injector/providers.pyx":4751
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4748
|
||||
* """Check if object is a coroutine function."""
|
||||
* try:
|
||||
* return inspect.isawaitable(obj) # <<<<<<<<<<<<<<
|
||||
* except AttributeError:
|
||||
* return False
|
||||
*/
|
||||
__Pyx_XDECREF(__pyx_r);
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4751, __pyx_L3_error)
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4748, __pyx_L3_error)
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isawaitable); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4751, __pyx_L3_error)
|
||||
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isawaitable); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4748, __pyx_L3_error)
|
||||
__Pyx_GOTREF(__pyx_t_6);
|
||||
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
__pyx_t_5 = NULL;
|
||||
|
@ -94604,16 +94604,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_
|
|||
}
|
||||
__pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
|
||||
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4751, __pyx_L3_error)
|
||||
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4748, __pyx_L3_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
__pyx_r = __pyx_t_4;
|
||||
__pyx_t_4 = 0;
|
||||
goto __pyx_L7_try_return;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4750
|
||||
* Return False for any object in Python 3.4 or below.
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4747
|
||||
* def isawaitable(obj):
|
||||
* """Check if object is a coroutine function."""
|
||||
* try: # <<<<<<<<<<<<<<
|
||||
* return inspect.isawaitable(obj)
|
||||
* except AttributeError:
|
||||
|
@ -94624,7 +94624,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_
|
|||
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4752
|
||||
/* "dependency_injector/providers.pyx":4749
|
||||
* try:
|
||||
* return inspect.isawaitable(obj)
|
||||
* except AttributeError: # <<<<<<<<<<<<<<
|
||||
|
@ -94634,12 +94634,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_
|
|||
__pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
|
||||
if (__pyx_t_7) {
|
||||
__Pyx_AddTraceback("dependency_injector.providers.isawaitable", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
||||
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4752, __pyx_L5_except_error)
|
||||
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4749, __pyx_L5_except_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
__Pyx_GOTREF(__pyx_t_6);
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
|
||||
/* "dependency_injector/providers.pyx":4753
|
||||
/* "dependency_injector/providers.pyx":4750
|
||||
* return inspect.isawaitable(obj)
|
||||
* except AttributeError:
|
||||
* return False # <<<<<<<<<<<<<<
|
||||
|
@ -94657,9 +94657,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_
|
|||
goto __pyx_L5_except_error;
|
||||
__pyx_L5_except_error:;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4750
|
||||
* Return False for any object in Python 3.4 or below.
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4747
|
||||
* def isawaitable(obj):
|
||||
* """Check if object is a coroutine function."""
|
||||
* try: # <<<<<<<<<<<<<<
|
||||
* return inspect.isawaitable(obj)
|
||||
* except AttributeError:
|
||||
|
@ -94687,8 +94687,8 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_
|
|||
*
|
||||
*
|
||||
* def isawaitable(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is a coroutine function.
|
||||
*
|
||||
* """Check if object is a coroutine function."""
|
||||
* try:
|
||||
*/
|
||||
|
||||
/* function exit code */
|
||||
|
@ -94704,17 +94704,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_31isawaitable(CYTHON_
|
|||
return __pyx_r;
|
||||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":4756
|
||||
/* "dependency_injector/providers.pyx":4753
|
||||
*
|
||||
*
|
||||
* def iscoroutinefunction(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is a coroutine function.
|
||||
*
|
||||
* """Check if object is a coroutine function."""
|
||||
* try:
|
||||
*/
|
||||
|
||||
/* Python wrapper */
|
||||
static PyObject *__pyx_pw_19dependency_injector_9providers_34iscoroutinefunction(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
|
||||
static char __pyx_doc_19dependency_injector_9providers_33iscoroutinefunction[] = "Check if object is a coroutine function.\n\n Return False for any object in Python 3.4 or below.\n ";
|
||||
static char __pyx_doc_19dependency_injector_9providers_33iscoroutinefunction[] = "Check if object is a coroutine function.";
|
||||
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_34iscoroutinefunction = {"iscoroutinefunction", (PyCFunction)__pyx_pw_19dependency_injector_9providers_34iscoroutinefunction, METH_O, __pyx_doc_19dependency_injector_9providers_33iscoroutinefunction};
|
||||
static PyObject *__pyx_pw_19dependency_injector_9providers_34iscoroutinefunction(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
|
||||
PyObject *__pyx_r = 0;
|
||||
|
@ -94742,9 +94742,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("iscoroutinefunction", 0);
|
||||
|
||||
/* "dependency_injector/providers.pyx":4761
|
||||
* Return False for any object in Python 3.4 or below.
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4755
|
||||
* def iscoroutinefunction(obj):
|
||||
* """Check if object is a coroutine function."""
|
||||
* try: # <<<<<<<<<<<<<<
|
||||
* return inspect.iscoroutinefunction(obj)
|
||||
* except AttributeError:
|
||||
|
@ -94758,17 +94758,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction
|
|||
__Pyx_XGOTREF(__pyx_t_3);
|
||||
/*try:*/ {
|
||||
|
||||
/* "dependency_injector/providers.pyx":4762
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4756
|
||||
* """Check if object is a coroutine function."""
|
||||
* try:
|
||||
* return inspect.iscoroutinefunction(obj) # <<<<<<<<<<<<<<
|
||||
* except AttributeError:
|
||||
* return False
|
||||
*/
|
||||
__Pyx_XDECREF(__pyx_r);
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4762, __pyx_L3_error)
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4756, __pyx_L3_error)
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4762, __pyx_L3_error)
|
||||
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4756, __pyx_L3_error)
|
||||
__Pyx_GOTREF(__pyx_t_6);
|
||||
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
__pyx_t_5 = NULL;
|
||||
|
@ -94783,16 +94783,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction
|
|||
}
|
||||
__pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
|
||||
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4762, __pyx_L3_error)
|
||||
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4756, __pyx_L3_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
__pyx_r = __pyx_t_4;
|
||||
__pyx_t_4 = 0;
|
||||
goto __pyx_L7_try_return;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4761
|
||||
* Return False for any object in Python 3.4 or below.
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4755
|
||||
* def iscoroutinefunction(obj):
|
||||
* """Check if object is a coroutine function."""
|
||||
* try: # <<<<<<<<<<<<<<
|
||||
* return inspect.iscoroutinefunction(obj)
|
||||
* except AttributeError:
|
||||
|
@ -94803,7 +94803,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction
|
|||
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4763
|
||||
/* "dependency_injector/providers.pyx":4757
|
||||
* try:
|
||||
* return inspect.iscoroutinefunction(obj)
|
||||
* except AttributeError: # <<<<<<<<<<<<<<
|
||||
|
@ -94813,12 +94813,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction
|
|||
__pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
|
||||
if (__pyx_t_7) {
|
||||
__Pyx_AddTraceback("dependency_injector.providers.iscoroutinefunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
||||
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4763, __pyx_L5_except_error)
|
||||
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4757, __pyx_L5_except_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
__Pyx_GOTREF(__pyx_t_6);
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
|
||||
/* "dependency_injector/providers.pyx":4764
|
||||
/* "dependency_injector/providers.pyx":4758
|
||||
* return inspect.iscoroutinefunction(obj)
|
||||
* except AttributeError:
|
||||
* return False # <<<<<<<<<<<<<<
|
||||
|
@ -94836,9 +94836,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction
|
|||
goto __pyx_L5_except_error;
|
||||
__pyx_L5_except_error:;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4761
|
||||
* Return False for any object in Python 3.4 or below.
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4755
|
||||
* def iscoroutinefunction(obj):
|
||||
* """Check if object is a coroutine function."""
|
||||
* try: # <<<<<<<<<<<<<<
|
||||
* return inspect.iscoroutinefunction(obj)
|
||||
* except AttributeError:
|
||||
|
@ -94862,12 +94862,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction
|
|||
goto __pyx_L0;
|
||||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":4756
|
||||
/* "dependency_injector/providers.pyx":4753
|
||||
*
|
||||
*
|
||||
* def iscoroutinefunction(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is a coroutine function.
|
||||
*
|
||||
* """Check if object is a coroutine function."""
|
||||
* try:
|
||||
*/
|
||||
|
||||
/* function exit code */
|
||||
|
@ -94883,17 +94883,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_33iscoroutinefunction
|
|||
return __pyx_r;
|
||||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":4767
|
||||
/* "dependency_injector/providers.pyx":4761
|
||||
*
|
||||
*
|
||||
* def isasyncgenfunction(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is an asynchronous generator function.
|
||||
*
|
||||
* """Check if object is an asynchronous generator function."""
|
||||
* try:
|
||||
*/
|
||||
|
||||
/* Python wrapper */
|
||||
static PyObject *__pyx_pw_19dependency_injector_9providers_36isasyncgenfunction(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
|
||||
static char __pyx_doc_19dependency_injector_9providers_35isasyncgenfunction[] = "Check if object is an asynchronous generator function.\n\n Return False for any object in Python 3.4 or below.\n ";
|
||||
static char __pyx_doc_19dependency_injector_9providers_35isasyncgenfunction[] = "Check if object is an asynchronous generator function.";
|
||||
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_36isasyncgenfunction = {"isasyncgenfunction", (PyCFunction)__pyx_pw_19dependency_injector_9providers_36isasyncgenfunction, METH_O, __pyx_doc_19dependency_injector_9providers_35isasyncgenfunction};
|
||||
static PyObject *__pyx_pw_19dependency_injector_9providers_36isasyncgenfunction(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
|
||||
PyObject *__pyx_r = 0;
|
||||
|
@ -94921,9 +94921,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction(
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("isasyncgenfunction", 0);
|
||||
|
||||
/* "dependency_injector/providers.pyx":4772
|
||||
* Return False for any object in Python 3.4 or below.
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4763
|
||||
* def isasyncgenfunction(obj):
|
||||
* """Check if object is an asynchronous generator function."""
|
||||
* try: # <<<<<<<<<<<<<<
|
||||
* return inspect.isasyncgenfunction(obj)
|
||||
* except AttributeError:
|
||||
|
@ -94937,17 +94937,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction(
|
|||
__Pyx_XGOTREF(__pyx_t_3);
|
||||
/*try:*/ {
|
||||
|
||||
/* "dependency_injector/providers.pyx":4773
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4764
|
||||
* """Check if object is an asynchronous generator function."""
|
||||
* try:
|
||||
* return inspect.isasyncgenfunction(obj) # <<<<<<<<<<<<<<
|
||||
* except AttributeError:
|
||||
* return False
|
||||
*/
|
||||
__Pyx_XDECREF(__pyx_r);
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4773, __pyx_L3_error)
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4764, __pyx_L3_error)
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isasyncgenfunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4773, __pyx_L3_error)
|
||||
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isasyncgenfunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4764, __pyx_L3_error)
|
||||
__Pyx_GOTREF(__pyx_t_6);
|
||||
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
__pyx_t_5 = NULL;
|
||||
|
@ -94962,16 +94962,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction(
|
|||
}
|
||||
__pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
|
||||
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4773, __pyx_L3_error)
|
||||
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4764, __pyx_L3_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
__pyx_r = __pyx_t_4;
|
||||
__pyx_t_4 = 0;
|
||||
goto __pyx_L7_try_return;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4772
|
||||
* Return False for any object in Python 3.4 or below.
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4763
|
||||
* def isasyncgenfunction(obj):
|
||||
* """Check if object is an asynchronous generator function."""
|
||||
* try: # <<<<<<<<<<<<<<
|
||||
* return inspect.isasyncgenfunction(obj)
|
||||
* except AttributeError:
|
||||
|
@ -94982,7 +94982,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction(
|
|||
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4774
|
||||
/* "dependency_injector/providers.pyx":4765
|
||||
* try:
|
||||
* return inspect.isasyncgenfunction(obj)
|
||||
* except AttributeError: # <<<<<<<<<<<<<<
|
||||
|
@ -94992,12 +94992,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction(
|
|||
__pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
|
||||
if (__pyx_t_7) {
|
||||
__Pyx_AddTraceback("dependency_injector.providers.isasyncgenfunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
||||
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4774, __pyx_L5_except_error)
|
||||
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(1, 4765, __pyx_L5_except_error)
|
||||
__Pyx_GOTREF(__pyx_t_4);
|
||||
__Pyx_GOTREF(__pyx_t_6);
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
|
||||
/* "dependency_injector/providers.pyx":4775
|
||||
/* "dependency_injector/providers.pyx":4766
|
||||
* return inspect.isasyncgenfunction(obj)
|
||||
* except AttributeError:
|
||||
* return False # <<<<<<<<<<<<<<
|
||||
|
@ -95015,9 +95015,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction(
|
|||
goto __pyx_L5_except_error;
|
||||
__pyx_L5_except_error:;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4772
|
||||
* Return False for any object in Python 3.4 or below.
|
||||
* """
|
||||
/* "dependency_injector/providers.pyx":4763
|
||||
* def isasyncgenfunction(obj):
|
||||
* """Check if object is an asynchronous generator function."""
|
||||
* try: # <<<<<<<<<<<<<<
|
||||
* return inspect.isasyncgenfunction(obj)
|
||||
* except AttributeError:
|
||||
|
@ -95041,12 +95041,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction(
|
|||
goto __pyx_L0;
|
||||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":4767
|
||||
/* "dependency_injector/providers.pyx":4761
|
||||
*
|
||||
*
|
||||
* def isasyncgenfunction(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is an asynchronous generator function.
|
||||
*
|
||||
* """Check if object is an asynchronous generator function."""
|
||||
* try:
|
||||
*/
|
||||
|
||||
/* function exit code */
|
||||
|
@ -95062,7 +95062,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_35isasyncgenfunction(
|
|||
return __pyx_r;
|
||||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":4778
|
||||
/* "dependency_injector/providers.pyx":4769
|
||||
*
|
||||
*
|
||||
* cpdef _copy_parent(object from_, object to, dict memo): # <<<<<<<<<<<<<<
|
||||
|
@ -95086,14 +95086,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("_copy_parent", 0);
|
||||
|
||||
/* "dependency_injector/providers.pyx":4782
|
||||
/* "dependency_injector/providers.pyx":4773
|
||||
* copied_parent = (
|
||||
* deepcopy(from_.parent, memo)
|
||||
* if is_provider(from_.parent) or is_container_instance(from_.parent) # <<<<<<<<<<<<<<
|
||||
* else from_.parent
|
||||
* )
|
||||
*/
|
||||
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4782, __pyx_L1_error)
|
||||
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4773, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_3);
|
||||
__pyx_t_4 = (__pyx_f_19dependency_injector_9providers_is_provider(__pyx_t_3, 0) != 0);
|
||||
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||
|
@ -95102,7 +95102,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject
|
|||
__pyx_t_2 = __pyx_t_4;
|
||||
goto __pyx_L3_bool_binop_done;
|
||||
}
|
||||
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4782, __pyx_L1_error)
|
||||
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4773, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_3);
|
||||
__pyx_t_4 = (__pyx_f_19dependency_injector_9providers_is_container_instance(__pyx_t_3, 0) != 0);
|
||||
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||
|
@ -95110,32 +95110,32 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject
|
|||
__pyx_L3_bool_binop_done:;
|
||||
if (__pyx_t_2) {
|
||||
|
||||
/* "dependency_injector/providers.pyx":4781
|
||||
/* "dependency_injector/providers.pyx":4772
|
||||
* """Copy and assign provider parent."""
|
||||
* copied_parent = (
|
||||
* deepcopy(from_.parent, memo) # <<<<<<<<<<<<<<
|
||||
* if is_provider(from_.parent) or is_container_instance(from_.parent)
|
||||
* else from_.parent
|
||||
*/
|
||||
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4781, __pyx_L1_error)
|
||||
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4772, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_3);
|
||||
__pyx_t_6.__pyx_n = 1;
|
||||
__pyx_t_6.memo = __pyx_v_memo;
|
||||
__pyx_t_5 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4781, __pyx_L1_error)
|
||||
__pyx_t_5 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4772, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||
__pyx_t_1 = __pyx_t_5;
|
||||
__pyx_t_5 = 0;
|
||||
} else {
|
||||
|
||||
/* "dependency_injector/providers.pyx":4783
|
||||
/* "dependency_injector/providers.pyx":4774
|
||||
* deepcopy(from_.parent, memo)
|
||||
* if is_provider(from_.parent) or is_container_instance(from_.parent)
|
||||
* else from_.parent # <<<<<<<<<<<<<<
|
||||
* )
|
||||
* to.assign_parent(copied_parent)
|
||||
*/
|
||||
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4783, __pyx_L1_error)
|
||||
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_, __pyx_n_s_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4774, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
__pyx_t_1 = __pyx_t_5;
|
||||
__pyx_t_5 = 0;
|
||||
|
@ -95143,14 +95143,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject
|
|||
__pyx_v_copied_parent = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4785
|
||||
/* "dependency_injector/providers.pyx":4776
|
||||
* else from_.parent
|
||||
* )
|
||||
* to.assign_parent(copied_parent) # <<<<<<<<<<<<<<
|
||||
*
|
||||
*
|
||||
*/
|
||||
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_to, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4785, __pyx_L1_error)
|
||||
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_to, __pyx_n_s_assign_parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4776, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
__pyx_t_3 = NULL;
|
||||
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
|
||||
|
@ -95164,12 +95164,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_parent(PyObject
|
|||
}
|
||||
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_v_copied_parent) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_copied_parent);
|
||||
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4785, __pyx_L1_error)
|
||||
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4776, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4778
|
||||
/* "dependency_injector/providers.pyx":4769
|
||||
*
|
||||
*
|
||||
* cpdef _copy_parent(object from_, object to, dict memo): # <<<<<<<<<<<<<<
|
||||
|
@ -95231,17 +95231,17 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_38_copy_parent(PyObje
|
|||
case 1:
|
||||
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
|
||||
else {
|
||||
__Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, 1); __PYX_ERR(1, 4778, __pyx_L3_error)
|
||||
__Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, 1); __PYX_ERR(1, 4769, __pyx_L3_error)
|
||||
}
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 2:
|
||||
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
|
||||
else {
|
||||
__Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, 2); __PYX_ERR(1, 4778, __pyx_L3_error)
|
||||
__Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, 2); __PYX_ERR(1, 4769, __pyx_L3_error)
|
||||
}
|
||||
}
|
||||
if (unlikely(kw_args > 0)) {
|
||||
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_parent") < 0)) __PYX_ERR(1, 4778, __pyx_L3_error)
|
||||
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_parent") < 0)) __PYX_ERR(1, 4769, __pyx_L3_error)
|
||||
}
|
||||
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
||||
goto __pyx_L5_argtuple_error;
|
||||
|
@ -95256,13 +95256,13 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_38_copy_parent(PyObje
|
|||
}
|
||||
goto __pyx_L4_argument_unpacking_done;
|
||||
__pyx_L5_argtuple_error:;
|
||||
__Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4778, __pyx_L3_error)
|
||||
__Pyx_RaiseArgtupleInvalid("_copy_parent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4769, __pyx_L3_error)
|
||||
__pyx_L3_error:;
|
||||
__Pyx_AddTraceback("dependency_injector.providers._copy_parent", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
||||
__Pyx_RefNannyFinishContext();
|
||||
return NULL;
|
||||
__pyx_L4_argument_unpacking_done:;
|
||||
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4778, __pyx_L1_error)
|
||||
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4769, __pyx_L1_error)
|
||||
__pyx_r = __pyx_pf_19dependency_injector_9providers_37_copy_parent(__pyx_self, __pyx_v_from_, __pyx_v_to, __pyx_v_memo);
|
||||
|
||||
/* function exit code */
|
||||
|
@ -95283,7 +95283,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_37_copy_parent(CYTHON
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("_copy_parent", 0);
|
||||
__Pyx_XDECREF(__pyx_r);
|
||||
__pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_parent(__pyx_v_from_, __pyx_v_to, __pyx_v_memo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4778, __pyx_L1_error)
|
||||
__pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_parent(__pyx_v_from_, __pyx_v_to, __pyx_v_memo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4769, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
__pyx_r = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
|
@ -95300,7 +95300,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_37_copy_parent(CYTHON
|
|||
return __pyx_r;
|
||||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":4788
|
||||
/* "dependency_injector/providers.pyx":4779
|
||||
*
|
||||
*
|
||||
* cpdef object _memorized_duplicate(object instance, dict memo): # <<<<<<<<<<<<<<
|
||||
|
@ -95321,14 +95321,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers__memorized_duplicate(P
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("_memorized_duplicate", 0);
|
||||
|
||||
/* "dependency_injector/providers.pyx":4789
|
||||
/* "dependency_injector/providers.pyx":4780
|
||||
*
|
||||
* cpdef object _memorized_duplicate(object instance, dict memo):
|
||||
* copied = instance.__class__() # <<<<<<<<<<<<<<
|
||||
* memo[id(instance)] = copied
|
||||
* return copied
|
||||
*/
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4789, __pyx_L1_error)
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4780, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_3 = NULL;
|
||||
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
||||
|
@ -95342,13 +95342,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers__memorized_duplicate(P
|
|||
}
|
||||
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
|
||||
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4789, __pyx_L1_error)
|
||||
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4780, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
__pyx_v_copied = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4790
|
||||
/* "dependency_injector/providers.pyx":4781
|
||||
* cpdef object _memorized_duplicate(object instance, dict memo):
|
||||
* copied = instance.__class__()
|
||||
* memo[id(instance)] = copied # <<<<<<<<<<<<<<
|
||||
|
@ -95357,14 +95357,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers__memorized_duplicate(P
|
|||
*/
|
||||
if (unlikely(__pyx_v_memo == Py_None)) {
|
||||
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
||||
__PYX_ERR(1, 4790, __pyx_L1_error)
|
||||
__PYX_ERR(1, 4781, __pyx_L1_error)
|
||||
}
|
||||
__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4790, __pyx_L1_error)
|
||||
__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4781, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
if (unlikely(PyDict_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_copied) < 0)) __PYX_ERR(1, 4790, __pyx_L1_error)
|
||||
if (unlikely(PyDict_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_v_copied) < 0)) __PYX_ERR(1, 4781, __pyx_L1_error)
|
||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4791
|
||||
/* "dependency_injector/providers.pyx":4782
|
||||
* copied = instance.__class__()
|
||||
* memo[id(instance)] = copied
|
||||
* return copied # <<<<<<<<<<<<<<
|
||||
|
@ -95376,7 +95376,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers__memorized_duplicate(P
|
|||
__pyx_r = __pyx_v_copied;
|
||||
goto __pyx_L0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4788
|
||||
/* "dependency_injector/providers.pyx":4779
|
||||
*
|
||||
*
|
||||
* cpdef object _memorized_duplicate(object instance, dict memo): # <<<<<<<<<<<<<<
|
||||
|
@ -95432,11 +95432,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_40_memorized_duplicat
|
|||
case 1:
|
||||
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
|
||||
else {
|
||||
__Pyx_RaiseArgtupleInvalid("_memorized_duplicate", 1, 2, 2, 1); __PYX_ERR(1, 4788, __pyx_L3_error)
|
||||
__Pyx_RaiseArgtupleInvalid("_memorized_duplicate", 1, 2, 2, 1); __PYX_ERR(1, 4779, __pyx_L3_error)
|
||||
}
|
||||
}
|
||||
if (unlikely(kw_args > 0)) {
|
||||
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_memorized_duplicate") < 0)) __PYX_ERR(1, 4788, __pyx_L3_error)
|
||||
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_memorized_duplicate") < 0)) __PYX_ERR(1, 4779, __pyx_L3_error)
|
||||
}
|
||||
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
||||
goto __pyx_L5_argtuple_error;
|
||||
|
@ -95449,13 +95449,13 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_40_memorized_duplicat
|
|||
}
|
||||
goto __pyx_L4_argument_unpacking_done;
|
||||
__pyx_L5_argtuple_error:;
|
||||
__Pyx_RaiseArgtupleInvalid("_memorized_duplicate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4788, __pyx_L3_error)
|
||||
__Pyx_RaiseArgtupleInvalid("_memorized_duplicate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4779, __pyx_L3_error)
|
||||
__pyx_L3_error:;
|
||||
__Pyx_AddTraceback("dependency_injector.providers._memorized_duplicate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
||||
__Pyx_RefNannyFinishContext();
|
||||
return NULL;
|
||||
__pyx_L4_argument_unpacking_done:;
|
||||
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4788, __pyx_L1_error)
|
||||
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4779, __pyx_L1_error)
|
||||
__pyx_r = __pyx_pf_19dependency_injector_9providers_39_memorized_duplicate(__pyx_self, __pyx_v_instance, __pyx_v_memo);
|
||||
|
||||
/* function exit code */
|
||||
|
@ -95476,7 +95476,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_39_memorized_duplicat
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("_memorized_duplicate", 0);
|
||||
__Pyx_XDECREF(__pyx_r);
|
||||
__pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(__pyx_v_instance, __pyx_v_memo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4788, __pyx_L1_error)
|
||||
__pyx_t_1 = __pyx_f_19dependency_injector_9providers__memorized_duplicate(__pyx_v_instance, __pyx_v_memo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4779, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
__pyx_r = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
|
@ -95493,7 +95493,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_39_memorized_duplicat
|
|||
return __pyx_r;
|
||||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":4794
|
||||
/* "dependency_injector/providers.pyx":4785
|
||||
*
|
||||
*
|
||||
* cpdef object _copy_if_provider(object instance, dict memo): # <<<<<<<<<<<<<<
|
||||
|
@ -95513,7 +95513,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_if_provider(PyOb
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("_copy_if_provider", 0);
|
||||
|
||||
/* "dependency_injector/providers.pyx":4795
|
||||
/* "dependency_injector/providers.pyx":4786
|
||||
*
|
||||
* cpdef object _copy_if_provider(object instance, dict memo):
|
||||
* if not is_provider(instance): # <<<<<<<<<<<<<<
|
||||
|
@ -95523,7 +95523,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_if_provider(PyOb
|
|||
__pyx_t_1 = ((!(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0) != 0)) != 0);
|
||||
if (__pyx_t_1) {
|
||||
|
||||
/* "dependency_injector/providers.pyx":4796
|
||||
/* "dependency_injector/providers.pyx":4787
|
||||
* cpdef object _copy_if_provider(object instance, dict memo):
|
||||
* if not is_provider(instance):
|
||||
* return instance # <<<<<<<<<<<<<<
|
||||
|
@ -95535,7 +95535,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_if_provider(PyOb
|
|||
__pyx_r = __pyx_v_instance;
|
||||
goto __pyx_L0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4795
|
||||
/* "dependency_injector/providers.pyx":4786
|
||||
*
|
||||
* cpdef object _copy_if_provider(object instance, dict memo):
|
||||
* if not is_provider(instance): # <<<<<<<<<<<<<<
|
||||
|
@ -95544,7 +95544,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_if_provider(PyOb
|
|||
*/
|
||||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":4797
|
||||
/* "dependency_injector/providers.pyx":4788
|
||||
* if not is_provider(instance):
|
||||
* return instance
|
||||
* return deepcopy(instance, memo) # <<<<<<<<<<<<<<
|
||||
|
@ -95554,13 +95554,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers__copy_if_provider(PyOb
|
|||
__Pyx_XDECREF(__pyx_r);
|
||||
__pyx_t_3.__pyx_n = 1;
|
||||
__pyx_t_3.memo = __pyx_v_memo;
|
||||
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_instance, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4797, __pyx_L1_error)
|
||||
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_instance, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4788, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_r = __pyx_t_2;
|
||||
__pyx_t_2 = 0;
|
||||
goto __pyx_L0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4794
|
||||
/* "dependency_injector/providers.pyx":4785
|
||||
*
|
||||
*
|
||||
* cpdef object _copy_if_provider(object instance, dict memo): # <<<<<<<<<<<<<<
|
||||
|
@ -95613,11 +95613,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_42_copy_if_provider(P
|
|||
case 1:
|
||||
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
|
||||
else {
|
||||
__Pyx_RaiseArgtupleInvalid("_copy_if_provider", 1, 2, 2, 1); __PYX_ERR(1, 4794, __pyx_L3_error)
|
||||
__Pyx_RaiseArgtupleInvalid("_copy_if_provider", 1, 2, 2, 1); __PYX_ERR(1, 4785, __pyx_L3_error)
|
||||
}
|
||||
}
|
||||
if (unlikely(kw_args > 0)) {
|
||||
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_if_provider") < 0)) __PYX_ERR(1, 4794, __pyx_L3_error)
|
||||
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_if_provider") < 0)) __PYX_ERR(1, 4785, __pyx_L3_error)
|
||||
}
|
||||
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
||||
goto __pyx_L5_argtuple_error;
|
||||
|
@ -95630,13 +95630,13 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_42_copy_if_provider(P
|
|||
}
|
||||
goto __pyx_L4_argument_unpacking_done;
|
||||
__pyx_L5_argtuple_error:;
|
||||
__Pyx_RaiseArgtupleInvalid("_copy_if_provider", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4794, __pyx_L3_error)
|
||||
__Pyx_RaiseArgtupleInvalid("_copy_if_provider", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 4785, __pyx_L3_error)
|
||||
__pyx_L3_error:;
|
||||
__Pyx_AddTraceback("dependency_injector.providers._copy_if_provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
||||
__Pyx_RefNannyFinishContext();
|
||||
return NULL;
|
||||
__pyx_L4_argument_unpacking_done:;
|
||||
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4794, __pyx_L1_error)
|
||||
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 4785, __pyx_L1_error)
|
||||
__pyx_r = __pyx_pf_19dependency_injector_9providers_41_copy_if_provider(__pyx_self, __pyx_v_instance, __pyx_v_memo);
|
||||
|
||||
/* function exit code */
|
||||
|
@ -95657,7 +95657,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_41_copy_if_provider(C
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("_copy_if_provider", 0);
|
||||
__Pyx_XDECREF(__pyx_r);
|
||||
__pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_if_provider(__pyx_v_instance, __pyx_v_memo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4794, __pyx_L1_error)
|
||||
__pyx_t_1 = __pyx_f_19dependency_injector_9providers__copy_if_provider(__pyx_v_instance, __pyx_v_memo, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4785, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
__pyx_r = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
|
@ -95674,7 +95674,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_41_copy_if_provider(C
|
|||
return __pyx_r;
|
||||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":4800
|
||||
/* "dependency_injector/providers.pyx":4791
|
||||
*
|
||||
*
|
||||
* cpdef str _class_qualname(object instance): # <<<<<<<<<<<<<<
|
||||
|
@ -95697,49 +95697,49 @@ static PyObject *__pyx_f_19dependency_injector_9providers__class_qualname(PyObje
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("_class_qualname", 0);
|
||||
|
||||
/* "dependency_injector/providers.pyx":4801
|
||||
/* "dependency_injector/providers.pyx":4792
|
||||
*
|
||||
* cpdef str _class_qualname(object instance):
|
||||
* name = getattr(instance.__class__, '__qualname__', None) # <<<<<<<<<<<<<<
|
||||
* if not name:
|
||||
* name = '.'.join((instance.__class__.__module__, instance.__class__.__name__))
|
||||
*/
|
||||
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4801, __pyx_L1_error)
|
||||
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4792, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
__pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_s_qualname, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4801, __pyx_L1_error)
|
||||
__pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_s_qualname, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4792, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||
__pyx_v_name = __pyx_t_2;
|
||||
__pyx_t_2 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4802
|
||||
/* "dependency_injector/providers.pyx":4793
|
||||
* cpdef str _class_qualname(object instance):
|
||||
* name = getattr(instance.__class__, '__qualname__', None)
|
||||
* if not name: # <<<<<<<<<<<<<<
|
||||
* name = '.'.join((instance.__class__.__module__, instance.__class__.__name__))
|
||||
* return name
|
||||
*/
|
||||
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 4802, __pyx_L1_error)
|
||||
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 4793, __pyx_L1_error)
|
||||
__pyx_t_4 = ((!__pyx_t_3) != 0);
|
||||
if (__pyx_t_4) {
|
||||
|
||||
/* "dependency_injector/providers.pyx":4803
|
||||
/* "dependency_injector/providers.pyx":4794
|
||||
* name = getattr(instance.__class__, '__qualname__', None)
|
||||
* if not name:
|
||||
* name = '.'.join((instance.__class__.__module__, instance.__class__.__name__)) # <<<<<<<<<<<<<<
|
||||
* return name
|
||||
*/
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4803, __pyx_L1_error)
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4794, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_module); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4803, __pyx_L1_error)
|
||||
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_module); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4794, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4803, __pyx_L1_error)
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4794, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4803, __pyx_L1_error)
|
||||
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4794, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4803, __pyx_L1_error)
|
||||
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4794, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__Pyx_GIVEREF(__pyx_t_1);
|
||||
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
|
||||
|
@ -95747,13 +95747,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers__class_qualname(PyObje
|
|||
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
|
||||
__pyx_t_1 = 0;
|
||||
__pyx_t_5 = 0;
|
||||
__pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__6, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4803, __pyx_L1_error)
|
||||
__pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__6, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 4794, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_5);
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
__Pyx_DECREF_SET(__pyx_v_name, __pyx_t_5);
|
||||
__pyx_t_5 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4802
|
||||
/* "dependency_injector/providers.pyx":4793
|
||||
* cpdef str _class_qualname(object instance):
|
||||
* name = getattr(instance.__class__, '__qualname__', None)
|
||||
* if not name: # <<<<<<<<<<<<<<
|
||||
|
@ -95762,18 +95762,18 @@ static PyObject *__pyx_f_19dependency_injector_9providers__class_qualname(PyObje
|
|||
*/
|
||||
}
|
||||
|
||||
/* "dependency_injector/providers.pyx":4804
|
||||
/* "dependency_injector/providers.pyx":4795
|
||||
* if not name:
|
||||
* name = '.'.join((instance.__class__.__module__, instance.__class__.__name__))
|
||||
* return name # <<<<<<<<<<<<<<
|
||||
*/
|
||||
__Pyx_XDECREF(__pyx_r);
|
||||
if (!(likely(PyString_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 4804, __pyx_L1_error)
|
||||
if (!(likely(PyString_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 4795, __pyx_L1_error)
|
||||
__Pyx_INCREF(__pyx_v_name);
|
||||
__pyx_r = ((PyObject*)__pyx_v_name);
|
||||
goto __pyx_L0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4800
|
||||
/* "dependency_injector/providers.pyx":4791
|
||||
*
|
||||
*
|
||||
* cpdef str _class_qualname(object instance): # <<<<<<<<<<<<<<
|
||||
|
@ -95817,7 +95817,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_43_class_qualname(CYT
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("_class_qualname", 0);
|
||||
__Pyx_XDECREF(__pyx_r);
|
||||
__pyx_t_1 = __pyx_f_19dependency_injector_9providers__class_qualname(__pyx_v_instance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4800, __pyx_L1_error)
|
||||
__pyx_t_1 = __pyx_f_19dependency_injector_9providers__class_qualname(__pyx_v_instance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4791, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
__pyx_r = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
|
@ -134301,37 +134301,37 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
|
|||
*
|
||||
*
|
||||
* def isawaitable(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is a coroutine function.
|
||||
*
|
||||
* """Check if object is a coroutine function."""
|
||||
* try:
|
||||
*/
|
||||
__pyx_tuple__60 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(1, 4745, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__60);
|
||||
__Pyx_GIVEREF(__pyx_tuple__60);
|
||||
__pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_isawaitable, 4745, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(1, 4745, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/providers.pyx":4756
|
||||
/* "dependency_injector/providers.pyx":4753
|
||||
*
|
||||
*
|
||||
* def iscoroutinefunction(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is a coroutine function.
|
||||
*
|
||||
* """Check if object is a coroutine function."""
|
||||
* try:
|
||||
*/
|
||||
__pyx_tuple__62 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 4756, __pyx_L1_error)
|
||||
__pyx_tuple__62 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 4753, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__62);
|
||||
__Pyx_GIVEREF(__pyx_tuple__62);
|
||||
__pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_iscoroutinefunction, 4756, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(1, 4756, __pyx_L1_error)
|
||||
__pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_iscoroutinefunction, 4753, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(1, 4753, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/providers.pyx":4767
|
||||
/* "dependency_injector/providers.pyx":4761
|
||||
*
|
||||
*
|
||||
* def isasyncgenfunction(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is an asynchronous generator function.
|
||||
*
|
||||
* """Check if object is an asynchronous generator function."""
|
||||
* try:
|
||||
*/
|
||||
__pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(1, 4767, __pyx_L1_error)
|
||||
__pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(1, 4761, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__64);
|
||||
__Pyx_GIVEREF(__pyx_tuple__64);
|
||||
__pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_isasyncgenfunction, 4767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(1, 4767, __pyx_L1_error)
|
||||
__pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_isasyncgenfunction, 4761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(1, 4761, __pyx_L1_error)
|
||||
|
||||
/* "(tree fragment)":1
|
||||
* def __pyx_unpickle_Provider(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
||||
|
@ -137832,36 +137832,36 @@ if (!__Pyx_RefNanny) {
|
|||
*
|
||||
*
|
||||
* def isawaitable(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is a coroutine function.
|
||||
*
|
||||
* """Check if object is a coroutine function."""
|
||||
* try:
|
||||
*/
|
||||
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_32isawaitable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4745, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
if (PyDict_SetItem(__pyx_d, __pyx_n_s_isawaitable, __pyx_t_1) < 0) __PYX_ERR(1, 4745, __pyx_L1_error)
|
||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4756
|
||||
/* "dependency_injector/providers.pyx":4753
|
||||
*
|
||||
*
|
||||
* def iscoroutinefunction(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is a coroutine function.
|
||||
*
|
||||
* """Check if object is a coroutine function."""
|
||||
* try:
|
||||
*/
|
||||
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_34iscoroutinefunction, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4756, __pyx_L1_error)
|
||||
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_34iscoroutinefunction, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4753, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
if (PyDict_SetItem(__pyx_d, __pyx_n_s_iscoroutinefunction, __pyx_t_1) < 0) __PYX_ERR(1, 4756, __pyx_L1_error)
|
||||
if (PyDict_SetItem(__pyx_d, __pyx_n_s_iscoroutinefunction, __pyx_t_1) < 0) __PYX_ERR(1, 4753, __pyx_L1_error)
|
||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||
|
||||
/* "dependency_injector/providers.pyx":4767
|
||||
/* "dependency_injector/providers.pyx":4761
|
||||
*
|
||||
*
|
||||
* def isasyncgenfunction(obj): # <<<<<<<<<<<<<<
|
||||
* """Check if object is an asynchronous generator function.
|
||||
*
|
||||
* """Check if object is an asynchronous generator function."""
|
||||
* try:
|
||||
*/
|
||||
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_36isasyncgenfunction, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4767, __pyx_L1_error)
|
||||
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_36isasyncgenfunction, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4761, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
if (PyDict_SetItem(__pyx_d, __pyx_n_s_isasyncgenfunction, __pyx_t_1) < 0) __PYX_ERR(1, 4767, __pyx_L1_error)
|
||||
if (PyDict_SetItem(__pyx_d, __pyx_n_s_isasyncgenfunction, __pyx_t_1) < 0) __PYX_ERR(1, 4761, __pyx_L1_error)
|
||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||
|
||||
/* "(tree fragment)":1
|
||||
|
|
|
@ -4743,10 +4743,7 @@ def traverse(*providers, types=None):
|
|||
|
||||
|
||||
def isawaitable(obj):
|
||||
"""Check if object is a coroutine function.
|
||||
|
||||
Return False for any object in Python 3.4 or below.
|
||||
"""
|
||||
"""Check if object is a coroutine function."""
|
||||
try:
|
||||
return inspect.isawaitable(obj)
|
||||
except AttributeError:
|
||||
|
@ -4754,10 +4751,7 @@ def isawaitable(obj):
|
|||
|
||||
|
||||
def iscoroutinefunction(obj):
|
||||
"""Check if object is a coroutine function.
|
||||
|
||||
Return False for any object in Python 3.4 or below.
|
||||
"""
|
||||
"""Check if object is a coroutine function."""
|
||||
try:
|
||||
return inspect.iscoroutinefunction(obj)
|
||||
except AttributeError:
|
||||
|
@ -4765,10 +4759,7 @@ def iscoroutinefunction(obj):
|
|||
|
||||
|
||||
def isasyncgenfunction(obj):
|
||||
"""Check if object is an asynchronous generator function.
|
||||
|
||||
Return False for any object in Python 3.4 or below.
|
||||
"""
|
||||
"""Check if object is an asynchronous generator function."""
|
||||
try:
|
||||
return inspect.isasyncgenfunction(obj)
|
||||
except AttributeError:
|
||||
|
|
|
@ -795,7 +795,6 @@ class ConfigFromYamlTests(unittest.TestCase):
|
|||
os.unlink(self.config_file_1)
|
||||
os.unlink(self.config_file_2)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test(self):
|
||||
self.config.from_yaml(self.config_file_1)
|
||||
|
||||
|
@ -805,7 +804,6 @@ class ConfigFromYamlTests(unittest.TestCase):
|
|||
self.assertEqual(self.config.section2(), {"value2": 2})
|
||||
self.assertEqual(self.config.section2.value2(), 2)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_merge(self):
|
||||
self.config.from_yaml(self.config_file_1)
|
||||
self.config.from_yaml(self.config_file_2)
|
||||
|
@ -833,45 +831,37 @@ class ConfigFromYamlTests(unittest.TestCase):
|
|||
self.assertEqual(self.config.section3(), {"value3": 3})
|
||||
self.assertEqual(self.config.section3.value3(), 3)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_file_does_not_exist(self):
|
||||
self.config.from_yaml("./does_not_exist.yml")
|
||||
self.assertEqual(self.config(), {})
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_file_does_not_exist_strict_mode(self):
|
||||
self.config = providers.Configuration(strict=True)
|
||||
with self.assertRaises(IOError):
|
||||
self.config.from_yaml("./does_not_exist.yml")
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_option_file_does_not_exist(self):
|
||||
self.config.option.from_yaml("./does_not_exist.yml")
|
||||
self.assertIsNone(self.config.option())
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_option_file_does_not_exist_strict_mode(self):
|
||||
self.config = providers.Configuration(strict=True)
|
||||
with self.assertRaises(IOError):
|
||||
self.config.option.from_yaml("./does_not_exist.yml")
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_required_file_does_not_exist(self):
|
||||
with self.assertRaises(IOError):
|
||||
self.config.from_yaml("./does_not_exist.yml", required=True)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_required_option_file_does_not_exist(self):
|
||||
with self.assertRaises(IOError):
|
||||
self.config.option.from_yaml("./does_not_exist.yml", required=True)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_not_required_file_does_not_exist_strict_mode(self):
|
||||
self.config = providers.Configuration(strict=True)
|
||||
self.config.from_yaml("./does_not_exist.yml", required=False)
|
||||
self.assertEqual(self.config(), {})
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_not_required_option_file_does_not_exist_strict_mode(self):
|
||||
self.config = providers.Configuration(strict=True)
|
||||
self.config.option.from_yaml("./does_not_exist.yml", required=False)
|
||||
|
@ -943,7 +933,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
os.environ.pop("CONFIG_TEST_PATH", None)
|
||||
os.unlink(self.config_file)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_env_variable_interpolation(self):
|
||||
self.config.from_yaml(self.config_file)
|
||||
|
||||
|
@ -966,7 +955,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
self.assertEqual(self.config.section1.value1(), "test-value")
|
||||
self.assertEqual(self.config.section1.value2(), "test-path/path")
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_missing_envs_not_required(self):
|
||||
del os.environ["CONFIG_TEST_ENV"]
|
||||
del os.environ["CONFIG_TEST_PATH"]
|
||||
|
@ -992,7 +980,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
self.assertIsNone(self.config.section1.value1())
|
||||
self.assertEqual(self.config.section1.value2(), "/path")
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_missing_envs_required(self):
|
||||
with open(self.config_file, "w") as config_file:
|
||||
config_file.write(
|
||||
|
@ -1008,7 +995,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
"Missing required environment variable \"UNDEFINED\"",
|
||||
)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_missing_envs_strict_mode(self):
|
||||
with open(self.config_file, "w") as config_file:
|
||||
config_file.write(
|
||||
|
@ -1025,7 +1011,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
"Missing required environment variable \"UNDEFINED\"",
|
||||
)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_option_missing_envs_not_required(self):
|
||||
del os.environ["CONFIG_TEST_ENV"]
|
||||
del os.environ["CONFIG_TEST_PATH"]
|
||||
|
@ -1051,7 +1036,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
self.assertIsNone(self.config.option.section1.value1())
|
||||
self.assertEqual(self.config.option.section1.value2(), "/path")
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_option_missing_envs_required(self):
|
||||
with open(self.config_file, "w") as config_file:
|
||||
config_file.write(
|
||||
|
@ -1067,7 +1051,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
"Missing required environment variable \"UNDEFINED\"",
|
||||
)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_option_missing_envs_strict_mode(self):
|
||||
with open(self.config_file, "w") as config_file:
|
||||
config_file.write(
|
||||
|
@ -1084,7 +1067,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
"Missing required environment variable \"UNDEFINED\"",
|
||||
)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_default_values(self):
|
||||
os.environ["DEFINED"] = "defined"
|
||||
self.addCleanup(os.environ.pop, "DEFINED")
|
||||
|
@ -1108,7 +1090,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
},
|
||||
)
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_option_env_variable_interpolation(self):
|
||||
self.config.option.from_yaml(self.config_file)
|
||||
|
||||
|
@ -1131,7 +1112,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
self.assertEqual(self.config.option.section1.value1(), "test-value")
|
||||
self.assertEqual(self.config.option.section1.value2(), "test-path/path")
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_env_variable_interpolation_custom_loader(self):
|
||||
self.config.from_yaml(self.config_file, loader=yaml.UnsafeLoader)
|
||||
|
||||
|
@ -1145,7 +1125,6 @@ class ConfigFromYamlWithEnvInterpolationTests(unittest.TestCase):
|
|||
self.assertEqual(self.config.section1.value1(), "test-value")
|
||||
self.assertEqual(self.config.section1.value2(), "test-path/path")
|
||||
|
||||
@unittest.skipIf(sys.version_info[:2] == (3, 4), "PyYAML does not support Python 3.4")
|
||||
def test_option_env_variable_interpolation_custom_loader(self):
|
||||
self.config.option.from_yaml(self.config_file, loader=yaml.UnsafeLoader)
|
||||
|
||||
|
|
10
tox.ini
10
tox.ini
|
@ -1,6 +1,6 @@
|
|||
[tox]
|
||||
envlist=
|
||||
coveralls, pylint, flake8, pydocstyle, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3
|
||||
coveralls, pylint, flake8, pydocstyle, 2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3
|
||||
|
||||
[testenv]
|
||||
deps=
|
||||
|
@ -43,14 +43,6 @@ extras=
|
|||
commands=
|
||||
python -m unittest discover -s tests/unit -p test_*_py2_py3.py
|
||||
|
||||
[testenv:3.4]
|
||||
deps=
|
||||
contextvars
|
||||
extras=
|
||||
flask
|
||||
commands=
|
||||
python -m unittest discover -s tests/unit -p test_*_py3.py
|
||||
|
||||
[testenv:3.5]
|
||||
deps=
|
||||
contextvars
|
||||
|
|
Loading…
Reference in New Issue
Block a user