mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-12-04 15:34:04 +03:00
2beafb9a51
* Add List provider * Add List provider example * Add List provider unit tests * Add docs * Upstream changes from develop * Update API docs * Update unit tests * Add support of positional context argument injections * Update changelog
65126 lines
2.9 MiB
65126 lines
2.9 MiB
/* Generated by Cython 0.29.14 */
|
|
|
|
#define PY_SSIZE_T_CLEAN
|
|
#include "Python.h"
|
|
#ifndef Py_PYTHON_H
|
|
#error Python headers needed to compile C extensions, please install development version of Python.
|
|
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
|
|
#error Cython requires Python 2.6+ or Python 3.3+.
|
|
#else
|
|
#define CYTHON_ABI "0_29_14"
|
|
#define CYTHON_HEX_VERSION 0x001D0EF0
|
|
#define CYTHON_FUTURE_DIVISION 0
|
|
#include <stddef.h>
|
|
#ifndef offsetof
|
|
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
|
|
#endif
|
|
#if !defined(WIN32) && !defined(MS_WINDOWS)
|
|
#ifndef __stdcall
|
|
#define __stdcall
|
|
#endif
|
|
#ifndef __cdecl
|
|
#define __cdecl
|
|
#endif
|
|
#ifndef __fastcall
|
|
#define __fastcall
|
|
#endif
|
|
#endif
|
|
#ifndef DL_IMPORT
|
|
#define DL_IMPORT(t) t
|
|
#endif
|
|
#ifndef DL_EXPORT
|
|
#define DL_EXPORT(t) t
|
|
#endif
|
|
#define __PYX_COMMA ,
|
|
#ifndef HAVE_LONG_LONG
|
|
#if PY_VERSION_HEX >= 0x02070000
|
|
#define HAVE_LONG_LONG
|
|
#endif
|
|
#endif
|
|
#ifndef PY_LONG_LONG
|
|
#define PY_LONG_LONG LONG_LONG
|
|
#endif
|
|
#ifndef Py_HUGE_VAL
|
|
#define Py_HUGE_VAL HUGE_VAL
|
|
#endif
|
|
#ifdef PYPY_VERSION
|
|
#define CYTHON_COMPILING_IN_PYPY 1
|
|
#define CYTHON_COMPILING_IN_PYSTON 0
|
|
#define CYTHON_COMPILING_IN_CPYTHON 0
|
|
#undef CYTHON_USE_TYPE_SLOTS
|
|
#define CYTHON_USE_TYPE_SLOTS 0
|
|
#undef CYTHON_USE_PYTYPE_LOOKUP
|
|
#define CYTHON_USE_PYTYPE_LOOKUP 0
|
|
#if PY_VERSION_HEX < 0x03050000
|
|
#undef CYTHON_USE_ASYNC_SLOTS
|
|
#define CYTHON_USE_ASYNC_SLOTS 0
|
|
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
|
|
#define CYTHON_USE_ASYNC_SLOTS 1
|
|
#endif
|
|
#undef CYTHON_USE_PYLIST_INTERNALS
|
|
#define CYTHON_USE_PYLIST_INTERNALS 0
|
|
#undef CYTHON_USE_UNICODE_INTERNALS
|
|
#define CYTHON_USE_UNICODE_INTERNALS 0
|
|
#undef CYTHON_USE_UNICODE_WRITER
|
|
#define CYTHON_USE_UNICODE_WRITER 0
|
|
#undef CYTHON_USE_PYLONG_INTERNALS
|
|
#define CYTHON_USE_PYLONG_INTERNALS 0
|
|
#undef CYTHON_AVOID_BORROWED_REFS
|
|
#define CYTHON_AVOID_BORROWED_REFS 1
|
|
#undef CYTHON_ASSUME_SAFE_MACROS
|
|
#define CYTHON_ASSUME_SAFE_MACROS 0
|
|
#undef CYTHON_UNPACK_METHODS
|
|
#define CYTHON_UNPACK_METHODS 0
|
|
#undef CYTHON_FAST_THREAD_STATE
|
|
#define CYTHON_FAST_THREAD_STATE 0
|
|
#undef CYTHON_FAST_PYCALL
|
|
#define CYTHON_FAST_PYCALL 0
|
|
#undef CYTHON_PEP489_MULTI_PHASE_INIT
|
|
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
|
|
#undef CYTHON_USE_TP_FINALIZE
|
|
#define CYTHON_USE_TP_FINALIZE 0
|
|
#undef CYTHON_USE_DICT_VERSIONS
|
|
#define CYTHON_USE_DICT_VERSIONS 0
|
|
#undef CYTHON_USE_EXC_INFO_STACK
|
|
#define CYTHON_USE_EXC_INFO_STACK 0
|
|
#elif defined(PYSTON_VERSION)
|
|
#define CYTHON_COMPILING_IN_PYPY 0
|
|
#define CYTHON_COMPILING_IN_PYSTON 1
|
|
#define CYTHON_COMPILING_IN_CPYTHON 0
|
|
#ifndef CYTHON_USE_TYPE_SLOTS
|
|
#define CYTHON_USE_TYPE_SLOTS 1
|
|
#endif
|
|
#undef CYTHON_USE_PYTYPE_LOOKUP
|
|
#define CYTHON_USE_PYTYPE_LOOKUP 0
|
|
#undef CYTHON_USE_ASYNC_SLOTS
|
|
#define CYTHON_USE_ASYNC_SLOTS 0
|
|
#undef CYTHON_USE_PYLIST_INTERNALS
|
|
#define CYTHON_USE_PYLIST_INTERNALS 0
|
|
#ifndef CYTHON_USE_UNICODE_INTERNALS
|
|
#define CYTHON_USE_UNICODE_INTERNALS 1
|
|
#endif
|
|
#undef CYTHON_USE_UNICODE_WRITER
|
|
#define CYTHON_USE_UNICODE_WRITER 0
|
|
#undef CYTHON_USE_PYLONG_INTERNALS
|
|
#define CYTHON_USE_PYLONG_INTERNALS 0
|
|
#ifndef CYTHON_AVOID_BORROWED_REFS
|
|
#define CYTHON_AVOID_BORROWED_REFS 0
|
|
#endif
|
|
#ifndef CYTHON_ASSUME_SAFE_MACROS
|
|
#define CYTHON_ASSUME_SAFE_MACROS 1
|
|
#endif
|
|
#ifndef CYTHON_UNPACK_METHODS
|
|
#define CYTHON_UNPACK_METHODS 1
|
|
#endif
|
|
#undef CYTHON_FAST_THREAD_STATE
|
|
#define CYTHON_FAST_THREAD_STATE 0
|
|
#undef CYTHON_FAST_PYCALL
|
|
#define CYTHON_FAST_PYCALL 0
|
|
#undef CYTHON_PEP489_MULTI_PHASE_INIT
|
|
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
|
|
#undef CYTHON_USE_TP_FINALIZE
|
|
#define CYTHON_USE_TP_FINALIZE 0
|
|
#undef CYTHON_USE_DICT_VERSIONS
|
|
#define CYTHON_USE_DICT_VERSIONS 0
|
|
#undef CYTHON_USE_EXC_INFO_STACK
|
|
#define CYTHON_USE_EXC_INFO_STACK 0
|
|
#else
|
|
#define CYTHON_COMPILING_IN_PYPY 0
|
|
#define CYTHON_COMPILING_IN_PYSTON 0
|
|
#define CYTHON_COMPILING_IN_CPYTHON 1
|
|
#ifndef CYTHON_USE_TYPE_SLOTS
|
|
#define CYTHON_USE_TYPE_SLOTS 1
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02070000
|
|
#undef CYTHON_USE_PYTYPE_LOOKUP
|
|
#define CYTHON_USE_PYTYPE_LOOKUP 0
|
|
#elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
|
|
#define CYTHON_USE_PYTYPE_LOOKUP 1
|
|
#endif
|
|
#if PY_MAJOR_VERSION < 3
|
|
#undef CYTHON_USE_ASYNC_SLOTS
|
|
#define CYTHON_USE_ASYNC_SLOTS 0
|
|
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
|
|
#define CYTHON_USE_ASYNC_SLOTS 1
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02070000
|
|
#undef CYTHON_USE_PYLONG_INTERNALS
|
|
#define CYTHON_USE_PYLONG_INTERNALS 0
|
|
#elif !defined(CYTHON_USE_PYLONG_INTERNALS)
|
|
#define CYTHON_USE_PYLONG_INTERNALS 1
|
|
#endif
|
|
#ifndef CYTHON_USE_PYLIST_INTERNALS
|
|
#define CYTHON_USE_PYLIST_INTERNALS 1
|
|
#endif
|
|
#ifndef CYTHON_USE_UNICODE_INTERNALS
|
|
#define CYTHON_USE_UNICODE_INTERNALS 1
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x030300F0
|
|
#undef CYTHON_USE_UNICODE_WRITER
|
|
#define CYTHON_USE_UNICODE_WRITER 0
|
|
#elif !defined(CYTHON_USE_UNICODE_WRITER)
|
|
#define CYTHON_USE_UNICODE_WRITER 1
|
|
#endif
|
|
#ifndef CYTHON_AVOID_BORROWED_REFS
|
|
#define CYTHON_AVOID_BORROWED_REFS 0
|
|
#endif
|
|
#ifndef CYTHON_ASSUME_SAFE_MACROS
|
|
#define CYTHON_ASSUME_SAFE_MACROS 1
|
|
#endif
|
|
#ifndef CYTHON_UNPACK_METHODS
|
|
#define CYTHON_UNPACK_METHODS 1
|
|
#endif
|
|
#ifndef CYTHON_FAST_THREAD_STATE
|
|
#define CYTHON_FAST_THREAD_STATE 1
|
|
#endif
|
|
#ifndef CYTHON_FAST_PYCALL
|
|
#define CYTHON_FAST_PYCALL 1
|
|
#endif
|
|
#ifndef CYTHON_PEP489_MULTI_PHASE_INIT
|
|
#define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
|
|
#endif
|
|
#ifndef CYTHON_USE_TP_FINALIZE
|
|
#define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
|
|
#endif
|
|
#ifndef CYTHON_USE_DICT_VERSIONS
|
|
#define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
|
|
#endif
|
|
#ifndef CYTHON_USE_EXC_INFO_STACK
|
|
#define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
|
|
#endif
|
|
#endif
|
|
#if !defined(CYTHON_FAST_PYCCALL)
|
|
#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
|
|
#endif
|
|
#if CYTHON_USE_PYLONG_INTERNALS
|
|
#include "longintrepr.h"
|
|
#undef SHIFT
|
|
#undef BASE
|
|
#undef MASK
|
|
#ifdef SIZEOF_VOID_P
|
|
enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
|
|
#endif
|
|
#endif
|
|
#ifndef __has_attribute
|
|
#define __has_attribute(x) 0
|
|
#endif
|
|
#ifndef __has_cpp_attribute
|
|
#define __has_cpp_attribute(x) 0
|
|
#endif
|
|
#ifndef CYTHON_RESTRICT
|
|
#if defined(__GNUC__)
|
|
#define CYTHON_RESTRICT __restrict__
|
|
#elif defined(_MSC_VER) && _MSC_VER >= 1400
|
|
#define CYTHON_RESTRICT __restrict
|
|
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
#define CYTHON_RESTRICT restrict
|
|
#else
|
|
#define CYTHON_RESTRICT
|
|
#endif
|
|
#endif
|
|
#ifndef CYTHON_UNUSED
|
|
# if defined(__GNUC__)
|
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
|
# define CYTHON_UNUSED __attribute__ ((__unused__))
|
|
# else
|
|
# define CYTHON_UNUSED
|
|
# endif
|
|
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
|
|
# define CYTHON_UNUSED __attribute__ ((__unused__))
|
|
# else
|
|
# define CYTHON_UNUSED
|
|
# endif
|
|
#endif
|
|
#ifndef CYTHON_MAYBE_UNUSED_VAR
|
|
# if defined(__cplusplus)
|
|
template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
|
|
# else
|
|
# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
|
|
# endif
|
|
#endif
|
|
#ifndef CYTHON_NCP_UNUSED
|
|
# if CYTHON_COMPILING_IN_CPYTHON
|
|
# define CYTHON_NCP_UNUSED
|
|
# else
|
|
# define CYTHON_NCP_UNUSED CYTHON_UNUSED
|
|
# endif
|
|
#endif
|
|
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
|
|
#ifdef _MSC_VER
|
|
#ifndef _MSC_STDINT_H_
|
|
#if _MSC_VER < 1300
|
|
typedef unsigned char uint8_t;
|
|
typedef unsigned int uint32_t;
|
|
#else
|
|
typedef unsigned __int8 uint8_t;
|
|
typedef unsigned __int32 uint32_t;
|
|
#endif
|
|
#endif
|
|
#else
|
|
#include <stdint.h>
|
|
#endif
|
|
#ifndef CYTHON_FALLTHROUGH
|
|
#if defined(__cplusplus) && __cplusplus >= 201103L
|
|
#if __has_cpp_attribute(fallthrough)
|
|
#define CYTHON_FALLTHROUGH [[fallthrough]]
|
|
#elif __has_cpp_attribute(clang::fallthrough)
|
|
#define CYTHON_FALLTHROUGH [[clang::fallthrough]]
|
|
#elif __has_cpp_attribute(gnu::fallthrough)
|
|
#define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
|
|
#endif
|
|
#endif
|
|
#ifndef CYTHON_FALLTHROUGH
|
|
#if __has_attribute(fallthrough)
|
|
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
|
|
#else
|
|
#define CYTHON_FALLTHROUGH
|
|
#endif
|
|
#endif
|
|
#if defined(__clang__ ) && defined(__apple_build_version__)
|
|
#if __apple_build_version__ < 7000000
|
|
#undef CYTHON_FALLTHROUGH
|
|
#define CYTHON_FALLTHROUGH
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef CYTHON_INLINE
|
|
#if defined(__clang__)
|
|
#define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
|
|
#elif defined(__GNUC__)
|
|
#define CYTHON_INLINE __inline__
|
|
#elif defined(_MSC_VER)
|
|
#define CYTHON_INLINE __inline
|
|
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
#define CYTHON_INLINE inline
|
|
#else
|
|
#define CYTHON_INLINE
|
|
#endif
|
|
#endif
|
|
|
|
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
|
|
#define Py_OptimizeFlag 0
|
|
#endif
|
|
#define __PYX_BUILD_PY_SSIZE_T "n"
|
|
#define CYTHON_FORMAT_SSIZE_T "z"
|
|
#if PY_MAJOR_VERSION < 3
|
|
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
|
|
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
|
|
PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
|
|
#define __Pyx_DefaultClassType PyClass_Type
|
|
#else
|
|
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
|
|
#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
|
|
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
|
|
PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
|
|
#else
|
|
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
|
|
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
|
|
#endif
|
|
#define __Pyx_DefaultClassType PyType_Type
|
|
#endif
|
|
#ifndef Py_TPFLAGS_CHECKTYPES
|
|
#define Py_TPFLAGS_CHECKTYPES 0
|
|
#endif
|
|
#ifndef Py_TPFLAGS_HAVE_INDEX
|
|
#define Py_TPFLAGS_HAVE_INDEX 0
|
|
#endif
|
|
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
|
|
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
|
|
#endif
|
|
#ifndef Py_TPFLAGS_HAVE_FINALIZE
|
|
#define Py_TPFLAGS_HAVE_FINALIZE 0
|
|
#endif
|
|
#ifndef METH_STACKLESS
|
|
#define METH_STACKLESS 0
|
|
#endif
|
|
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
|
|
#ifndef METH_FASTCALL
|
|
#define METH_FASTCALL 0x80
|
|
#endif
|
|
typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
|
|
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
|
|
Py_ssize_t nargs, PyObject *kwnames);
|
|
#else
|
|
#define __Pyx_PyCFunctionFast _PyCFunctionFast
|
|
#define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
#define __Pyx_PyFastCFunction_Check(func)\
|
|
((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
|
|
#else
|
|
#define __Pyx_PyFastCFunction_Check(func) 0
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
|
|
#define PyObject_Malloc(s) PyMem_Malloc(s)
|
|
#define PyObject_Free(p) PyMem_Free(p)
|
|
#define PyObject_Realloc(p) PyMem_Realloc(p)
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
|
|
#define PyMem_RawMalloc(n) PyMem_Malloc(n)
|
|
#define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
|
|
#define PyMem_RawFree(p) PyMem_Free(p)
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYSTON
|
|
#define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
|
|
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
|
|
#else
|
|
#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
|
|
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
|
|
#endif
|
|
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
|
|
#define __Pyx_PyThreadState_Current PyThreadState_GET()
|
|
#elif PY_VERSION_HEX >= 0x03060000
|
|
#define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
|
|
#elif PY_VERSION_HEX >= 0x03000000
|
|
#define __Pyx_PyThreadState_Current PyThreadState_GET()
|
|
#else
|
|
#define __Pyx_PyThreadState_Current _PyThreadState_Current
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
|
|
#include "pythread.h"
|
|
#define Py_tss_NEEDS_INIT 0
|
|
typedef int Py_tss_t;
|
|
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
|
|
*key = PyThread_create_key();
|
|
return 0;
|
|
}
|
|
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
|
|
Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
|
|
*key = Py_tss_NEEDS_INIT;
|
|
return key;
|
|
}
|
|
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
|
|
PyObject_Free(key);
|
|
}
|
|
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
|
|
return *key != Py_tss_NEEDS_INIT;
|
|
}
|
|
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
|
|
PyThread_delete_key(*key);
|
|
*key = Py_tss_NEEDS_INIT;
|
|
}
|
|
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
|
|
return PyThread_set_key_value(*key, value);
|
|
}
|
|
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
|
|
return PyThread_get_key_value(*key);
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
|
|
#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
|
|
#else
|
|
#define __Pyx_PyDict_NewPresized(n) PyDict_New()
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
|
|
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
|
|
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
|
|
#else
|
|
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
|
|
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
|
|
#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
|
|
#else
|
|
#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
|
|
#endif
|
|
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
|
|
#define CYTHON_PEP393_ENABLED 1
|
|
#define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
|
|
0 : _PyUnicode_Ready((PyObject *)(op)))
|
|
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
|
|
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
|
|
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
|
|
#define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
|
|
#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
|
|
#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
|
|
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
|
|
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
|
|
#else
|
|
#define CYTHON_PEP393_ENABLED 0
|
|
#define PyUnicode_1BYTE_KIND 1
|
|
#define PyUnicode_2BYTE_KIND 2
|
|
#define PyUnicode_4BYTE_KIND 4
|
|
#define __Pyx_PyUnicode_READY(op) (0)
|
|
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
|
|
#define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
|
|
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
|
|
#define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
|
|
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
|
|
#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
|
|
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
|
|
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
#define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
|
|
#define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
|
|
#else
|
|
#define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
|
|
#define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
|
|
PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
|
|
#define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
|
|
#define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
|
|
#define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
|
|
#endif
|
|
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
|
|
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
|
|
#else
|
|
#define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
|
|
#endif
|
|
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
|
|
#define PyObject_ASCII(o) PyObject_Repr(o)
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define PyBaseString_Type PyUnicode_Type
|
|
#define PyStringObject PyUnicodeObject
|
|
#define PyString_Type PyUnicode_Type
|
|
#define PyString_Check PyUnicode_Check
|
|
#define PyString_CheckExact PyUnicode_CheckExact
|
|
#define PyObject_Unicode PyObject_Str
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
|
|
#define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
|
|
#else
|
|
#define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
|
|
#define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
|
|
#endif
|
|
#ifndef PySet_CheckExact
|
|
#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
|
|
#endif
|
|
#if CYTHON_ASSUME_SAFE_MACROS
|
|
#define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
|
|
#else
|
|
#define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define PyIntObject PyLongObject
|
|
#define PyInt_Type PyLong_Type
|
|
#define PyInt_Check(op) PyLong_Check(op)
|
|
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
|
|
#define PyInt_FromString PyLong_FromString
|
|
#define PyInt_FromUnicode PyLong_FromUnicode
|
|
#define PyInt_FromLong PyLong_FromLong
|
|
#define PyInt_FromSize_t PyLong_FromSize_t
|
|
#define PyInt_FromSsize_t PyLong_FromSsize_t
|
|
#define PyInt_AsLong PyLong_AsLong
|
|
#define PyInt_AS_LONG PyLong_AS_LONG
|
|
#define PyInt_AsSsize_t PyLong_AsSsize_t
|
|
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
|
|
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
|
|
#define PyNumber_Int PyNumber_Long
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define PyBoolObject PyLongObject
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
|
|
#ifndef PyUnicode_InternFromString
|
|
#define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
|
|
#endif
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x030200A4
|
|
typedef long Py_hash_t;
|
|
#define __Pyx_PyInt_FromHash_t PyInt_FromLong
|
|
#define __Pyx_PyInt_AsHash_t PyInt_AsLong
|
|
#else
|
|
#define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
|
|
#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
|
|
#else
|
|
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
|
|
#endif
|
|
#if CYTHON_USE_ASYNC_SLOTS
|
|
#if PY_VERSION_HEX >= 0x030500B1
|
|
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
|
|
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
|
|
#else
|
|
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
|
|
#endif
|
|
#else
|
|
#define __Pyx_PyType_AsAsync(obj) NULL
|
|
#endif
|
|
#ifndef __Pyx_PyAsyncMethodsStruct
|
|
typedef struct {
|
|
unaryfunc am_await;
|
|
unaryfunc am_aiter;
|
|
unaryfunc am_anext;
|
|
} __Pyx_PyAsyncMethodsStruct;
|
|
#endif
|
|
|
|
#if defined(WIN32) || defined(MS_WINDOWS)
|
|
#define _USE_MATH_DEFINES
|
|
#endif
|
|
#include <math.h>
|
|
#ifdef NAN
|
|
#define __PYX_NAN() ((float) NAN)
|
|
#else
|
|
static CYTHON_INLINE float __PYX_NAN() {
|
|
float value;
|
|
memset(&value, 0xFF, sizeof(value));
|
|
return value;
|
|
}
|
|
#endif
|
|
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
|
|
#define __Pyx_truncl trunc
|
|
#else
|
|
#define __Pyx_truncl truncl
|
|
#endif
|
|
|
|
|
|
#define __PYX_ERR(f_index, lineno, Ln_error) \
|
|
{ \
|
|
__pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
|
|
}
|
|
|
|
#ifndef __PYX_EXTERN_C
|
|
#ifdef __cplusplus
|
|
#define __PYX_EXTERN_C extern "C"
|
|
#else
|
|
#define __PYX_EXTERN_C extern
|
|
#endif
|
|
#endif
|
|
|
|
#define __PYX_HAVE__dependency_injector__providers
|
|
#define __PYX_HAVE_API__dependency_injector__providers
|
|
/* Early includes */
|
|
#ifdef _OPENMP
|
|
#include <omp.h>
|
|
#endif /* _OPENMP */
|
|
|
|
#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
|
|
#define CYTHON_WITHOUT_ASSERTIONS
|
|
#endif
|
|
|
|
typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
|
|
const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
|
|
|
|
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
|
|
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
|
|
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
|
|
#define __PYX_DEFAULT_STRING_ENCODING ""
|
|
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
|
|
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
|
|
#define __Pyx_uchar_cast(c) ((unsigned char)c)
|
|
#define __Pyx_long_cast(x) ((long)x)
|
|
#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
|
|
(sizeof(type) < sizeof(Py_ssize_t)) ||\
|
|
(sizeof(type) > sizeof(Py_ssize_t) &&\
|
|
likely(v < (type)PY_SSIZE_T_MAX ||\
|
|
v == (type)PY_SSIZE_T_MAX) &&\
|
|
(!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
|
|
v == (type)PY_SSIZE_T_MIN))) ||\
|
|
(sizeof(type) == sizeof(Py_ssize_t) &&\
|
|
(is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
|
|
v == (type)PY_SSIZE_T_MAX))) )
|
|
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
|
|
return (size_t) i < (size_t) limit;
|
|
}
|
|
#if defined (__cplusplus) && __cplusplus >= 201103L
|
|
#include <cstdlib>
|
|
#define __Pyx_sst_abs(value) std::abs(value)
|
|
#elif SIZEOF_INT >= SIZEOF_SIZE_T
|
|
#define __Pyx_sst_abs(value) abs(value)
|
|
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
|
|
#define __Pyx_sst_abs(value) labs(value)
|
|
#elif defined (_MSC_VER)
|
|
#define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
|
|
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
#define __Pyx_sst_abs(value) llabs(value)
|
|
#elif defined (__GNUC__)
|
|
#define __Pyx_sst_abs(value) __builtin_llabs(value)
|
|
#else
|
|
#define __Pyx_sst_abs(value) ((value<0) ? -value : value)
|
|
#endif
|
|
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
|
|
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
|
|
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
|
|
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
|
|
#define __Pyx_PyBytes_FromString PyBytes_FromString
|
|
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
|
|
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
|
|
#if PY_MAJOR_VERSION < 3
|
|
#define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
|
|
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
|
|
#else
|
|
#define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
|
|
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
|
|
#endif
|
|
#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
|
|
#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
|
|
#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
|
|
#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
|
|
#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
|
|
#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
|
|
#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
|
|
#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
|
|
#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
|
|
#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
|
|
#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
|
|
#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
|
|
#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
|
|
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
|
|
#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
|
|
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
|
|
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
|
|
const Py_UNICODE *u_end = u;
|
|
while (*u_end++) ;
|
|
return (size_t)(u_end - u - 1);
|
|
}
|
|
#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
|
|
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
|
|
#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
|
|
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
|
|
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
|
|
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
|
|
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
|
|
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
|
|
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
|
|
#define __Pyx_PySequence_Tuple(obj)\
|
|
(likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
|
|
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
|
|
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
|
|
#if CYTHON_ASSUME_SAFE_MACROS
|
|
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
|
|
#else
|
|
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
|
|
#endif
|
|
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
|
|
#else
|
|
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
|
|
#endif
|
|
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
|
|
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
|
|
static int __Pyx_sys_getdefaultencoding_not_ascii;
|
|
static int __Pyx_init_sys_getdefaultencoding_params(void) {
|
|
PyObject* sys;
|
|
PyObject* default_encoding = NULL;
|
|
PyObject* ascii_chars_u = NULL;
|
|
PyObject* ascii_chars_b = NULL;
|
|
const char* default_encoding_c;
|
|
sys = PyImport_ImportModule("sys");
|
|
if (!sys) goto bad;
|
|
default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
|
|
Py_DECREF(sys);
|
|
if (!default_encoding) goto bad;
|
|
default_encoding_c = PyBytes_AsString(default_encoding);
|
|
if (!default_encoding_c) goto bad;
|
|
if (strcmp(default_encoding_c, "ascii") == 0) {
|
|
__Pyx_sys_getdefaultencoding_not_ascii = 0;
|
|
} else {
|
|
char ascii_chars[128];
|
|
int c;
|
|
for (c = 0; c < 128; c++) {
|
|
ascii_chars[c] = c;
|
|
}
|
|
__Pyx_sys_getdefaultencoding_not_ascii = 1;
|
|
ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
|
|
if (!ascii_chars_u) goto bad;
|
|
ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
|
|
if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
|
|
PyErr_Format(
|
|
PyExc_ValueError,
|
|
"This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
|
|
default_encoding_c);
|
|
goto bad;
|
|
}
|
|
Py_DECREF(ascii_chars_u);
|
|
Py_DECREF(ascii_chars_b);
|
|
}
|
|
Py_DECREF(default_encoding);
|
|
return 0;
|
|
bad:
|
|
Py_XDECREF(default_encoding);
|
|
Py_XDECREF(ascii_chars_u);
|
|
Py_XDECREF(ascii_chars_b);
|
|
return -1;
|
|
}
|
|
#endif
|
|
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
|
|
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
|
|
#else
|
|
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
|
|
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
|
|
static char* __PYX_DEFAULT_STRING_ENCODING;
|
|
static int __Pyx_init_sys_getdefaultencoding_params(void) {
|
|
PyObject* sys;
|
|
PyObject* default_encoding = NULL;
|
|
char* default_encoding_c;
|
|
sys = PyImport_ImportModule("sys");
|
|
if (!sys) goto bad;
|
|
default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
|
|
Py_DECREF(sys);
|
|
if (!default_encoding) goto bad;
|
|
default_encoding_c = PyBytes_AsString(default_encoding);
|
|
if (!default_encoding_c) goto bad;
|
|
__PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
|
|
if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
|
|
strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
|
|
Py_DECREF(default_encoding);
|
|
return 0;
|
|
bad:
|
|
Py_XDECREF(default_encoding);
|
|
return -1;
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/* Test for GCC > 2.95 */
|
|
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
|
|
#define likely(x) __builtin_expect(!!(x), 1)
|
|
#define unlikely(x) __builtin_expect(!!(x), 0)
|
|
#else /* !__GNUC__ or GCC < 2.95 */
|
|
#define likely(x) (x)
|
|
#define unlikely(x) (x)
|
|
#endif /* __GNUC__ */
|
|
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
|
|
|
|
static PyObject *__pyx_m = NULL;
|
|
static PyObject *__pyx_d;
|
|
static PyObject *__pyx_b;
|
|
static PyObject *__pyx_cython_runtime = NULL;
|
|
static PyObject *__pyx_empty_tuple;
|
|
static PyObject *__pyx_empty_bytes;
|
|
static PyObject *__pyx_empty_unicode;
|
|
static int __pyx_lineno;
|
|
static int __pyx_clineno = 0;
|
|
static const char * __pyx_cfilenm= __FILE__;
|
|
static const char *__pyx_filename;
|
|
|
|
|
|
static const char *__pyx_f[] = {
|
|
"src/dependency_injector/providers.pxd",
|
|
"src/dependency_injector/providers.pyx",
|
|
"stringsource",
|
|
};
|
|
|
|
/*--- Type declarations ---*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider;
|
|
struct __pyx_obj_19dependency_injector_9providers_Object;
|
|
struct __pyx_obj_19dependency_injector_9providers_Delegate;
|
|
struct __pyx_obj_19dependency_injector_9providers_Dependency;
|
|
struct __pyx_obj_19dependency_injector_9providers_ExternalDependency;
|
|
struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer;
|
|
struct __pyx_obj_19dependency_injector_9providers_OverridingContext;
|
|
struct __pyx_obj_19dependency_injector_9providers_Callable;
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable;
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractCallable;
|
|
struct __pyx_obj_19dependency_injector_9providers_CallableDelegate;
|
|
struct __pyx_obj_19dependency_injector_9providers_Coroutine;
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine;
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine;
|
|
struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate;
|
|
struct __pyx_obj_19dependency_injector_9providers_Configuration;
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory;
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory;
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractFactory;
|
|
struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate;
|
|
struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate;
|
|
struct __pyx_obj_19dependency_injector_9providers_BaseSingleton;
|
|
struct __pyx_obj_19dependency_injector_9providers_Singleton;
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton;
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton;
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton;
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton;
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton;
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton;
|
|
struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate;
|
|
struct __pyx_obj_19dependency_injector_9providers_List;
|
|
struct __pyx_obj_19dependency_injector_9providers_Injection;
|
|
struct __pyx_obj_19dependency_injector_9providers_PositionalInjection;
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy;
|
|
|
|
/* "dependency_injector/providers.pxd":216
|
|
*
|
|
*
|
|
* cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy {
|
|
int __pyx_n;
|
|
PyObject *memo;
|
|
};
|
|
|
|
/* "dependency_injector/providers.pxd":10
|
|
*
|
|
* # Base providers
|
|
* cdef class Provider(object): # <<<<<<<<<<<<<<
|
|
* cdef tuple __overridden
|
|
* cdef Provider __last_overriding
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider {
|
|
PyObject_HEAD
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *__pyx_vtab;
|
|
PyObject *__pyx___overridden;
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___last_overriding;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":18
|
|
*
|
|
*
|
|
* cdef class Object(Provider): # <<<<<<<<<<<<<<
|
|
* cdef object __provides
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Object {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base;
|
|
PyObject *__pyx___provides;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":24
|
|
*
|
|
*
|
|
* cdef class Delegate(Provider): # <<<<<<<<<<<<<<
|
|
* cdef object __provides
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Delegate {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base;
|
|
PyObject *__pyx___provides;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":30
|
|
*
|
|
*
|
|
* cdef class Dependency(Provider): # <<<<<<<<<<<<<<
|
|
* cdef type __instance_of
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Dependency {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base;
|
|
PyTypeObject *__pyx___instance_of;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":34
|
|
*
|
|
*
|
|
* cdef class ExternalDependency(Dependency): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_ExternalDependency {
|
|
struct __pyx_obj_19dependency_injector_9providers_Dependency __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":38
|
|
*
|
|
*
|
|
* cdef class DependenciesContainer(Object): # <<<<<<<<<<<<<<
|
|
* cdef dict __providers
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer {
|
|
struct __pyx_obj_19dependency_injector_9providers_Object __pyx_base;
|
|
PyObject *__pyx___providers;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":44
|
|
*
|
|
*
|
|
* cdef class OverridingContext(object): # <<<<<<<<<<<<<<
|
|
* cdef Provider __overridden
|
|
* cdef Provider __overriding
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_OverridingContext {
|
|
PyObject_HEAD
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___overridden;
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___overriding;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":50
|
|
*
|
|
* # Callable providers
|
|
* cdef class Callable(Provider): # <<<<<<<<<<<<<<
|
|
* cdef object __provides
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Callable {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base;
|
|
PyObject *__pyx___provides;
|
|
PyObject *__pyx___args;
|
|
int __pyx___args_len;
|
|
PyObject *__pyx___kwargs;
|
|
int __pyx___kwargs_len;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":62
|
|
*
|
|
*
|
|
* cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable {
|
|
struct __pyx_obj_19dependency_injector_9providers_Callable __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":66
|
|
*
|
|
*
|
|
* cdef class AbstractCallable(Callable): # <<<<<<<<<<<<<<
|
|
* cpdef object _provide(self, tuple args, dict kwargs)
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractCallable {
|
|
struct __pyx_obj_19dependency_injector_9providers_Callable __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":70
|
|
*
|
|
*
|
|
* cdef class CallableDelegate(Delegate): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_CallableDelegate {
|
|
struct __pyx_obj_19dependency_injector_9providers_Delegate __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":75
|
|
*
|
|
* # Coroutine providers
|
|
* cdef class Coroutine(Callable): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Coroutine {
|
|
struct __pyx_obj_19dependency_injector_9providers_Callable __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":79
|
|
*
|
|
*
|
|
* cdef class DelegatedCoroutine(Coroutine): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine {
|
|
struct __pyx_obj_19dependency_injector_9providers_Coroutine __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":83
|
|
*
|
|
*
|
|
* cdef class AbstractCoroutine(Coroutine): # <<<<<<<<<<<<<<
|
|
* cpdef object _provide(self, tuple args, dict kwargs)
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine {
|
|
struct __pyx_obj_19dependency_injector_9providers_Coroutine __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":87
|
|
*
|
|
*
|
|
* cdef class CoroutineDelegate(Delegate): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate {
|
|
struct __pyx_obj_19dependency_injector_9providers_Delegate __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":92
|
|
*
|
|
* # Configuration providers
|
|
* cdef class Configuration(Object): # <<<<<<<<<<<<<<
|
|
* cdef str __name
|
|
* cdef dict __children
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Configuration {
|
|
struct __pyx_obj_19dependency_injector_9providers_Object __pyx_base;
|
|
PyObject *__pyx___name;
|
|
PyObject *__pyx___children;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":98
|
|
*
|
|
* # Factory providers
|
|
* cdef class Factory(Provider): # <<<<<<<<<<<<<<
|
|
* cdef Callable __instantiator
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base;
|
|
struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx___instantiator;
|
|
PyObject *__pyx___attributes;
|
|
int __pyx___attributes_len;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":107
|
|
*
|
|
*
|
|
* cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory {
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":111
|
|
*
|
|
*
|
|
* cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<<
|
|
* cpdef object _provide(self, tuple args, dict kwargs)
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractFactory {
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":115
|
|
*
|
|
*
|
|
* cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate {
|
|
struct __pyx_obj_19dependency_injector_9providers_Delegate __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":119
|
|
*
|
|
*
|
|
* cdef class FactoryAggregate(Provider): # <<<<<<<<<<<<<<
|
|
* cdef dict __factories
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base;
|
|
PyObject *__pyx___factories;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":126
|
|
*
|
|
* # Singleton providers
|
|
* cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<<
|
|
* cdef Factory __instantiator
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_BaseSingleton {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base;
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx___instantiator;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":130
|
|
*
|
|
*
|
|
* cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<<
|
|
* cdef object __storage
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Singleton {
|
|
struct __pyx_obj_19dependency_injector_9providers_BaseSingleton __pyx_base;
|
|
PyObject *__pyx___storage;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":136
|
|
*
|
|
*
|
|
* cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton {
|
|
struct __pyx_obj_19dependency_injector_9providers_Singleton __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":140
|
|
*
|
|
*
|
|
* cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<<
|
|
* cdef object __storage
|
|
* cdef object __storage_lock
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton {
|
|
struct __pyx_obj_19dependency_injector_9providers_BaseSingleton __pyx_base;
|
|
PyObject *__pyx___storage;
|
|
PyObject *__pyx___storage_lock;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":147
|
|
*
|
|
*
|
|
* cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton {
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":151
|
|
*
|
|
*
|
|
* cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<<
|
|
* cdef object __storage
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton {
|
|
struct __pyx_obj_19dependency_injector_9providers_BaseSingleton __pyx_base;
|
|
PyObject *__pyx___storage;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":157
|
|
*
|
|
*
|
|
* cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton {
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":161
|
|
*
|
|
*
|
|
* cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton {
|
|
struct __pyx_obj_19dependency_injector_9providers_BaseSingleton __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":165
|
|
*
|
|
*
|
|
* cdef class SingletonDelegate(Delegate): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate {
|
|
struct __pyx_obj_19dependency_injector_9providers_Delegate __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":171
|
|
* # Miscellaneous providers
|
|
*
|
|
* cdef class List(Provider): # <<<<<<<<<<<<<<
|
|
* cdef tuple __args
|
|
* cdef int __args_len
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_List {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base;
|
|
PyObject *__pyx___args;
|
|
int __pyx___args_len;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":179
|
|
*
|
|
* # Injections
|
|
* cdef class Injection(object): # <<<<<<<<<<<<<<
|
|
* cdef object __value
|
|
* cdef int __is_provider
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_Injection {
|
|
PyObject_HEAD
|
|
PyObject *__pyx___value;
|
|
int __pyx___is_provider;
|
|
int __pyx___is_delegated;
|
|
int __pyx___call;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":186
|
|
*
|
|
*
|
|
* cdef class PositionalInjection(Injection): # <<<<<<<<<<<<<<
|
|
* pass
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_PositionalInjection {
|
|
struct __pyx_obj_19dependency_injector_9providers_Injection __pyx_base;
|
|
};
|
|
|
|
|
|
/* "dependency_injector/providers.pxd":190
|
|
*
|
|
*
|
|
* cdef class NamedInjection(Injection): # <<<<<<<<<<<<<<
|
|
* cdef object __name
|
|
*
|
|
*/
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection {
|
|
struct __pyx_obj_19dependency_injector_9providers_Injection __pyx_base;
|
|
PyObject *__pyx___name;
|
|
};
|
|
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":44
|
|
*
|
|
*
|
|
* cdef class Provider(object): # <<<<<<<<<<<<<<
|
|
* """Base provider class.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Provider {
|
|
PyObject *(*_provide)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch);
|
|
void (*_copy_overridings)(struct __pyx_obj_19dependency_injector_9providers_Provider *, struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, int __pyx_skip_dispatch);
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *__pyx_vtabptr_19dependency_injector_9providers_Provider;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":235
|
|
*
|
|
*
|
|
* cdef class Object(Provider): # <<<<<<<<<<<<<<
|
|
* """Object provider returns provided instance "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Object {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Object *__pyx_vtabptr_19dependency_injector_9providers_Object;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":294
|
|
*
|
|
*
|
|
* cdef class Delegate(Provider): # <<<<<<<<<<<<<<
|
|
* """Delegate provider returns provider "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate *__pyx_vtabptr_19dependency_injector_9providers_Delegate;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":353
|
|
*
|
|
*
|
|
* cdef class Dependency(Provider): # <<<<<<<<<<<<<<
|
|
* """:py:class:`Dependency` provider describes dependency interface.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency *__pyx_vtabptr_19dependency_injector_9providers_Dependency;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":442
|
|
*
|
|
*
|
|
* cdef class ExternalDependency(Dependency): # <<<<<<<<<<<<<<
|
|
* """:py:class:`ExternalDependency` provider describes dependency interface.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency *__pyx_vtabptr_19dependency_injector_9providers_ExternalDependency;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":469
|
|
*
|
|
*
|
|
* cdef class DependenciesContainer(Object): # <<<<<<<<<<<<<<
|
|
* """:py:class:`DependenciesContainer` provider provides set of dependencies.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Object __pyx_base;
|
|
PyObject *(*_override_providers)(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *, PyObject *, int __pyx_skip_dispatch);
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *__pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":642
|
|
*
|
|
*
|
|
* cdef class Callable(Provider): # <<<<<<<<<<<<<<
|
|
* r"""Callable provider calls wrapped callable on every call.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Callable {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Callable *__pyx_vtabptr_19dependency_injector_9providers_Callable;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":808
|
|
*
|
|
*
|
|
* cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<<
|
|
* """Callable that is injected "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Callable __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable *__pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":817
|
|
*
|
|
*
|
|
* cdef class AbstractCallable(Callable): # <<<<<<<<<<<<<<
|
|
* """Abstract callable provider.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Callable __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable *__pyx_vtabptr_19dependency_injector_9providers_AbstractCallable;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":858
|
|
*
|
|
*
|
|
* cdef class CallableDelegate(Delegate): # <<<<<<<<<<<<<<
|
|
* """Callable delegate injects delegating callable "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate *__pyx_vtabptr_19dependency_injector_9providers_CallableDelegate;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":880
|
|
*
|
|
*
|
|
* cdef class Coroutine(Callable): # <<<<<<<<<<<<<<
|
|
* r"""Coroutine provider creates wrapped coroutine on every call.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Callable __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine *__pyx_vtabptr_19dependency_injector_9providers_Coroutine;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":924
|
|
*
|
|
*
|
|
* cdef class DelegatedCoroutine(Coroutine): # <<<<<<<<<<<<<<
|
|
* """Coroutine provider that is injected "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine *__pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":933
|
|
*
|
|
*
|
|
* cdef class AbstractCoroutine(Coroutine): # <<<<<<<<<<<<<<
|
|
* """Abstract coroutine provider.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine *__pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":974
|
|
*
|
|
*
|
|
* cdef class CoroutineDelegate(Delegate): # <<<<<<<<<<<<<<
|
|
* """Coroutine delegate injects delegating coroutine "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate *__pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":996
|
|
*
|
|
*
|
|
* cdef class Configuration(Object): # <<<<<<<<<<<<<<
|
|
* """Configuration provider.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Object __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *__pyx_vtabptr_19dependency_injector_9providers_Configuration;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1166
|
|
*
|
|
*
|
|
* cdef class Factory(Provider): # <<<<<<<<<<<<<<
|
|
* r"""Factory provider creates new instance on every call.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Factory {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Factory *__pyx_vtabptr_19dependency_injector_9providers_Factory;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1378
|
|
*
|
|
*
|
|
* cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<<
|
|
* """Factory that is injected "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Factory __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory *__pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1399
|
|
*
|
|
*
|
|
* cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<<
|
|
* """Abstract factory provider.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Factory __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory *__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1440
|
|
*
|
|
*
|
|
* cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<<
|
|
* """Factory delegate injects delegating factory "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate *__pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1462
|
|
*
|
|
*
|
|
* cdef class FactoryAggregate(Provider): # <<<<<<<<<<<<<<
|
|
* """Factory providers aggregate.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base;
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory *(*__pyx___get_factory)(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *, PyObject *);
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *__pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1549
|
|
*
|
|
*
|
|
* cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<<
|
|
* """Base class of singleton providers."""
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1702
|
|
*
|
|
*
|
|
* cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<<
|
|
* """Singleton provider returns same instance on every call.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton *__pyx_vtabptr_19dependency_injector_9providers_Singleton;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1757
|
|
*
|
|
*
|
|
* cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<<
|
|
* """Delegated singleton is injected "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1778
|
|
*
|
|
*
|
|
* cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<<
|
|
* """Thread-safe singleton provider."""
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1813
|
|
*
|
|
*
|
|
* cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<<
|
|
* """Delegated thread-safe singleton is injected "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1834
|
|
*
|
|
*
|
|
* cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<<
|
|
* """Thread-local singleton provides single objects in scope of thread.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1881
|
|
*
|
|
*
|
|
* cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<<
|
|
* """Delegated thread-local singleton is injected "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1902
|
|
*
|
|
*
|
|
* cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<<
|
|
* """Abstract singleton provider.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton *__pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1947
|
|
*
|
|
*
|
|
* cdef class SingletonDelegate(Delegate): # <<<<<<<<<<<<<<
|
|
* """Singleton delegate injects delegating singleton "as is".
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate *__pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate;
|
|
|
|
|
|
/* "dependency_injector/providers.pyx":1969
|
|
*
|
|
*
|
|
* cdef class List(Provider): # <<<<<<<<<<<<<<
|
|
* """List provider provides a list of values.
|
|
*
|
|
*/
|
|
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_List {
|
|
struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base;
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_List *__pyx_vtabptr_19dependency_injector_9providers_List;
|
|
|
|
/* --- Runtime support code (head) --- */
|
|
/* Refnanny.proto */
|
|
#ifndef CYTHON_REFNANNY
|
|
#define CYTHON_REFNANNY 0
|
|
#endif
|
|
#if CYTHON_REFNANNY
|
|
typedef struct {
|
|
void (*INCREF)(void*, PyObject*, int);
|
|
void (*DECREF)(void*, PyObject*, int);
|
|
void (*GOTREF)(void*, PyObject*, int);
|
|
void (*GIVEREF)(void*, PyObject*, int);
|
|
void* (*SetupContext)(const char*, int, const char*);
|
|
void (*FinishContext)(void**);
|
|
} __Pyx_RefNannyAPIStruct;
|
|
static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
|
|
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
|
|
#define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
|
|
#ifdef WITH_THREAD
|
|
#define __Pyx_RefNannySetupContext(name, acquire_gil)\
|
|
if (acquire_gil) {\
|
|
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
|
|
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
|
|
PyGILState_Release(__pyx_gilstate_save);\
|
|
} else {\
|
|
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
|
|
}
|
|
#else
|
|
#define __Pyx_RefNannySetupContext(name, acquire_gil)\
|
|
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
|
|
#endif
|
|
#define __Pyx_RefNannyFinishContext()\
|
|
__Pyx_RefNanny->FinishContext(&__pyx_refnanny)
|
|
#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
|
|
#define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
|
|
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
|
|
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
|
|
#else
|
|
#define __Pyx_RefNannyDeclarations
|
|
#define __Pyx_RefNannySetupContext(name, acquire_gil)
|
|
#define __Pyx_RefNannyFinishContext()
|
|
#define __Pyx_INCREF(r) Py_INCREF(r)
|
|
#define __Pyx_DECREF(r) Py_DECREF(r)
|
|
#define __Pyx_GOTREF(r)
|
|
#define __Pyx_GIVEREF(r)
|
|
#define __Pyx_XINCREF(r) Py_XINCREF(r)
|
|
#define __Pyx_XDECREF(r) Py_XDECREF(r)
|
|
#define __Pyx_XGOTREF(r)
|
|
#define __Pyx_XGIVEREF(r)
|
|
#endif
|
|
#define __Pyx_XDECREF_SET(r, v) do {\
|
|
PyObject *tmp = (PyObject *) r;\
|
|
r = v; __Pyx_XDECREF(tmp);\
|
|
} while (0)
|
|
#define __Pyx_DECREF_SET(r, v) do {\
|
|
PyObject *tmp = (PyObject *) r;\
|
|
r = v; __Pyx_DECREF(tmp);\
|
|
} while (0)
|
|
#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
|
|
#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
|
|
|
|
/* PyObjectGetAttrStr.proto */
|
|
#if CYTHON_USE_TYPE_SLOTS
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
|
|
#else
|
|
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
|
|
#endif
|
|
|
|
/* GetBuiltinName.proto */
|
|
static PyObject *__Pyx_GetBuiltinName(PyObject *name);
|
|
|
|
/* RaiseArgTupleInvalid.proto */
|
|
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
|
|
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
|
|
|
|
/* RaiseDoubleKeywords.proto */
|
|
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
|
|
|
|
/* ParseKeywords.proto */
|
|
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
|
|
PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
|
|
const char* function_name);
|
|
|
|
/* PyDictVersioning.proto */
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
|
|
#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
|
|
#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
|
|
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
|
|
(version_var) = __PYX_GET_DICT_VERSION(dict);\
|
|
(cache_var) = (value);
|
|
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
|
|
static PY_UINT64_T __pyx_dict_version = 0;\
|
|
static PyObject *__pyx_dict_cached_value = NULL;\
|
|
if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
|
|
(VAR) = __pyx_dict_cached_value;\
|
|
} else {\
|
|
(VAR) = __pyx_dict_cached_value = (LOOKUP);\
|
|
__pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
|
|
}\
|
|
}
|
|
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
|
|
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
|
|
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
|
|
#else
|
|
#define __PYX_GET_DICT_VERSION(dict) (0)
|
|
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
|
|
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
|
|
#endif
|
|
|
|
/* GetModuleGlobalName.proto */
|
|
#if CYTHON_USE_DICT_VERSIONS
|
|
#define __Pyx_GetModuleGlobalName(var, name) {\
|
|
static PY_UINT64_T __pyx_dict_version = 0;\
|
|
static PyObject *__pyx_dict_cached_value = NULL;\
|
|
(var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
|
|
(likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
|
|
__Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
|
|
}
|
|
#define __Pyx_GetModuleGlobalNameUncached(var, name) {\
|
|
PY_UINT64_T __pyx_dict_version;\
|
|
PyObject *__pyx_dict_cached_value;\
|
|
(var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
|
|
}
|
|
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
|
|
#else
|
|
#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
|
|
#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
|
|
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
|
|
#endif
|
|
|
|
/* PyFunctionFastCall.proto */
|
|
#if CYTHON_FAST_PYCALL
|
|
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
|
|
__Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
|
|
#if 1 || PY_VERSION_HEX < 0x030600B1
|
|
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
|
|
#else
|
|
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
|
|
#endif
|
|
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
|
|
(sizeof(char [1 - 2*!(cond)]) - 1)
|
|
#ifndef Py_MEMBER_SIZE
|
|
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
|
|
#endif
|
|
static size_t __pyx_pyframe_localsplus_offset = 0;
|
|
#include "frameobject.h"
|
|
#define __Pxy_PyFrame_Initialize_Offsets()\
|
|
((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
|
|
(void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
|
|
#define __Pyx_PyFrame_GetLocalsplus(frame)\
|
|
(assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
|
|
#endif
|
|
|
|
/* PyCFunctionFastCall.proto */
|
|
#if CYTHON_FAST_PYCCALL
|
|
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
|
|
#else
|
|
#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
|
|
#endif
|
|
|
|
/* PyObjectCall.proto */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
|
|
#else
|
|
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
|
|
#endif
|
|
|
|
/* KeywordStringCheck.proto */
|
|
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
|
|
|
|
/* PyObjectCallMethO.proto */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
|
|
#endif
|
|
|
|
/* PyObjectCallNoArg.proto */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
|
|
#else
|
|
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
|
|
#endif
|
|
|
|
/* PyObjectCallOneArg.proto */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
|
|
|
|
/* PyObjectCall2Args.proto */
|
|
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
|
|
|
|
/* ExtTypeTest.proto */
|
|
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
|
|
|
|
/* PyObjectLookupSpecial.proto */
|
|
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
|
|
PyObject *res;
|
|
PyTypeObject *tp = Py_TYPE(obj);
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (unlikely(PyInstance_Check(obj)))
|
|
return __Pyx_PyObject_GetAttrStr(obj, attr_name);
|
|
#endif
|
|
res = _PyType_Lookup(tp, attr_name);
|
|
if (likely(res)) {
|
|
descrgetfunc f = Py_TYPE(res)->tp_descr_get;
|
|
if (!f) {
|
|
Py_INCREF(res);
|
|
} else {
|
|
res = f(res, obj, (PyObject *)tp);
|
|
}
|
|
} else {
|
|
PyErr_SetObject(PyExc_AttributeError, attr_name);
|
|
}
|
|
return res;
|
|
}
|
|
#else
|
|
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
|
|
#endif
|
|
|
|
/* PyThreadStateGet.proto */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
|
|
#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
|
|
#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
|
|
#else
|
|
#define __Pyx_PyThreadState_declare
|
|
#define __Pyx_PyThreadState_assign
|
|
#define __Pyx_PyErr_Occurred() PyErr_Occurred()
|
|
#endif
|
|
|
|
/* PyErrFetchRestore.proto */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
|
|
#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
|
|
#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
|
|
#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
|
|
#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
|
|
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
|
|
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
|
|
#else
|
|
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
|
|
#endif
|
|
#else
|
|
#define __Pyx_PyErr_Clear() PyErr_Clear()
|
|
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
|
|
#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
|
|
#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
|
|
#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
|
|
#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
|
|
#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
|
|
#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
|
|
#endif
|
|
|
|
/* RaiseException.proto */
|
|
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
|
|
|
|
/* GetTopmostException.proto */
|
|
#if CYTHON_USE_EXC_INFO_STACK
|
|
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
|
|
#endif
|
|
|
|
/* SaveResetException.proto */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
|
|
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
|
|
#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
|
|
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
|
|
#else
|
|
#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
|
|
#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
|
|
#endif
|
|
|
|
/* GetException.proto */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
|
|
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
|
|
#else
|
|
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
|
|
#endif
|
|
|
|
/* SliceTupleAndList.proto */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
|
|
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
|
|
#else
|
|
#define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop)
|
|
#define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop)
|
|
#endif
|
|
|
|
/* GetItemInt.proto */
|
|
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
|
|
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
|
|
__Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
|
|
(is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
|
|
__Pyx_GetItemInt_Generic(o, to_py_func(i))))
|
|
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
|
|
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
|
|
__Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
|
|
(PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
|
|
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
|
|
int wraparound, int boundscheck);
|
|
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
|
|
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
|
|
__Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
|
|
(PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
|
|
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
|
|
int wraparound, int boundscheck);
|
|
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
|
|
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
|
|
int is_list, int wraparound, int boundscheck);
|
|
|
|
/* PyErrExceptionMatches.proto */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
|
|
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
|
|
#else
|
|
#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
|
|
#endif
|
|
|
|
/* ArgTypeTest.proto */
|
|
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
|
|
((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
|
|
__Pyx__ArgTypeTest(obj, type, name, exact))
|
|
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
|
|
|
|
/* WriteUnraisableException.proto */
|
|
static void __Pyx_WriteUnraisable(const char *name, int clineno,
|
|
int lineno, const char *filename,
|
|
int full_traceback, int nogil);
|
|
|
|
/* GetAttr.proto */
|
|
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
|
|
|
|
/* GetAttr3.proto */
|
|
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
|
|
|
|
/* dict_getitem_default.proto */
|
|
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);
|
|
|
|
/* UnpackUnboundCMethod.proto */
|
|
typedef struct {
|
|
PyObject *type;
|
|
PyObject **method_name;
|
|
PyCFunction func;
|
|
PyObject *method;
|
|
int flag;
|
|
} __Pyx_CachedCFunction;
|
|
|
|
/* CallUnboundCMethod1.proto */
|
|
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
|
|
#else
|
|
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg)
|
|
#endif
|
|
|
|
/* CallUnboundCMethod2.proto */
|
|
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
|
|
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
|
|
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
|
|
#else
|
|
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
|
|
#endif
|
|
|
|
/* py_dict_values.proto */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
|
|
|
|
/* CallUnboundCMethod0.proto */
|
|
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
#define __Pyx_CallUnboundCMethod0(cfunc, self)\
|
|
(likely((cfunc)->func) ?\
|
|
(likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\
|
|
(PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
|
|
(PY_VERSION_HEX >= 0x030700A0 ?\
|
|
(*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
|
|
(*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
|
|
(PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
|
|
(*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
|
|
(likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
|
|
((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\
|
|
__Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
|
|
__Pyx__CallUnboundCMethod0(cfunc, self))
|
|
#else
|
|
#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
|
|
#endif
|
|
|
|
/* FastTypeChecks.proto */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
|
|
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
|
|
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
|
|
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
|
|
#else
|
|
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
|
|
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
|
|
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
|
|
#endif
|
|
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
|
|
|
|
/* RaiseTooManyValuesToUnpack.proto */
|
|
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
|
|
|
|
/* RaiseNeedMoreValuesToUnpack.proto */
|
|
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
|
|
|
|
/* IterFinish.proto */
|
|
static CYTHON_INLINE int __Pyx_IterFinish(void);
|
|
|
|
/* UnpackItemEndCheck.proto */
|
|
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
|
|
|
|
/* CallableCheck.proto */
|
|
#if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3
|
|
#define __Pyx_PyCallable_Check(obj) ((obj)->ob_type->tp_call != NULL)
|
|
#else
|
|
#define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj)
|
|
#endif
|
|
|
|
/* StringJoin.proto */
|
|
#if PY_MAJOR_VERSION < 3
|
|
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
|
|
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
|
|
#else
|
|
#define __Pyx_PyString_Join PyUnicode_Join
|
|
#define __Pyx_PyBaseString_Join PyUnicode_Join
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
#if PY_MAJOR_VERSION < 3
|
|
#define __Pyx_PyBytes_Join _PyString_Join
|
|
#else
|
|
#define __Pyx_PyBytes_Join _PyBytes_Join
|
|
#endif
|
|
#else
|
|
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
|
|
#endif
|
|
|
|
/* ListAppend.proto */
|
|
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
|
|
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
|
|
PyListObject* L = (PyListObject*) list;
|
|
Py_ssize_t len = Py_SIZE(list);
|
|
if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
|
|
Py_INCREF(x);
|
|
PyList_SET_ITEM(list, len, x);
|
|
Py_SIZE(list) = len+1;
|
|
return 0;
|
|
}
|
|
return PyList_Append(list, x);
|
|
}
|
|
#else
|
|
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
|
|
#endif
|
|
|
|
/* bytes_tailmatch.proto */
|
|
static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg,
|
|
Py_ssize_t start, Py_ssize_t end, int direction);
|
|
static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr,
|
|
Py_ssize_t start, Py_ssize_t end, int direction);
|
|
|
|
/* unicode_tailmatch.proto */
|
|
static int __Pyx_PyUnicode_Tailmatch(
|
|
PyObject* s, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction);
|
|
|
|
/* str_tailmatch.proto */
|
|
static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start,
|
|
Py_ssize_t end, int direction);
|
|
|
|
/* PyDictContains.proto */
|
|
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
|
|
int result = PyDict_Contains(dict, item);
|
|
return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
|
|
}
|
|
|
|
/* DictGetItem.proto */
|
|
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
|
|
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
|
|
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
|
|
(likely(PyDict_CheckExact(obj)) ?\
|
|
__Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
|
|
#else
|
|
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
|
|
#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
|
|
#endif
|
|
|
|
/* PyObjectSetAttrStr.proto */
|
|
#if CYTHON_USE_TYPE_SLOTS
|
|
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
|
|
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
|
|
#else
|
|
#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
|
|
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
|
|
#endif
|
|
|
|
/* SwapException.proto */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
|
|
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
|
|
#else
|
|
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
|
|
#endif
|
|
|
|
/* None.proto */
|
|
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
|
|
|
|
/* py_dict_items.proto */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
|
|
|
|
/* Import.proto */
|
|
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
|
|
|
|
/* ImportFrom.proto */
|
|
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
|
|
|
|
/* HasAttr.proto */
|
|
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
|
|
|
|
/* ListExtend.proto */
|
|
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
PyObject* none = _PyList_Extend((PyListObject*)L, v);
|
|
if (unlikely(!none))
|
|
return -1;
|
|
Py_DECREF(none);
|
|
return 0;
|
|
#else
|
|
return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
|
|
#endif
|
|
}
|
|
|
|
/* PyObject_GenericGetAttrNoDict.proto */
|
|
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
|
|
#else
|
|
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
|
|
#endif
|
|
|
|
/* PyObject_GenericGetAttr.proto */
|
|
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
|
|
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
|
|
#else
|
|
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
|
|
#endif
|
|
|
|
/* SetVTable.proto */
|
|
static int __Pyx_SetVtable(PyObject *dict, void *vtable);
|
|
|
|
/* SetupReduce.proto */
|
|
static int __Pyx_setup_reduce(PyObject* type_obj);
|
|
|
|
/* PatchModuleWithCoroutine.proto */
|
|
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
|
|
|
|
/* PatchInspect.proto */
|
|
static PyObject* __Pyx_patch_inspect(PyObject* module);
|
|
|
|
/* PatchAsyncIO.proto */
|
|
static PyObject* __Pyx_patch_asyncio(PyObject* module);
|
|
|
|
/* PyIntCompare.proto */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
|
|
|
|
/* FetchCommonType.proto */
|
|
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
|
|
|
|
/* CythonFunction.proto */
|
|
#define __Pyx_CyFunction_USED 1
|
|
#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
|
|
#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
|
|
#define __Pyx_CYFUNCTION_CCLASS 0x04
|
|
#define __Pyx_CyFunction_GetClosure(f)\
|
|
(((__pyx_CyFunctionObject *) (f))->func_closure)
|
|
#define __Pyx_CyFunction_GetClassObj(f)\
|
|
(((__pyx_CyFunctionObject *) (f))->func_classobj)
|
|
#define __Pyx_CyFunction_Defaults(type, f)\
|
|
((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
|
|
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
|
|
((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
|
|
typedef struct {
|
|
PyCFunctionObject func;
|
|
#if PY_VERSION_HEX < 0x030500A0
|
|
PyObject *func_weakreflist;
|
|
#endif
|
|
PyObject *func_dict;
|
|
PyObject *func_name;
|
|
PyObject *func_qualname;
|
|
PyObject *func_doc;
|
|
PyObject *func_globals;
|
|
PyObject *func_code;
|
|
PyObject *func_closure;
|
|
PyObject *func_classobj;
|
|
void *defaults;
|
|
int defaults_pyobjects;
|
|
int flags;
|
|
PyObject *defaults_tuple;
|
|
PyObject *defaults_kwdict;
|
|
PyObject *(*defaults_getter)(PyObject *);
|
|
PyObject *func_annotations;
|
|
} __pyx_CyFunctionObject;
|
|
static PyTypeObject *__pyx_CyFunctionType = 0;
|
|
#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
|
|
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
|
|
__Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
|
|
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
|
|
int flags, PyObject* qualname,
|
|
PyObject *self,
|
|
PyObject *module, PyObject *globals,
|
|
PyObject* code);
|
|
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
|
|
size_t size,
|
|
int pyobjects);
|
|
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
|
|
PyObject *tuple);
|
|
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
|
|
PyObject *dict);
|
|
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
|
|
PyObject *dict);
|
|
static int __pyx_CyFunction_init(void);
|
|
|
|
/* CLineInTraceback.proto */
|
|
#ifdef CYTHON_CLINE_IN_TRACEBACK
|
|
#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
|
|
#else
|
|
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
|
|
#endif
|
|
|
|
/* CodeObjectCache.proto */
|
|
typedef struct {
|
|
PyCodeObject* code_object;
|
|
int code_line;
|
|
} __Pyx_CodeObjectCacheEntry;
|
|
struct __Pyx_CodeObjectCache {
|
|
int count;
|
|
int max_count;
|
|
__Pyx_CodeObjectCacheEntry* entries;
|
|
};
|
|
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
|
|
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
|
|
static PyCodeObject *__pyx_find_code_object(int code_line);
|
|
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
|
|
|
|
/* AddTraceback.proto */
|
|
static void __Pyx_AddTraceback(const char *funcname, int c_line,
|
|
int py_line, const char *filename);
|
|
|
|
/* CIntToPy.proto */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
|
|
|
|
/* CIntToPy.proto */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
|
|
|
|
/* CIntFromPy.proto */
|
|
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
|
|
|
|
/* CIntFromPy.proto */
|
|
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
|
|
|
|
/* CheckBinaryVersion.proto */
|
|
static int __Pyx_check_binary_version(void);
|
|
|
|
/* VoidPtrExport.proto */
|
|
static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig);
|
|
|
|
/* FunctionExport.proto */
|
|
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);
|
|
|
|
/* InitStrings.proto */
|
|
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_8Provider__provide(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static void __pyx_f_19dependency_injector_9providers_8Provider__copy_overridings(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_copied, PyObject *__pyx_v_memo, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_8Delegate__provide(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContainer__override_providers(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_container, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_8Callable__provide(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_16AbstractCallable__provide(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_17AbstractCoroutine__provide(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__provide(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19dependency_injector_9providers_16FactoryAggregate___get_factory(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factory_name); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_4List__provide(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
|
|
|
|
/* Module declarations from 'cython' */
|
|
|
|
/* Module declarations from 'dependency_injector.providers' */
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Provider = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Object = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Delegate = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Dependency = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_ExternalDependency = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DependenciesContainer = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_OverridingContext = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Callable = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedCallable = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_AbstractCallable = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_CallableDelegate = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Coroutine = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Configuration = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Factory = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedFactory = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_AbstractFactory = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_FactoryDelegate = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_FactoryAggregate = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_BaseSingleton = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Singleton = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_AbstractSingleton = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_SingletonDelegate = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_List = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Injection = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_PositionalInjection = 0;
|
|
static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_NamedInjection = 0;
|
|
static PyObject *__pyx_v_19dependency_injector_9providers_CLASS_TYPES = 0;
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injections(PyObject *, int __pyx_skip_dispatch); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections(PyObject *, int __pyx_skip_dispatch); /*proto*/
|
|
static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *, int __pyx_skip_dispatch); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyObject *, int __pyx_skip_dispatch); /*proto*/
|
|
static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *, int __pyx_skip_dispatch); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_19dependency_injector_9providers_deepcopy *__pyx_optional_args); /*proto*/
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_name(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *); /*proto*/
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_value(struct __pyx_obj_19dependency_injector_9providers_Injection *); /*proto*/
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provide_positional_args(PyObject *, PyObject *, int); /*proto*/
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provide_keyword_args(PyObject *, PyObject *, int); /*proto*/
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___inject_attributes(PyObject *, PyObject *, int); /*proto*/
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callable_call(struct __pyx_obj_19dependency_injector_9providers_Callable *, PyObject *, PyObject *); /*proto*/
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factory_call(struct __pyx_obj_19dependency_injector_9providers_Factory *, PyObject *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Provider__set_state(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Object__set_state(struct __pyx_obj_19dependency_injector_9providers_Object *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegate__set_state(struct __pyx_obj_19dependency_injector_9providers_Delegate *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Dependency__set_state(struct __pyx_obj_19dependency_injector_9providers_Dependency *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ExternalDependency__set_state(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DependenciesContainer__set_state(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_OverridingContext__set_state(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Callable__set_state(struct __pyx_obj_19dependency_injector_9providers_Callable *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedCallable__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractCallable__set_state(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_CallableDelegate__set_state(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Coroutine__set_state(struct __pyx_obj_19dependency_injector_9providers_Coroutine *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedCoroutine__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractCoroutine__set_state(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_CoroutineDelegate__set_state(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Configuration__set_state(struct __pyx_obj_19dependency_injector_9providers_Configuration *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Factory__set_state(struct __pyx_obj_19dependency_injector_9providers_Factory *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedFactory__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractFactory__set_state(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_FactoryDelegate__set_state(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_FactoryAggregate__set_state(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_BaseSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Singleton__set_state(struct __pyx_obj_19dependency_injector_9providers_Singleton *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ThreadSafeSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedThreadSafeSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ThreadLocalSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedThreadLocalSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_SingletonDelegate__set_state(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_List__set_state(struct __pyx_obj_19dependency_injector_9providers_List *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Injection__set_state(struct __pyx_obj_19dependency_injector_9providers_Injection *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_PositionalInjection__set_state(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *, PyObject *); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_NamedInjection__set_state(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *, PyObject *); /*proto*/
|
|
#define __Pyx_MODULE_NAME "dependency_injector.providers"
|
|
extern int __pyx_module_is_main_dependency_injector__providers;
|
|
int __pyx_module_is_main_dependency_injector__providers = 0;
|
|
|
|
/* Implementation of 'dependency_injector.providers' */
|
|
static PyObject *__pyx_builtin_range;
|
|
static PyObject *__pyx_builtin_ImportError;
|
|
static PyObject *__pyx_builtin_object;
|
|
static PyObject *__pyx_builtin_super;
|
|
static PyObject *__pyx_builtin_id;
|
|
static PyObject *__pyx_builtin_IndexError;
|
|
static PyObject *__pyx_builtin_NotImplementedError;
|
|
static PyObject *__pyx_builtin_AttributeError;
|
|
static PyObject *__pyx_builtin_hex;
|
|
static const char __pyx_k__3[] = "__";
|
|
static const char __pyx_k__4[] = ".";
|
|
static const char __pyx_k__6[] = "";
|
|
static const char __pyx_k_id[] = "id";
|
|
static const char __pyx_k_cls[] = "cls";
|
|
static const char __pyx_k_get[] = "get";
|
|
static const char __pyx_k_hex[] = "hex";
|
|
static const char __pyx_k_new[] = "__new__";
|
|
static const char __pyx_k_obj[] = "obj";
|
|
static const char __pyx_k_str[] = "__str__";
|
|
static const char __pyx_k_sys[] = "sys";
|
|
static const char __pyx_k_List[] = "List";
|
|
static const char __pyx_k_args[] = "args";
|
|
static const char __pyx_k_call[] = "__call__";
|
|
static const char __pyx_k_copy[] = "copy";
|
|
static const char __pyx_k_dict[] = "__dict__";
|
|
static const char __pyx_k_exit[] = "__exit__";
|
|
static const char __pyx_k_init[] = "__init__";
|
|
static const char __pyx_k_join[] = "join";
|
|
static const char __pyx_k_main[] = "__main__";
|
|
static const char __pyx_k_memo[] = "memo";
|
|
static const char __pyx_k_name[] = "__name__";
|
|
static const char __pyx_k_test[] = "__test__";
|
|
static const char __pyx_k_Error[] = "Error";
|
|
static const char __pyx_k_RLock[] = "RLock";
|
|
static const char __pyx_k_class[] = "__class__";
|
|
static const char __pyx_k_enter[] = "__enter__";
|
|
static const char __pyx_k_items[] = "items";
|
|
static const char __pyx_k_local[] = "local";
|
|
static const char __pyx_k_range[] = "range";
|
|
static const char __pyx_k_reset[] = "reset";
|
|
static const char __pyx_k_stdin[] = "stdin";
|
|
static const char __pyx_k_super[] = "super";
|
|
static const char __pyx_k_types[] = "types";
|
|
static const char __pyx_k_value[] = "value";
|
|
static const char __pyx_k_Object[] = "Object";
|
|
static const char __pyx_k_copied[] = "copied";
|
|
static const char __pyx_k_errors[] = "errors";
|
|
static const char __pyx_k_format[] = "format";
|
|
static const char __pyx_k_import[] = "__import__";
|
|
static const char __pyx_k_kwargs[] = "kwargs";
|
|
static const char __pyx_k_lambda[] = "<lambda>";
|
|
static const char __pyx_k_module[] = "__module__";
|
|
static const char __pyx_k_name_2[] = "name";
|
|
static const char __pyx_k_object[] = "object";
|
|
static const char __pyx_k_pickle[] = "pickle";
|
|
static const char __pyx_k_reduce[] = "__reduce__";
|
|
static const char __pyx_k_stderr[] = "stderr";
|
|
static const char __pyx_k_stdout[] = "stdout";
|
|
static const char __pyx_k_update[] = "update";
|
|
static const char __pyx_k_values[] = "values";
|
|
static const char __pyx_k_Factory[] = "Factory";
|
|
static const char __pyx_k_address[] = "address";
|
|
static const char __pyx_k_asyncio[] = "asyncio";
|
|
static const char __pyx_k_default[] = "default";
|
|
static const char __pyx_k_factory[] = "factory";
|
|
static const char __pyx_k_im_func[] = "im_func";
|
|
static const char __pyx_k_im_self[] = "im_self";
|
|
static const char __pyx_k_inspect[] = "inspect";
|
|
static const char __pyx_k_provide[] = "_provide";
|
|
static const char __pyx_k_Callable[] = "Callable";
|
|
static const char __pyx_k_Delegate[] = "Delegate";
|
|
static const char __pyx_k_Provider[] = "Provider";
|
|
static const char __pyx_k_add_args[] = "add_args";
|
|
static const char __pyx_k_callable[] = "callable";
|
|
static const char __pyx_k_deepcopy[] = "deepcopy";
|
|
static const char __pyx_k_delegate[] = "delegate";
|
|
static const char __pyx_k_endswith[] = "endswith";
|
|
static const char __pyx_k_getstate[] = "__getstate__";
|
|
static const char __pyx_k_im_class[] = "im_class";
|
|
static const char __pyx_k_instance[] = "instance";
|
|
static const char __pyx_k_override[] = "override";
|
|
static const char __pyx_k_provider[] = "provider";
|
|
static const char __pyx_k_provides[] = "provides";
|
|
static const char __pyx_k_pyx_capi[] = "__pyx_capi__";
|
|
static const char __pyx_k_pyx_type[] = "__pyx_type";
|
|
static const char __pyx_k_set_args[] = "set_args";
|
|
static const char __pyx_k_setstate[] = "__setstate__";
|
|
static const char __pyx_k_ClassType[] = "ClassType";
|
|
static const char __pyx_k_Coroutine[] = "Coroutine";
|
|
static const char __pyx_k_Injection[] = "Injection";
|
|
static const char __pyx_k_Singleton[] = "Singleton";
|
|
static const char __pyx_k_coroutine[] = "coroutine";
|
|
static const char __pyx_k_factories[] = "factories";
|
|
static const char __pyx_k_providers[] = "providers";
|
|
static const char __pyx_k_pyx_state[] = "__pyx_state";
|
|
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
|
|
static const char __pyx_k_singleton[] = "singleton";
|
|
static const char __pyx_k_threading[] = "threading";
|
|
static const char __pyx_k_Dependency[] = "Dependency";
|
|
static const char __pyx_k_IndexError[] = "IndexError";
|
|
static const char __pyx_k_MethodType[] = "MethodType";
|
|
static const char __pyx_k_add_kwargs[] = "add_kwargs";
|
|
static const char __pyx_k_attributes[] = "attributes";
|
|
static const char __pyx_k_clear_args[] = "clear_args";
|
|
static const char __pyx_k_coroutines[] = "coroutines";
|
|
static const char __pyx_k_overridden[] = "overridden";
|
|
static const char __pyx_k_overriding[] = "overriding";
|
|
static const char __pyx_k_pyx_result[] = "__pyx_result";
|
|
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
|
|
static const char __pyx_k_set_kwargs[] = "set_kwargs";
|
|
static const char __pyx_k_startswith[] = "startswith";
|
|
static const char __pyx_k_0_is_not_an[] = "{0} is not an ";
|
|
static const char __pyx_k_CLASS_TYPES[] = "CLASS_TYPES";
|
|
static const char __pyx_k_IS_PROVIDER[] = "__IS_PROVIDER__";
|
|
static const char __pyx_k_ImportError[] = "ImportError";
|
|
static const char __pyx_k_PickleError[] = "PickleError";
|
|
static const char __pyx_k_instance_of[] = "instance_of";
|
|
static const char __pyx_k_IS_DELEGATED[] = "__IS_DELEGATED__";
|
|
static const char __pyx_k_clear_kwargs[] = "clear_kwargs";
|
|
static const char __pyx_k_factory_name[] = "factory_name";
|
|
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
|
|
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
|
|
static const char __pyx_k_storage_lock[] = "storage_lock";
|
|
static const char __pyx_k_stringsource[] = "stringsource";
|
|
static const char __pyx_k_version_info[] = "version_info";
|
|
static const char __pyx_k_BaseSingleton[] = "BaseSingleton";
|
|
static const char __pyx_k_Configuration[] = "Configuration";
|
|
static const char __pyx_k_asyncio_tasks[] = "asyncio.tasks";
|
|
static const char __pyx_k_instance_of_0[] = "instance of {0}";
|
|
static const char __pyx_k_provided_type[] = "provided_type";
|
|
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
|
|
static const char __pyx_k_AttributeError[] = "AttributeError";
|
|
static const char __pyx_k_NamedInjection[] = "NamedInjection";
|
|
static const char __pyx_k_add_attributes[] = "add_attributes";
|
|
static const char __pyx_k_attribute_name[] = "attribute_name";
|
|
static const char __pyx_k_reset_override[] = "reset_override";
|
|
static const char __pyx_k_set_attributes[] = "set_attributes";
|
|
static const char __pyx_k_AbstractFactory[] = "AbstractFactory";
|
|
static const char __pyx_k_FactoryDelegate[] = "FactoryDelegate";
|
|
static const char __pyx_k_add_sys_streams[] = "__add_sys_streams";
|
|
static const char __pyx_k_create_children[] = "_create_children";
|
|
static const char __pyx_k_last_overriding[] = "last_overriding";
|
|
static const char __pyx_k_overriding_lock[] = "overriding_lock";
|
|
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
|
|
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
|
|
static const char __pyx_k_AbstractCallable[] = "AbstractCallable";
|
|
static const char __pyx_k_CallableDelegate[] = "CallableDelegate";
|
|
static const char __pyx_k_DelegatedFactory[] = "DelegatedFactory";
|
|
static const char __pyx_k_FactoryAggregate[] = "FactoryAggregate";
|
|
static const char __pyx_k_clear_attributes[] = "clear_attributes";
|
|
static const char __pyx_k_copy_overridings[] = "_copy_overridings";
|
|
static const char __pyx_k_AbstractCoroutine[] = "AbstractCoroutine";
|
|
static const char __pyx_k_AbstractSingleton[] = "AbstractSingleton";
|
|
static const char __pyx_k_CoroutineDelegate[] = "CoroutineDelegate";
|
|
static const char __pyx_k_DelegatedCallable[] = "DelegatedCallable";
|
|
static const char __pyx_k_OverridingContext[] = "OverridingContext";
|
|
static const char __pyx_k_SingletonDelegate[] = "SingletonDelegate";
|
|
static const char __pyx_k_deepcopy_dispatch[] = "_deepcopy_dispatch";
|
|
static const char __pyx_k_pyx_unpickle_List[] = "__pyx_unpickle_List";
|
|
static const char __pyx_k_DelegatedCoroutine[] = "DelegatedCoroutine";
|
|
static const char __pyx_k_DelegatedSingleton[] = "DelegatedSingleton";
|
|
static const char __pyx_k_ExternalDependency[] = "ExternalDependency";
|
|
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
|
|
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
|
|
static const char __pyx_k_override_providers[] = "_override_providers";
|
|
static const char __pyx_k_NoSuchProviderError[] = "NoSuchProviderError";
|
|
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
|
|
static const char __pyx_k_PositionalInjection[] = "PositionalInjection";
|
|
static const char __pyx_k_ThreadSafeSingleton[] = "ThreadSafeSingleton";
|
|
static const char __pyx_k_get_child_full_name[] = "_get_child_full_name";
|
|
static const char __pyx_k_is_coroutine_marker[] = "_is_coroutine_marker";
|
|
static const char __pyx_k_iscoroutinefunction[] = "iscoroutinefunction";
|
|
static const char __pyx_k_pyx_unpickle_Object[] = "__pyx_unpickle_Object";
|
|
static const char __pyx_k_ThreadLocalSingleton[] = "ThreadLocalSingleton";
|
|
static const char __pyx_k_pyx_unpickle_Factory[] = "__pyx_unpickle_Factory";
|
|
static const char __pyx_k_DependenciesContainer[] = "DependenciesContainer";
|
|
static const char __pyx_k_pyx_unpickle_Callable[] = "__pyx_unpickle_Callable";
|
|
static const char __pyx_k_pyx_unpickle_Delegate[] = "__pyx_unpickle_Delegate";
|
|
static const char __pyx_k_pyx_unpickle_Provider[] = "__pyx_unpickle_Provider";
|
|
static const char __pyx_k_reset_last_overriding[] = "reset_last_overriding";
|
|
static const char __pyx_k_pyx_unpickle_Coroutine[] = "__pyx_unpickle_Coroutine";
|
|
static const char __pyx_k_pyx_unpickle_Injection[] = "__pyx_unpickle_Injection";
|
|
static const char __pyx_k_pyx_unpickle_Singleton[] = "__pyx_unpickle_Singleton";
|
|
static const char __pyx_k_pyx_unpickle_Dependency[] = "__pyx_unpickle_Dependency";
|
|
static const char __pyx_k_Dependency_is_not_defined[] = "Dependency is not defined";
|
|
static const char __pyx_k_pyx_unpickle_BaseSingleton[] = "__pyx_unpickle_BaseSingleton";
|
|
static const char __pyx_k_pyx_unpickle_Configuration[] = "__pyx_unpickle_Configuration";
|
|
static const char __pyx_k_0_can_wrap_only_1_providers[] = "{0} can wrap only {1} providers";
|
|
static const char __pyx_k_pyx_unpickle_NamedInjection[] = "__pyx_unpickle_NamedInjection";
|
|
static const char __pyx_k_DelegatedThreadSafeSingleton[] = "DelegatedThreadSafeSingleton";
|
|
static const char __pyx_k_Provider_0_is_not_overridden[] = "Provider {0} is not overridden";
|
|
static const char __pyx_k_provider_provides_at_address[] = "<{provider}({provides}) at {address}>";
|
|
static const char __pyx_k_pyx_unpickle_AbstractFactory[] = "__pyx_unpickle_AbstractFactory";
|
|
static const char __pyx_k_pyx_unpickle_FactoryDelegate[] = "__pyx_unpickle_FactoryDelegate";
|
|
static const char __pyx_k_DelegatedThreadLocalSingleton[] = "DelegatedThreadLocalSingleton";
|
|
static const char __pyx_k_dependency_injector_providers[] = "dependency_injector.providers";
|
|
static const char __pyx_k_pyx_unpickle_AbstractCallable[] = "__pyx_unpickle_AbstractCallable";
|
|
static const char __pyx_k_pyx_unpickle_CallableDelegate[] = "__pyx_unpickle_CallableDelegate";
|
|
static const char __pyx_k_pyx_unpickle_DelegatedFactory[] = "__pyx_unpickle_DelegatedFactory";
|
|
static const char __pyx_k_pyx_unpickle_FactoryAggregate[] = "__pyx_unpickle_FactoryAggregate";
|
|
static const char __pyx_k_0_can_aggregate_only_instances[] = "{0} can aggregate only instances of {1}, given - {2}";
|
|
static const char __pyx_k_0_can_provide_only_1_instances[] = "{0} can provide only {1} instances";
|
|
static const char __pyx_k_0_must_be_overridden_only_by_1[] = "{0} must be overridden only by {1} providers";
|
|
static const char __pyx_k_pyx_unpickle_AbstractCoroutine[] = "__pyx_unpickle_AbstractCoroutine";
|
|
static const char __pyx_k_pyx_unpickle_AbstractSingleton[] = "__pyx_unpickle_AbstractSingleton";
|
|
static const char __pyx_k_pyx_unpickle_CoroutineDelegate[] = "__pyx_unpickle_CoroutineDelegate";
|
|
static const char __pyx_k_pyx_unpickle_DelegatedCallable[] = "__pyx_unpickle_DelegatedCallable";
|
|
static const char __pyx_k_pyx_unpickle_DelegatedCoroutin[] = "__pyx_unpickle_DelegatedCoroutine";
|
|
static const char __pyx_k_pyx_unpickle_DelegatedSingleto[] = "__pyx_unpickle_DelegatedSingleton";
|
|
static const char __pyx_k_pyx_unpickle_DelegatedThreadLo[] = "__pyx_unpickle_DelegatedThreadLocalSingleton";
|
|
static const char __pyx_k_pyx_unpickle_DelegatedThreadSa[] = "__pyx_unpickle_DelegatedThreadSafeSingleton";
|
|
static const char __pyx_k_pyx_unpickle_DependenciesConta[] = "__pyx_unpickle_DependenciesContainer";
|
|
static const char __pyx_k_pyx_unpickle_ExternalDependenc[] = "__pyx_unpickle_ExternalDependency";
|
|
static const char __pyx_k_pyx_unpickle_OverridingContext[] = "__pyx_unpickle_OverridingContext";
|
|
static const char __pyx_k_pyx_unpickle_PositionalInjecti[] = "__pyx_unpickle_PositionalInjection";
|
|
static const char __pyx_k_pyx_unpickle_SingletonDelegate[] = "__pyx_unpickle_SingletonDelegate";
|
|
static const char __pyx_k_pyx_unpickle_ThreadLocalSingle[] = "__pyx_unpickle_ThreadLocalSingleton";
|
|
static const char __pyx_k_pyx_unpickle_ThreadSafeSinglet[] = "__pyx_unpickle_ThreadSafeSingleton";
|
|
static const char __pyx_k_0_does_not_contain_factory_with[] = "{0} does not contain factory with name {1}";
|
|
static const char __pyx_k_0_must_be_overridden_before_cal[] = "{0} must be overridden before calling";
|
|
static const char __pyx_k_0_providers_could_not_be_overri[] = "{0} providers could not be overridden";
|
|
static const char __pyx_k_cls_object_has_no_attribute_att[] = "'{cls}' object has no attribute '{attribute_name}'";
|
|
static const char __pyx_k_Abstract_provider_forward_provid[] = "Abstract provider forward providing logic to overriding provider";
|
|
static const char __pyx_k_Dependency_injector_providers_Po[] = "Dependency injector providers.\n\nPowered by Cython.\n";
|
|
static const char __pyx_k_Expected_provider_instance_got_0[] = "Expected provider instance, got {0}";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0x03[] = "Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0x0c[] = "Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0x0f[] = "Incompatible checksums (%s vs 0x0f5c5dd = (__last_overriding, __overridden))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0x20[] = "Incompatible checksums (%s vs 0x2071b6b = (__overridden, __overriding))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0x2e[] = "Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0x3f[] = "Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0x63[] = "Incompatible checksums (%s vs 0x631cff7 = (__args, __args_len, __last_overriding, __overridden))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0x64[] = "Incompatible checksums (%s vs 0x64f395f = (__call, __is_delegated, __is_provider, __name, __value))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0x76[] = "Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0xa5[] = "Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0xa6[] = "Incompatible checksums (%s vs 0xa6696fd = (__factories, __last_overriding, __overridden))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0xa7[] = "Incompatible checksums (%s vs 0xa7663cf = (__children, __last_overriding, __name, __overridden, __provides))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0xd8[] = "Incompatible checksums (%s vs 0xd8553c7 = (__last_overriding, __overridden, __providers, __provides))";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0xf1[] = "Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))";
|
|
static const char __pyx_k_Package_asyncio_is_not_available[] = "Package asyncio is not available";
|
|
static const char __pyx_k_Provider_0_could_not_be_overridd[] = "Provider {0} could not be overridden with itself";
|
|
static const char __pyx_k_Provider_0_expected_to_get_calla[] = "Provider {0} expected to get callable, got {0}";
|
|
static const char __pyx_k_Provider_0_expected_to_get_corou[] = "Provider {0} expected to get coroutine function, got {1}";
|
|
static const char __pyx_k_src_dependency_injector_provider[] = "src/dependency_injector/providers.pyx";
|
|
static const char __pyx_k_Incompatible_checksums_s_vs_0xa7_2[] = "Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))";
|
|
static PyObject *__pyx_kp_s_0_can_aggregate_only_instances;
|
|
static PyObject *__pyx_kp_s_0_can_provide_only_1_instances;
|
|
static PyObject *__pyx_kp_s_0_can_wrap_only_1_providers;
|
|
static PyObject *__pyx_kp_s_0_does_not_contain_factory_with;
|
|
static PyObject *__pyx_kp_s_0_is_not_an;
|
|
static PyObject *__pyx_kp_s_0_must_be_overridden_before_cal;
|
|
static PyObject *__pyx_kp_s_0_must_be_overridden_only_by_1;
|
|
static PyObject *__pyx_kp_s_0_providers_could_not_be_overri;
|
|
static PyObject *__pyx_n_s_AbstractCallable;
|
|
static PyObject *__pyx_n_s_AbstractCoroutine;
|
|
static PyObject *__pyx_n_s_AbstractFactory;
|
|
static PyObject *__pyx_n_s_AbstractSingleton;
|
|
static PyObject *__pyx_kp_s_Abstract_provider_forward_provid;
|
|
static PyObject *__pyx_n_s_AttributeError;
|
|
static PyObject *__pyx_n_s_BaseSingleton;
|
|
static PyObject *__pyx_n_s_CLASS_TYPES;
|
|
static PyObject *__pyx_n_s_Callable;
|
|
static PyObject *__pyx_n_s_CallableDelegate;
|
|
static PyObject *__pyx_n_s_ClassType;
|
|
static PyObject *__pyx_n_s_Configuration;
|
|
static PyObject *__pyx_n_s_Coroutine;
|
|
static PyObject *__pyx_n_s_CoroutineDelegate;
|
|
static PyObject *__pyx_n_s_Delegate;
|
|
static PyObject *__pyx_n_s_DelegatedCallable;
|
|
static PyObject *__pyx_n_s_DelegatedCoroutine;
|
|
static PyObject *__pyx_n_s_DelegatedFactory;
|
|
static PyObject *__pyx_n_s_DelegatedSingleton;
|
|
static PyObject *__pyx_n_s_DelegatedThreadLocalSingleton;
|
|
static PyObject *__pyx_n_s_DelegatedThreadSafeSingleton;
|
|
static PyObject *__pyx_n_s_DependenciesContainer;
|
|
static PyObject *__pyx_n_s_Dependency;
|
|
static PyObject *__pyx_kp_s_Dependency_is_not_defined;
|
|
static PyObject *__pyx_n_s_Error;
|
|
static PyObject *__pyx_kp_s_Expected_provider_instance_got_0;
|
|
static PyObject *__pyx_n_s_ExternalDependency;
|
|
static PyObject *__pyx_n_s_Factory;
|
|
static PyObject *__pyx_n_s_FactoryAggregate;
|
|
static PyObject *__pyx_n_s_FactoryDelegate;
|
|
static PyObject *__pyx_n_s_IS_DELEGATED;
|
|
static PyObject *__pyx_n_s_IS_PROVIDER;
|
|
static PyObject *__pyx_n_s_ImportError;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x03;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x0c;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x0f;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x20;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x2e;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x3f;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x63;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x64;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x76;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xa5;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xa6;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xa7;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xa7_2;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd8;
|
|
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xf1;
|
|
static PyObject *__pyx_n_s_IndexError;
|
|
static PyObject *__pyx_n_s_Injection;
|
|
static PyObject *__pyx_n_s_List;
|
|
static PyObject *__pyx_n_s_MethodType;
|
|
static PyObject *__pyx_n_s_NamedInjection;
|
|
static PyObject *__pyx_n_s_NoSuchProviderError;
|
|
static PyObject *__pyx_n_s_NotImplementedError;
|
|
static PyObject *__pyx_n_s_Object;
|
|
static PyObject *__pyx_n_s_OverridingContext;
|
|
static PyObject *__pyx_kp_s_Package_asyncio_is_not_available;
|
|
static PyObject *__pyx_n_s_PickleError;
|
|
static PyObject *__pyx_n_s_PositionalInjection;
|
|
static PyObject *__pyx_n_s_Provider;
|
|
static PyObject *__pyx_kp_s_Provider_0_could_not_be_overridd;
|
|
static PyObject *__pyx_kp_s_Provider_0_expected_to_get_calla;
|
|
static PyObject *__pyx_kp_s_Provider_0_expected_to_get_corou;
|
|
static PyObject *__pyx_kp_s_Provider_0_is_not_overridden;
|
|
static PyObject *__pyx_n_s_RLock;
|
|
static PyObject *__pyx_n_s_Singleton;
|
|
static PyObject *__pyx_n_s_SingletonDelegate;
|
|
static PyObject *__pyx_n_s_ThreadLocalSingleton;
|
|
static PyObject *__pyx_n_s_ThreadSafeSingleton;
|
|
static PyObject *__pyx_n_s__3;
|
|
static PyObject *__pyx_kp_s__4;
|
|
static PyObject *__pyx_kp_s__6;
|
|
static PyObject *__pyx_n_s_add_args;
|
|
static PyObject *__pyx_n_s_add_attributes;
|
|
static PyObject *__pyx_n_s_add_kwargs;
|
|
static PyObject *__pyx_n_s_add_sys_streams;
|
|
static PyObject *__pyx_n_s_address;
|
|
static PyObject *__pyx_n_s_args;
|
|
static PyObject *__pyx_n_s_asyncio;
|
|
static PyObject *__pyx_n_s_asyncio_coroutines;
|
|
static PyObject *__pyx_n_s_asyncio_tasks;
|
|
static PyObject *__pyx_n_s_attribute_name;
|
|
static PyObject *__pyx_n_s_attributes;
|
|
static PyObject *__pyx_n_s_call;
|
|
static PyObject *__pyx_n_s_callable;
|
|
static PyObject *__pyx_n_s_class;
|
|
static PyObject *__pyx_n_s_clear_args;
|
|
static PyObject *__pyx_n_s_clear_attributes;
|
|
static PyObject *__pyx_n_s_clear_kwargs;
|
|
static PyObject *__pyx_n_s_cline_in_traceback;
|
|
static PyObject *__pyx_n_s_cls;
|
|
static PyObject *__pyx_kp_s_cls_object_has_no_attribute_att;
|
|
static PyObject *__pyx_n_s_copied;
|
|
static PyObject *__pyx_n_s_copy;
|
|
static PyObject *__pyx_n_s_copy_overridings;
|
|
static PyObject *__pyx_n_s_coroutine;
|
|
static PyObject *__pyx_n_s_coroutines;
|
|
static PyObject *__pyx_n_s_create_children;
|
|
static PyObject *__pyx_n_s_deepcopy;
|
|
static PyObject *__pyx_n_s_deepcopy_dispatch;
|
|
static PyObject *__pyx_n_s_default;
|
|
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_endswith;
|
|
static PyObject *__pyx_n_s_enter;
|
|
static PyObject *__pyx_n_s_errors;
|
|
static PyObject *__pyx_n_s_exit;
|
|
static PyObject *__pyx_n_s_factories;
|
|
static PyObject *__pyx_n_s_factory;
|
|
static PyObject *__pyx_n_s_factory_name;
|
|
static PyObject *__pyx_n_s_format;
|
|
static PyObject *__pyx_n_s_get;
|
|
static PyObject *__pyx_n_s_get_child_full_name;
|
|
static PyObject *__pyx_n_s_getstate;
|
|
static PyObject *__pyx_n_s_hex;
|
|
static PyObject *__pyx_n_s_id;
|
|
static PyObject *__pyx_n_s_im_class;
|
|
static PyObject *__pyx_n_s_im_func;
|
|
static PyObject *__pyx_n_s_im_self;
|
|
static PyObject *__pyx_n_s_import;
|
|
static PyObject *__pyx_n_s_init;
|
|
static PyObject *__pyx_n_s_inspect;
|
|
static PyObject *__pyx_n_s_instance;
|
|
static PyObject *__pyx_n_s_instance_of;
|
|
static PyObject *__pyx_kp_s_instance_of_0;
|
|
static PyObject *__pyx_n_s_is_coroutine;
|
|
static PyObject *__pyx_n_s_is_coroutine_marker;
|
|
static PyObject *__pyx_n_s_iscoroutinefunction;
|
|
static PyObject *__pyx_n_s_items;
|
|
static PyObject *__pyx_n_s_join;
|
|
static PyObject *__pyx_n_s_kwargs;
|
|
static PyObject *__pyx_n_s_lambda;
|
|
static PyObject *__pyx_n_s_last_overriding;
|
|
static PyObject *__pyx_n_s_local;
|
|
static PyObject *__pyx_n_s_main;
|
|
static PyObject *__pyx_n_s_memo;
|
|
static PyObject *__pyx_n_s_module;
|
|
static PyObject *__pyx_n_s_name;
|
|
static PyObject *__pyx_n_s_name_2;
|
|
static PyObject *__pyx_n_s_new;
|
|
static PyObject *__pyx_n_s_obj;
|
|
static PyObject *__pyx_n_s_object;
|
|
static PyObject *__pyx_n_s_overridden;
|
|
static PyObject *__pyx_n_s_override;
|
|
static PyObject *__pyx_n_s_override_providers;
|
|
static PyObject *__pyx_n_s_overriding;
|
|
static PyObject *__pyx_n_s_overriding_lock;
|
|
static PyObject *__pyx_n_s_pickle;
|
|
static PyObject *__pyx_n_s_provide;
|
|
static PyObject *__pyx_n_s_provided_type;
|
|
static PyObject *__pyx_n_s_provider;
|
|
static PyObject *__pyx_kp_s_provider_provides_at_address;
|
|
static PyObject *__pyx_n_s_providers;
|
|
static PyObject *__pyx_n_s_provides;
|
|
static PyObject *__pyx_n_s_pyx_PickleError;
|
|
static PyObject *__pyx_n_s_pyx_capi;
|
|
static PyObject *__pyx_n_s_pyx_checksum;
|
|
static PyObject *__pyx_n_s_pyx_result;
|
|
static PyObject *__pyx_n_s_pyx_state;
|
|
static PyObject *__pyx_n_s_pyx_type;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_AbstractCallable;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_AbstractCoroutine;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_AbstractFactory;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_AbstractSingleton;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_BaseSingleton;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_Callable;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_CallableDelegate;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_Configuration;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_Coroutine;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_CoroutineDelegate;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_Delegate;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_DelegatedCallable;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_DelegatedCoroutin;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_DelegatedFactory;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_DelegatedSingleto;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_DelegatedThreadLo;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_DelegatedThreadSa;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_DependenciesConta;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_Dependency;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_ExternalDependenc;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_Factory;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_FactoryAggregate;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_FactoryDelegate;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_Injection;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_List;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_NamedInjection;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_Object;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_OverridingContext;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_PositionalInjecti;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_Provider;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_Singleton;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_SingletonDelegate;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_ThreadLocalSingle;
|
|
static PyObject *__pyx_n_s_pyx_unpickle_ThreadSafeSinglet;
|
|
static PyObject *__pyx_n_s_pyx_vtable;
|
|
static PyObject *__pyx_n_s_range;
|
|
static PyObject *__pyx_n_s_reduce;
|
|
static PyObject *__pyx_n_s_reduce_cython;
|
|
static PyObject *__pyx_n_s_reduce_ex;
|
|
static PyObject *__pyx_n_s_reset;
|
|
static PyObject *__pyx_n_s_reset_last_overriding;
|
|
static PyObject *__pyx_n_s_reset_override;
|
|
static PyObject *__pyx_n_s_set_args;
|
|
static PyObject *__pyx_n_s_set_attributes;
|
|
static PyObject *__pyx_n_s_set_kwargs;
|
|
static PyObject *__pyx_n_s_setstate;
|
|
static PyObject *__pyx_n_s_setstate_cython;
|
|
static PyObject *__pyx_n_s_singleton;
|
|
static PyObject *__pyx_kp_s_src_dependency_injector_provider;
|
|
static PyObject *__pyx_n_s_startswith;
|
|
static PyObject *__pyx_n_s_stderr;
|
|
static PyObject *__pyx_n_s_stdin;
|
|
static PyObject *__pyx_n_s_stdout;
|
|
static PyObject *__pyx_n_s_storage_lock;
|
|
static PyObject *__pyx_n_s_str;
|
|
static PyObject *__pyx_kp_s_stringsource;
|
|
static PyObject *__pyx_n_s_super;
|
|
static PyObject *__pyx_n_s_sys;
|
|
static PyObject *__pyx_n_s_test;
|
|
static PyObject *__pyx_n_s_threading;
|
|
static PyObject *__pyx_n_s_types;
|
|
static PyObject *__pyx_n_s_update;
|
|
static PyObject *__pyx_n_s_value;
|
|
static PyObject *__pyx_n_s_values;
|
|
static PyObject *__pyx_n_s_version_info;
|
|
static PyObject *__pyx_lambda_funcdef_19dependency_injector_9providers_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_memo); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_8Provider___init__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_2__call__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_6__str__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_8__repr__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_10overridden___get__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_15last_overriding___get__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_10override(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_12reset_last_overriding(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_14reset_override(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_16delegate(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_8provider___get__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_18_provide(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_20_copy_overridings(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_copied, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_22__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_24__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_6Object___init__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_4__str__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_6__repr__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_8_provide(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_10__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_12__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_8Delegate___init__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, PyObject *__pyx_v_provides); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_4__str__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_6__repr__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_8_provide(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_10__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_12__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_10Dependency___init__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyTypeObject *__pyx_v_instance_of); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6__str__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__repr__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11instance_of___get__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10provided_by(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_12__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_14__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18ExternalDependency___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18ExternalDependency_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___init__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_dependencies); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_4__getattr__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_9providers___get__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_6override(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_8reset_last_overriding(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_10reset_override(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_12_override_providers(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_container); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_17OverridingContext___init__(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v_self, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_overridden, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_overriding); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_2__enter__(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_4__exit__(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_8Callable___init__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4__str__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4args___get__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6add_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8set_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10clear_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_18_provide(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_20__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_22__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17DelegatedCallable___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17DelegatedCallable_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2override(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_4_provide(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *__pyx_v_self, PyObject *__pyx_v_callable); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16CallableDelegate_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16CallableDelegate_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_9Coroutine___init__(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Coroutine_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Coroutine_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedCoroutine___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedCoroutine_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2override(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_4_provide(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *__pyx_v_self, PyObject *__pyx_v_coroutine); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17CoroutineDelegate_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17CoroutineDelegate_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_4__str__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__getattr__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_8get_name(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12reset_last_overriding(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_14reset_override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16update(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18_create_children(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20_get_child_full_name(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_child_name); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4__str__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_3cls___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4args___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24_provide(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_26__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_28__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16DelegatedFactory___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16DelegatedFactory_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2override(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_4_provide(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *__pyx_v_self, PyObject *__pyx_v_factory); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15FactoryDelegate_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15FactoryDelegate_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_16FactoryAggregate___init__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factories); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_4__call__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factory_name, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_6__getattr__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factory_name); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8__str__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_9factories___get__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10override(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_12__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_14__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__str__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10clear_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10attributes___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22clear_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24reset(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_4_provide(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedSingleton___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedSingleton_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___init__(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_2reset(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_4_provide(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_28DelegatedThreadSafeSingleton___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_28DelegatedThreadSafeSingleton_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___init__(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_2reset(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_4_provide(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_29DelegatedThreadLocalSingleton___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_29DelegatedThreadLocalSingleton_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2override(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4reset(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *__pyx_v_self, PyObject *__pyx_v_singleton); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17SingletonDelegate_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17SingletonDelegate_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_4List___init__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4__str__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4args___get__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_6add_args(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_8set_args(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_10clear_args(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_12_provide(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Injection___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Injection *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Injection_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Injection *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___init__(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection_4get_value(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection_6get_original_value(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection_8__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection_10__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get_name(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get_value(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_8get_original_value(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_10__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_12__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_parse_positional_injections(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_2parse_named_injections(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kwargs); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4is_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6ensure_is_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8is_delegated(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10represent_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_provider, PyObject *__pyx_v_provides); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_12deepcopy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14__add_sys_streams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_memo); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17__pyx_unpickle_Provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19__pyx_unpickle_Object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21__pyx_unpickle_Delegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_23__pyx_unpickle_Dependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_25__pyx_unpickle_ExternalDependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_27__pyx_unpickle_DependenciesContainer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_29__pyx_unpickle_OverridingContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_31__pyx_unpickle_Callable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_33__pyx_unpickle_DelegatedCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_35__pyx_unpickle_AbstractCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_37__pyx_unpickle_CallableDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_39__pyx_unpickle_Coroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_41__pyx_unpickle_DelegatedCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_43__pyx_unpickle_AbstractCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_45__pyx_unpickle_CoroutineDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_47__pyx_unpickle_Configuration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_49__pyx_unpickle_Factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_51__pyx_unpickle_DelegatedFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_53__pyx_unpickle_AbstractFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_55__pyx_unpickle_FactoryDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_57__pyx_unpickle_FactoryAggregate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_59__pyx_unpickle_BaseSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_61__pyx_unpickle_Singleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_63__pyx_unpickle_DelegatedSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_65__pyx_unpickle_ThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_67__pyx_unpickle_DelegatedThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_69__pyx_unpickle_ThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_71__pyx_unpickle_DelegatedThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_73__pyx_unpickle_AbstractSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_75__pyx_unpickle_SingletonDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_77__pyx_unpickle_List(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_79__pyx_unpickle_Injection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_81__pyx_unpickle_PositionalInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_83__pyx_unpickle_NamedInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Provider(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Object(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Delegate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Dependency(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_ExternalDependency(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DependenciesContainer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_OverridingContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Callable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedCallable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_AbstractCallable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_CallableDelegate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Coroutine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedCoroutine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_AbstractCoroutine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_CoroutineDelegate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Configuration(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Factory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedFactory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_AbstractFactory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_FactoryDelegate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_FactoryAggregate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_BaseSingleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Singleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedSingleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_ThreadSafeSingleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedThreadSafeSingleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_ThreadLocalSingleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedThreadLocalSingleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_AbstractSingleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_SingletonDelegate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_List(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Injection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_PositionalInjection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_NamedInjection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
|
|
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0};
|
|
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
|
|
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, &__pyx_n_s_values, 0, 0, 0};
|
|
static PyObject *__pyx_int_3;
|
|
static PyObject *__pyx_int_5;
|
|
static PyObject *__pyx_int_3297756;
|
|
static PyObject *__pyx_int_12885488;
|
|
static PyObject *__pyx_int_16106973;
|
|
static PyObject *__pyx_int_34020203;
|
|
static PyObject *__pyx_int_48353679;
|
|
static PyObject *__pyx_int_66364342;
|
|
static PyObject *__pyx_int_103927799;
|
|
static PyObject *__pyx_int_105855327;
|
|
static PyObject *__pyx_int_124696738;
|
|
static PyObject *__pyx_int_173552623;
|
|
static PyObject *__pyx_int_174495485;
|
|
static PyObject *__pyx_int_175356006;
|
|
static PyObject *__pyx_int_175530959;
|
|
static PyObject *__pyx_int_226841543;
|
|
static PyObject *__pyx_int_253710871;
|
|
static PyTypeObject *__pyx_k__2;
|
|
static PyObject *__pyx_tuple_;
|
|
static PyObject *__pyx_tuple__5;
|
|
static PyObject *__pyx_tuple__7;
|
|
static PyObject *__pyx_tuple__8;
|
|
static PyObject *__pyx_tuple__10;
|
|
static PyObject *__pyx_tuple__12;
|
|
static PyObject *__pyx_tuple__14;
|
|
static PyObject *__pyx_tuple__16;
|
|
static PyObject *__pyx_tuple__18;
|
|
static PyObject *__pyx_tuple__20;
|
|
static PyObject *__pyx_tuple__22;
|
|
static PyObject *__pyx_tuple__24;
|
|
static PyObject *__pyx_tuple__26;
|
|
static PyObject *__pyx_tuple__28;
|
|
static PyObject *__pyx_tuple__30;
|
|
static PyObject *__pyx_tuple__32;
|
|
static PyObject *__pyx_tuple__34;
|
|
static PyObject *__pyx_tuple__36;
|
|
static PyObject *__pyx_tuple__38;
|
|
static PyObject *__pyx_tuple__40;
|
|
static PyObject *__pyx_tuple__42;
|
|
static PyObject *__pyx_tuple__44;
|
|
static PyObject *__pyx_tuple__46;
|
|
static PyObject *__pyx_tuple__48;
|
|
static PyObject *__pyx_tuple__50;
|
|
static PyObject *__pyx_tuple__52;
|
|
static PyObject *__pyx_tuple__54;
|
|
static PyObject *__pyx_tuple__56;
|
|
static PyObject *__pyx_tuple__58;
|
|
static PyObject *__pyx_tuple__60;
|
|
static PyObject *__pyx_tuple__62;
|
|
static PyObject *__pyx_tuple__64;
|
|
static PyObject *__pyx_tuple__66;
|
|
static PyObject *__pyx_tuple__68;
|
|
static PyObject *__pyx_tuple__70;
|
|
static PyObject *__pyx_tuple__72;
|
|
static PyObject *__pyx_tuple__74;
|
|
static PyObject *__pyx_tuple__76;
|
|
static PyObject *__pyx_codeobj__9;
|
|
static PyObject *__pyx_codeobj__11;
|
|
static PyObject *__pyx_codeobj__13;
|
|
static PyObject *__pyx_codeobj__15;
|
|
static PyObject *__pyx_codeobj__17;
|
|
static PyObject *__pyx_codeobj__19;
|
|
static PyObject *__pyx_codeobj__21;
|
|
static PyObject *__pyx_codeobj__23;
|
|
static PyObject *__pyx_codeobj__25;
|
|
static PyObject *__pyx_codeobj__27;
|
|
static PyObject *__pyx_codeobj__29;
|
|
static PyObject *__pyx_codeobj__31;
|
|
static PyObject *__pyx_codeobj__33;
|
|
static PyObject *__pyx_codeobj__35;
|
|
static PyObject *__pyx_codeobj__37;
|
|
static PyObject *__pyx_codeobj__39;
|
|
static PyObject *__pyx_codeobj__41;
|
|
static PyObject *__pyx_codeobj__43;
|
|
static PyObject *__pyx_codeobj__45;
|
|
static PyObject *__pyx_codeobj__47;
|
|
static PyObject *__pyx_codeobj__49;
|
|
static PyObject *__pyx_codeobj__51;
|
|
static PyObject *__pyx_codeobj__53;
|
|
static PyObject *__pyx_codeobj__55;
|
|
static PyObject *__pyx_codeobj__57;
|
|
static PyObject *__pyx_codeobj__59;
|
|
static PyObject *__pyx_codeobj__61;
|
|
static PyObject *__pyx_codeobj__63;
|
|
static PyObject *__pyx_codeobj__65;
|
|
static PyObject *__pyx_codeobj__67;
|
|
static PyObject *__pyx_codeobj__69;
|
|
static PyObject *__pyx_codeobj__71;
|
|
static PyObject *__pyx_codeobj__73;
|
|
static PyObject *__pyx_codeobj__75;
|
|
static PyObject *__pyx_codeobj__77;
|
|
/* Late includes */
|
|
|
|
/* "dependency_injector/providers.pyx":39
|
|
*
|
|
* copy._deepcopy_dispatch[types.MethodType] = \
|
|
* lambda obj, memo: type(obj)(obj.im_func, # <<<<<<<<<<<<<<
|
|
* copy.deepcopy(obj.im_self, memo),
|
|
* obj.im_class)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_16lambda = {"lambda", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_16lambda, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_obj = 0;
|
|
PyObject *__pyx_v_memo = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("lambda (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_memo,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("lambda", 1, 2, 2, 1); __PYX_ERR(1, 39, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda") < 0)) __PYX_ERR(1, 39, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_obj = values[0];
|
|
__pyx_v_memo = values[1];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("lambda", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 39, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_lambda_funcdef_19dependency_injector_9providers_lambda(__pyx_self, __pyx_v_obj, __pyx_v_memo);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_lambda_funcdef_19dependency_injector_9providers_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
int __pyx_t_7;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("lambda", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_im_func); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 39, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
|
|
/* "dependency_injector/providers.pyx":40
|
|
* copy._deepcopy_dispatch[types.MethodType] = \
|
|
* lambda obj, memo: type(obj)(obj.im_func,
|
|
* copy.deepcopy(obj.im_self, memo), # <<<<<<<<<<<<<<
|
|
* obj.im_class)
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 40, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 40, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_im_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 40, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = NULL;
|
|
__pyx_t_7 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_5, function);
|
|
__pyx_t_7 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_5)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_memo};
|
|
__pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 40, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_memo};
|
|
__pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 40, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 40, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (__pyx_t_6) {
|
|
__Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
|
|
__Pyx_INCREF(__pyx_v_memo);
|
|
__Pyx_GIVEREF(__pyx_v_memo);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_memo);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 40, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":41
|
|
* lambda obj, memo: type(obj)(obj.im_func,
|
|
* copy.deepcopy(obj.im_self, memo),
|
|
* obj.im_class) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_im_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 41, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_obj)));
|
|
__pyx_t_8 = ((PyObject *)Py_TYPE(__pyx_v_obj)); __pyx_t_4 = NULL;
|
|
__pyx_t_7 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
__pyx_t_7 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_8)) {
|
|
PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_t_3, __pyx_t_5};
|
|
__pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
|
|
PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_t_3, __pyx_t_5};
|
|
__pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 39, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_t_5);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":39
|
|
*
|
|
* copy._deepcopy_dispatch[types.MethodType] = \
|
|
* lambda obj, memo: type(obj)(obj.im_func, # <<<<<<<<<<<<<<
|
|
* copy.deepcopy(obj.im_self, memo),
|
|
* obj.im_class)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":99
|
|
* """
|
|
*
|
|
* def __init__(self): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__overridden = tuple()
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_8Provider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider___init__[] = "Initializer.";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Provider___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_8Provider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider___init__(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_8Provider___init__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":101
|
|
* def __init__(self):
|
|
* """Initializer."""
|
|
* self.__overridden = tuple() # <<<<<<<<<<<<<<
|
|
* self.__last_overriding = None
|
|
* super(Provider, self).__init__()
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 101, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___overridden);
|
|
__pyx_v_self->__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":102
|
|
* """Initializer."""
|
|
* self.__overridden = tuple()
|
|
* self.__last_overriding = None # <<<<<<<<<<<<<<
|
|
* super(Provider, self).__init__()
|
|
*
|
|
*/
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___last_overriding));
|
|
__pyx_v_self->__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None);
|
|
|
|
/* "dependency_injector/providers.pyx":103
|
|
* self.__overridden = tuple()
|
|
* self.__last_overriding = None
|
|
* super(Provider, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __call__(self, *args, **kwargs):
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 103, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Provider));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Provider));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Provider));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 103, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 103, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 103, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":99
|
|
* """
|
|
*
|
|
* def __init__(self): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__overridden = tuple()
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":105
|
|
* super(Provider, self).__init__()
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided object.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider_2__call__[] = "Return provided object.\n\n Callable interface implementation.\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Provider_2__call__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
|
|
__pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_2__call__(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_2__call__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__call__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":110
|
|
* Callable interface implementation.
|
|
* """
|
|
* if self.__last_overriding is not None: # <<<<<<<<<<<<<<
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
* return self._provide(args, kwargs)
|
|
*/
|
|
__pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
/* "dependency_injector/providers.pyx":111
|
|
* """
|
|
* if self.__last_overriding is not None:
|
|
* return self.__last_overriding(*args, **kwargs) # <<<<<<<<<<<<<<
|
|
* return self._provide(args, kwargs)
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx___last_overriding), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 111, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":110
|
|
* Callable interface implementation.
|
|
* """
|
|
* if self.__last_overriding is not None: # <<<<<<<<<<<<<<
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
* return self._provide(args, kwargs)
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":112
|
|
* if self.__last_overriding is not None:
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
* return self._provide(args, kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *)__pyx_v_self->__pyx_vtab)->_provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 112, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":105
|
|
* super(Provider, self).__init__()
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided object.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":114
|
|
* return self._provide(args, kwargs)
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider_4__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_4__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_v_copied = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":116
|
|
* def __deepcopy__(self, memo):
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 116, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 116, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 116, __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":117
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_copied != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":118
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__()
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":117
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":120
|
|
* return copied
|
|
*
|
|
* copied = self.__class__() # <<<<<<<<<<<<<<
|
|
*
|
|
* self._copy_overridings(copied, memo)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 120, __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, 120, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":122
|
|
* copied = self.__class__()
|
|
*
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 122, __pyx_L1_error)
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 122, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *)__pyx_v_self->__pyx_vtab)->_copy_overridings(__pyx_v_self, ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":124
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":114
|
|
* return self._provide(args, kwargs)
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_copied);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":126
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_7__str__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider_6__str__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Provider_6__str__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_7__str__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_6__str__(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_6__str__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":131
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, provides=None) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __repr__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), Py_None, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 131, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":126
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":133
|
|
* return represent_provider(provider=self, provides=None)
|
|
*
|
|
* def __repr__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider_8__repr__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Provider_8__repr__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_8__repr__(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_8__repr__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__repr__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":138
|
|
* :rtype: str
|
|
* """
|
|
* return self.__str__() # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 138, __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, 138, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":133
|
|
* return represent_provider(provider=self, provides=None)
|
|
*
|
|
* def __repr__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* 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.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":141
|
|
*
|
|
* @property
|
|
* def overridden(self): # <<<<<<<<<<<<<<
|
|
* """Return tuple of overriding providers."""
|
|
* with self.overriding_lock:
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_10overridden_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_10overridden_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_10overridden___get__(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_10overridden___get__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":143
|
|
* def overridden(self):
|
|
* """Return tuple of overriding providers."""
|
|
* with self.overriding_lock: # <<<<<<<<<<<<<<
|
|
* return self.__overridden
|
|
*
|
|
*/
|
|
/*with:*/ {
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overriding_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 143, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 143, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 143, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 143, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
/*try:*/ {
|
|
{
|
|
(void)__pyx_t_6; (void)__pyx_t_7; (void)__pyx_t_8; /* mark used */
|
|
/*try:*/ {
|
|
|
|
/* "dependency_injector/providers.pyx":144
|
|
* """Return tuple of overriding providers."""
|
|
* with self.overriding_lock:
|
|
* return self.__overridden # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___overridden);
|
|
__pyx_r = __pyx_v_self->__pyx___overridden;
|
|
goto __pyx_L11_try_return;
|
|
|
|
/* "dependency_injector/providers.pyx":143
|
|
* def overridden(self):
|
|
* """Return tuple of overriding providers."""
|
|
* with self.overriding_lock: # <<<<<<<<<<<<<<
|
|
* return self.__overridden
|
|
*
|
|
*/
|
|
}
|
|
__pyx_L11_try_return:;
|
|
goto __pyx_L4_return;
|
|
}
|
|
}
|
|
/*finally:*/ {
|
|
/*normal exit:*/{
|
|
if (__pyx_t_2) {
|
|
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, NULL);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 143, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L4_return: {
|
|
__pyx_t_8 = __pyx_r;
|
|
__pyx_r = 0;
|
|
if (__pyx_t_2) {
|
|
__pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, NULL);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 143, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
}
|
|
__pyx_r = __pyx_t_8;
|
|
__pyx_t_8 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L6:;
|
|
}
|
|
goto __pyx_L13;
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
goto __pyx_L1_error;
|
|
__pyx_L13:;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":141
|
|
*
|
|
* @property
|
|
* def overridden(self): # <<<<<<<<<<<<<<
|
|
* """Return tuple of overriding providers."""
|
|
* with self.overriding_lock:
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.overridden.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":147
|
|
*
|
|
* @property
|
|
* def last_overriding(self): # <<<<<<<<<<<<<<
|
|
* """Return last overriding provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_15last_overriding_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_15last_overriding_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_15last_overriding___get__(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_15last_overriding___get__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":152
|
|
* If provider is not overridden, then None is returned.
|
|
* """
|
|
* return self.__last_overriding # <<<<<<<<<<<<<<
|
|
*
|
|
* def override(self, provider):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___last_overriding));
|
|
__pyx_r = ((PyObject *)__pyx_v_self->__pyx___last_overriding);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":147
|
|
*
|
|
* @property
|
|
* def last_overriding(self): # <<<<<<<<<<<<<<
|
|
* """Return last overriding provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":154
|
|
* return self.__last_overriding
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_11override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider_10override[] = "Override provider with another provider.\n\n :param provider: Overriding provider.\n :type provider: :py:class:`Provider`\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_11override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_10override(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((PyObject *)__pyx_v_provider));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_10override(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
PyObject *__pyx_t_11 = NULL;
|
|
PyObject *__pyx_t_12 = NULL;
|
|
__Pyx_RefNannySetupContext("override", 0);
|
|
__Pyx_INCREF(__pyx_v_provider);
|
|
|
|
/* "dependency_injector/providers.pyx":165
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* if provider is self: # <<<<<<<<<<<<<<
|
|
* raise Error('Provider {0} could not be overridden '
|
|
* 'with itself'.format(self))
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_provider == ((PyObject *)__pyx_v_self));
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":166
|
|
* """
|
|
* if provider is self:
|
|
* raise Error('Provider {0} could not be overridden ' # <<<<<<<<<<<<<<
|
|
* 'with itself'.format(self))
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 166, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
|
|
/* "dependency_injector/providers.pyx":167
|
|
* if provider is self:
|
|
* raise Error('Provider {0} could not be overridden '
|
|
* 'with itself'.format(self)) # <<<<<<<<<<<<<<
|
|
*
|
|
* if not is_provider(provider):
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provider_0_could_not_be_overridd, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 167, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self));
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 167, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 166, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 166, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":165
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* if provider is self: # <<<<<<<<<<<<<<
|
|
* raise Error('Provider {0} could not be overridden '
|
|
* 'with itself'.format(self))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":169
|
|
* 'with itself'.format(self))
|
|
*
|
|
* if not is_provider(provider): # <<<<<<<<<<<<<<
|
|
* provider = Object(provider)
|
|
*
|
|
*/
|
|
__pyx_t_2 = ((!(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_provider, 0) != 0)) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
/* "dependency_injector/providers.pyx":170
|
|
*
|
|
* if not is_provider(provider):
|
|
* provider = Object(provider) # <<<<<<<<<<<<<<
|
|
*
|
|
* with self.overriding_lock:
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object), __pyx_v_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 170, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF_SET(__pyx_v_provider, __pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":169
|
|
* 'with itself'.format(self))
|
|
*
|
|
* if not is_provider(provider): # <<<<<<<<<<<<<<
|
|
* provider = Object(provider)
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":172
|
|
* provider = Object(provider)
|
|
*
|
|
* with self.overriding_lock: # <<<<<<<<<<<<<<
|
|
* self.__overridden += (provider,)
|
|
* self.__last_overriding = provider
|
|
*/
|
|
/*with:*/ {
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overriding_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 172, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 172, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 172, __pyx_L5_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_5, function);
|
|
}
|
|
}
|
|
__pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 172, __pyx_L5_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
/*try:*/ {
|
|
{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
|
|
__Pyx_XGOTREF(__pyx_t_9);
|
|
__Pyx_XGOTREF(__pyx_t_10);
|
|
__Pyx_XGOTREF(__pyx_t_11);
|
|
/*try:*/ {
|
|
|
|
/* "dependency_injector/providers.pyx":173
|
|
*
|
|
* with self.overriding_lock:
|
|
* self.__overridden += (provider,) # <<<<<<<<<<<<<<
|
|
* self.__last_overriding = provider
|
|
*
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 173, __pyx_L9_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_provider);
|
|
__Pyx_GIVEREF(__pyx_v_provider);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_provider);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___overridden, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 173, __pyx_L9_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___overridden);
|
|
__pyx_v_self->__pyx___overridden = ((PyObject*)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":174
|
|
* with self.overriding_lock:
|
|
* self.__overridden += (provider,)
|
|
* self.__last_overriding = provider # <<<<<<<<<<<<<<
|
|
*
|
|
* return OverridingContext(self, provider)
|
|
*/
|
|
if (!(likely(((__pyx_v_provider) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_provider, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 174, __pyx_L9_error)
|
|
__pyx_t_4 = __pyx_v_provider;
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___last_overriding));
|
|
__pyx_v_self->__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":172
|
|
* provider = Object(provider)
|
|
*
|
|
* with self.overriding_lock: # <<<<<<<<<<<<<<
|
|
* self.__overridden += (provider,)
|
|
* self.__last_overriding = provider
|
|
*/
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
goto __pyx_L14_try_end;
|
|
__pyx_L9_error:;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
/*except:*/ {
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(1, 172, __pyx_L11_except_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 172, __pyx_L11_except_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 172, __pyx_L11_except_error)
|
|
__Pyx_GOTREF(__pyx_t_12);
|
|
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12);
|
|
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
|
|
if (__pyx_t_2 < 0) __PYX_ERR(1, 172, __pyx_L11_except_error)
|
|
__pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
|
|
if (__pyx_t_1) {
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__Pyx_XGIVEREF(__pyx_t_5);
|
|
__Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_3, __pyx_t_5);
|
|
__pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0;
|
|
__PYX_ERR(1, 172, __pyx_L11_except_error)
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
goto __pyx_L10_exception_handled;
|
|
}
|
|
__pyx_L11_except_error:;
|
|
__Pyx_XGIVEREF(__pyx_t_9);
|
|
__Pyx_XGIVEREF(__pyx_t_10);
|
|
__Pyx_XGIVEREF(__pyx_t_11);
|
|
__Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
|
|
goto __pyx_L1_error;
|
|
__pyx_L10_exception_handled:;
|
|
__Pyx_XGIVEREF(__pyx_t_9);
|
|
__Pyx_XGIVEREF(__pyx_t_10);
|
|
__Pyx_XGIVEREF(__pyx_t_11);
|
|
__Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
|
|
__pyx_L14_try_end:;
|
|
}
|
|
}
|
|
/*finally:*/ {
|
|
/*normal exit:*/{
|
|
if (__pyx_t_8) {
|
|
__pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple_, NULL);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 172, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_11);
|
|
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
}
|
|
goto __pyx_L8;
|
|
}
|
|
__pyx_L8:;
|
|
}
|
|
goto __pyx_L18;
|
|
__pyx_L5_error:;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
goto __pyx_L1_error;
|
|
__pyx_L18:;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":176
|
|
* self.__last_overriding = provider
|
|
*
|
|
* return OverridingContext(self, provider) # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset_last_overriding(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 176, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self));
|
|
__Pyx_INCREF(__pyx_v_provider);
|
|
__Pyx_GIVEREF(__pyx_v_provider);
|
|
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_provider);
|
|
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_OverridingContext), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 176, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":154
|
|
* return self.__last_overriding
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_provider);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":178
|
|
* return OverridingContext(self, provider)
|
|
*
|
|
* def reset_last_overriding(self): # <<<<<<<<<<<<<<
|
|
* """Reset last overriding provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_13reset_last_overriding(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider_12reset_last_overriding[] = "Reset last overriding provider.\n\n :raise: :py:exc:`dependency_injector.errors.Error` if provider is not\n overridden.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_13reset_last_overriding(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset_last_overriding (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_12reset_last_overriding(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_12reset_last_overriding(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
Py_ssize_t __pyx_t_9;
|
|
int __pyx_t_10;
|
|
PyObject *__pyx_t_11 = NULL;
|
|
PyObject *__pyx_t_12 = NULL;
|
|
PyObject *__pyx_t_13 = NULL;
|
|
PyObject *__pyx_t_14 = NULL;
|
|
PyObject *__pyx_t_15 = NULL;
|
|
int __pyx_t_16;
|
|
int __pyx_t_17;
|
|
__Pyx_RefNannySetupContext("reset_last_overriding", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":186
|
|
* :rtype: None
|
|
* """
|
|
* with self.overriding_lock: # <<<<<<<<<<<<<<
|
|
* if len(self.__overridden) == 0:
|
|
* raise Error('Provider {0} is not overridden'.format(str(self)))
|
|
*/
|
|
/*with:*/ {
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overriding_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 186, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 186, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 186, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 186, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
/*try:*/ {
|
|
{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
|
|
__Pyx_XGOTREF(__pyx_t_6);
|
|
__Pyx_XGOTREF(__pyx_t_7);
|
|
__Pyx_XGOTREF(__pyx_t_8);
|
|
/*try:*/ {
|
|
|
|
/* "dependency_injector/providers.pyx":187
|
|
* """
|
|
* with self.overriding_lock:
|
|
* if len(self.__overridden) == 0: # <<<<<<<<<<<<<<
|
|
* raise Error('Provider {0} is not overridden'.format(str(self)))
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___overridden;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 187, __pyx_L7_error)
|
|
}
|
|
__pyx_t_9 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 187, __pyx_L7_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_10 = ((__pyx_t_9 == 0) != 0);
|
|
if (unlikely(__pyx_t_10)) {
|
|
|
|
/* "dependency_injector/providers.pyx":188
|
|
* with self.overriding_lock:
|
|
* if len(self.__overridden) == 0:
|
|
* raise Error('Provider {0} is not overridden'.format(str(self))) # <<<<<<<<<<<<<<
|
|
*
|
|
* self.__overridden = self.__overridden[:-1]
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 188, __pyx_L7_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provider_0_is_not_overridden, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 188, __pyx_L7_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_11 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 188, __pyx_L7_error)
|
|
__Pyx_GOTREF(__pyx_t_11);
|
|
__pyx_t_12 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
|
|
__pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
|
|
if (likely(__pyx_t_12)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_12);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_5, function);
|
|
}
|
|
}
|
|
__pyx_t_4 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_12, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_11);
|
|
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
|
|
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 188, __pyx_L7_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 188, __pyx_L7_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 188, __pyx_L7_error)
|
|
|
|
/* "dependency_injector/providers.pyx":187
|
|
* """
|
|
* with self.overriding_lock:
|
|
* if len(self.__overridden) == 0: # <<<<<<<<<<<<<<
|
|
* raise Error('Provider {0} is not overridden'.format(str(self)))
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":190
|
|
* raise Error('Provider {0} is not overridden'.format(str(self)))
|
|
*
|
|
* self.__overridden = self.__overridden[:-1] # <<<<<<<<<<<<<<
|
|
* try:
|
|
* self.__last_overriding = self.__overridden[-1]
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___overridden == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(1, 190, __pyx_L7_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_PyTuple_GetSlice(__pyx_v_self->__pyx___overridden, 0, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 190, __pyx_L7_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___overridden);
|
|
__pyx_v_self->__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":191
|
|
*
|
|
* self.__overridden = self.__overridden[:-1]
|
|
* try: # <<<<<<<<<<<<<<
|
|
* self.__last_overriding = self.__overridden[-1]
|
|
* except IndexError:
|
|
*/
|
|
{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
|
|
__Pyx_XGOTREF(__pyx_t_13);
|
|
__Pyx_XGOTREF(__pyx_t_14);
|
|
__Pyx_XGOTREF(__pyx_t_15);
|
|
/*try:*/ {
|
|
|
|
/* "dependency_injector/providers.pyx":192
|
|
* self.__overridden = self.__overridden[:-1]
|
|
* try:
|
|
* self.__last_overriding = self.__overridden[-1] # <<<<<<<<<<<<<<
|
|
* except IndexError:
|
|
* self.__last_overriding = None
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___overridden == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(1, 192, __pyx_L14_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___overridden, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 192, __pyx_L14_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 192, __pyx_L14_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___last_overriding));
|
|
__pyx_v_self->__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":191
|
|
*
|
|
* self.__overridden = self.__overridden[:-1]
|
|
* try: # <<<<<<<<<<<<<<
|
|
* self.__last_overriding = self.__overridden[-1]
|
|
* except IndexError:
|
|
*/
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
|
|
__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
__Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
|
|
goto __pyx_L19_try_end;
|
|
__pyx_L14_error:;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":193
|
|
* try:
|
|
* self.__last_overriding = self.__overridden[-1]
|
|
* except IndexError: # <<<<<<<<<<<<<<
|
|
* self.__last_overriding = None
|
|
*
|
|
*/
|
|
__pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
|
|
if (__pyx_t_16) {
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.reset_last_overriding", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(1, 193, __pyx_L16_except_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
|
|
/* "dependency_injector/providers.pyx":194
|
|
* self.__last_overriding = self.__overridden[-1]
|
|
* except IndexError:
|
|
* self.__last_overriding = None # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset_override(self):
|
|
*/
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___last_overriding));
|
|
__pyx_v_self->__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None);
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
goto __pyx_L15_exception_handled;
|
|
}
|
|
goto __pyx_L16_except_error;
|
|
__pyx_L16_except_error:;
|
|
|
|
/* "dependency_injector/providers.pyx":191
|
|
*
|
|
* self.__overridden = self.__overridden[:-1]
|
|
* try: # <<<<<<<<<<<<<<
|
|
* self.__last_overriding = self.__overridden[-1]
|
|
* except IndexError:
|
|
*/
|
|
__Pyx_XGIVEREF(__pyx_t_13);
|
|
__Pyx_XGIVEREF(__pyx_t_14);
|
|
__Pyx_XGIVEREF(__pyx_t_15);
|
|
__Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
|
|
goto __pyx_L7_error;
|
|
__pyx_L15_exception_handled:;
|
|
__Pyx_XGIVEREF(__pyx_t_13);
|
|
__Pyx_XGIVEREF(__pyx_t_14);
|
|
__Pyx_XGIVEREF(__pyx_t_15);
|
|
__Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
|
|
__pyx_L19_try_end:;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":186
|
|
* :rtype: None
|
|
* """
|
|
* with self.overriding_lock: # <<<<<<<<<<<<<<
|
|
* if len(self.__overridden) == 0:
|
|
* raise Error('Provider {0} is not overridden'.format(str(self)))
|
|
*/
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
goto __pyx_L12_try_end;
|
|
__pyx_L7_error:;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
/*except:*/ {
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.reset_last_overriding", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(1, 186, __pyx_L9_except_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_5 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 186, __pyx_L9_except_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 186, __pyx_L9_except_error)
|
|
__Pyx_GOTREF(__pyx_t_15);
|
|
__pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_15);
|
|
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
|
|
if (__pyx_t_10 < 0) __PYX_ERR(1, 186, __pyx_L9_except_error)
|
|
__pyx_t_17 = ((!(__pyx_t_10 != 0)) != 0);
|
|
if (__pyx_t_17) {
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__Pyx_XGIVEREF(__pyx_t_1);
|
|
__Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_3, __pyx_t_1);
|
|
__pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 186, __pyx_L9_except_error)
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L8_exception_handled;
|
|
}
|
|
__pyx_L9_except_error:;
|
|
__Pyx_XGIVEREF(__pyx_t_6);
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_XGIVEREF(__pyx_t_8);
|
|
__Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
|
|
goto __pyx_L1_error;
|
|
__pyx_L8_exception_handled:;
|
|
__Pyx_XGIVEREF(__pyx_t_6);
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_XGIVEREF(__pyx_t_8);
|
|
__Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
|
|
__pyx_L12_try_end:;
|
|
}
|
|
}
|
|
/*finally:*/ {
|
|
/*normal exit:*/{
|
|
if (__pyx_t_2) {
|
|
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, NULL);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 186, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
}
|
|
goto __pyx_L25;
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
goto __pyx_L1_error;
|
|
__pyx_L25:;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":178
|
|
* return OverridingContext(self, provider)
|
|
*
|
|
* def reset_last_overriding(self): # <<<<<<<<<<<<<<
|
|
* """Reset last overriding provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_11);
|
|
__Pyx_XDECREF(__pyx_t_12);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.reset_last_overriding", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":196
|
|
* self.__last_overriding = None
|
|
*
|
|
* def reset_override(self): # <<<<<<<<<<<<<<
|
|
* """Reset all overriding providers.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_15reset_override(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider_14reset_override[] = "Reset all overriding providers.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_15reset_override(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset_override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_14reset_override(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_14reset_override(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
int __pyx_t_10;
|
|
int __pyx_t_11;
|
|
__Pyx_RefNannySetupContext("reset_override", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":201
|
|
* :rtype: None
|
|
* """
|
|
* with self.overriding_lock: # <<<<<<<<<<<<<<
|
|
* self.__overridden = tuple()
|
|
* self.__last_overriding = None
|
|
*/
|
|
/*with:*/ {
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overriding_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 201, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 201, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 201, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 201, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
/*try:*/ {
|
|
{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
|
|
__Pyx_XGOTREF(__pyx_t_6);
|
|
__Pyx_XGOTREF(__pyx_t_7);
|
|
__Pyx_XGOTREF(__pyx_t_8);
|
|
/*try:*/ {
|
|
|
|
/* "dependency_injector/providers.pyx":202
|
|
* """
|
|
* with self.overriding_lock:
|
|
* self.__overridden = tuple() # <<<<<<<<<<<<<<
|
|
* self.__last_overriding = None
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 202, __pyx_L7_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___overridden);
|
|
__pyx_v_self->__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":203
|
|
* with self.overriding_lock:
|
|
* self.__overridden = tuple()
|
|
* self.__last_overriding = None # <<<<<<<<<<<<<<
|
|
*
|
|
* def delegate(self):
|
|
*/
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___last_overriding));
|
|
__pyx_v_self->__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None);
|
|
|
|
/* "dependency_injector/providers.pyx":201
|
|
* :rtype: None
|
|
* """
|
|
* with self.overriding_lock: # <<<<<<<<<<<<<<
|
|
* self.__overridden = tuple()
|
|
* self.__last_overriding = None
|
|
*/
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
goto __pyx_L12_try_end;
|
|
__pyx_L7_error:;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
/*except:*/ {
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.reset_override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(1, 201, __pyx_L9_except_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 201, __pyx_L9_except_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 201, __pyx_L9_except_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
if (__pyx_t_10 < 0) __PYX_ERR(1, 201, __pyx_L9_except_error)
|
|
__pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
|
|
if (__pyx_t_11) {
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__Pyx_XGIVEREF(__pyx_t_4);
|
|
__Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4);
|
|
__pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0;
|
|
__PYX_ERR(1, 201, __pyx_L9_except_error)
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
goto __pyx_L8_exception_handled;
|
|
}
|
|
__pyx_L9_except_error:;
|
|
__Pyx_XGIVEREF(__pyx_t_6);
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_XGIVEREF(__pyx_t_8);
|
|
__Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
|
|
goto __pyx_L1_error;
|
|
__pyx_L8_exception_handled:;
|
|
__Pyx_XGIVEREF(__pyx_t_6);
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_XGIVEREF(__pyx_t_8);
|
|
__Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
|
|
__pyx_L12_try_end:;
|
|
}
|
|
}
|
|
/*finally:*/ {
|
|
/*normal exit:*/{
|
|
if (__pyx_t_2) {
|
|
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, NULL);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 201, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
}
|
|
goto __pyx_L16;
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
goto __pyx_L1_error;
|
|
__pyx_L16:;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":196
|
|
* self.__last_overriding = None
|
|
*
|
|
* def reset_override(self): # <<<<<<<<<<<<<<
|
|
* """Reset all overriding providers.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.reset_override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":205
|
|
* self.__last_overriding = None
|
|
*
|
|
* def delegate(self): # <<<<<<<<<<<<<<
|
|
* """Return provider's delegate.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_17delegate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider_16delegate[] = "Return provider's delegate.\n\n :rtype: :py:class:`Delegate`\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_17delegate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("delegate (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_16delegate(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_16delegate(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("delegate", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":210
|
|
* :rtype: :py:class:`Delegate`
|
|
* """
|
|
* return Delegate(self) # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__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, 210, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":205
|
|
* self.__last_overriding = None
|
|
*
|
|
* def delegate(self): # <<<<<<<<<<<<<<
|
|
* """Return provider's delegate.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.delegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":213
|
|
*
|
|
* @property
|
|
* def provider(self): # <<<<<<<<<<<<<<
|
|
* """Return provider's delegate.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_8provider_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_8provider_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_8provider___get__(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_8provider___get__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":218
|
|
* :rtype: :py:class:`Delegate`
|
|
* """
|
|
* return self.delegate() # <<<<<<<<<<<<<<
|
|
*
|
|
* 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, 218, __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, 218, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":213
|
|
*
|
|
* @property
|
|
* def provider(self): # <<<<<<<<<<<<<<
|
|
* """Return provider's delegate.
|
|
*
|
|
*/
|
|
|
|
/* 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:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":220
|
|
* return self.delegate()
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Providing strategy implementation.
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_8Provider__provide(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 220, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Provider_19_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 220, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 220, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 220, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 220, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":227
|
|
* overridden provider is called. Need to be overridden in subclasses.
|
|
* """
|
|
* raise NotImplementedError() # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef void _copy_overridings(self, Provider copied, dict memo):
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 227, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":220
|
|
* return self.delegate()
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Providing strategy implementation.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider_18_provide[] = "Providing strategy implementation.\n\n Abstract protected method that implements providing strategy of\n particular provider. Current method is called every time when not\n overridden provider is called. Need to be overridden in subclasses.\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 220, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 220, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 220, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 220, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 220, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_18_provide(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_18_provide(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Provider__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 220, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":229
|
|
* raise NotImplementedError()
|
|
*
|
|
* cpdef void _copy_overridings(self, Provider copied, dict memo): # <<<<<<<<<<<<<<
|
|
* """Copy provider overridings to a newly copied provider."""
|
|
* copied.__overridden = deepcopy(self.__overridden, memo)
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_21_copy_overridings(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static void __pyx_f_19dependency_injector_9providers_8Provider__copy_overridings(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_copied, PyObject *__pyx_v_memo, int __pyx_skip_dispatch) {
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
__Pyx_RefNannySetupContext("_copy_overridings", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_overridings); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Provider_21_copy_overridings)) {
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_copied), __pyx_v_memo};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_copied), __pyx_v_memo};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 229, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_copied));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_copied));
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_copied));
|
|
__Pyx_INCREF(__pyx_v_memo);
|
|
__Pyx_GIVEREF(__pyx_v_memo);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_memo);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":231
|
|
* cpdef void _copy_overridings(self, Provider copied, dict memo):
|
|
* """Copy provider overridings to a newly copied provider."""
|
|
* copied.__overridden = deepcopy(self.__overridden, memo) # <<<<<<<<<<<<<<
|
|
* copied.__last_overriding = deepcopy(self.__last_overriding, memo)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___overridden;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = __pyx_v_memo;
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 231, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 231, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_copied->__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v_copied->__pyx___overridden);
|
|
__pyx_v_copied->__pyx___overridden = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":232
|
|
* """Copy provider overridings to a newly copied provider."""
|
|
* copied.__overridden = deepcopy(self.__overridden, memo)
|
|
* copied.__last_overriding = deepcopy(self.__last_overriding, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx___last_overriding);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = __pyx_v_memo;
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 232, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_copied->__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_copied->__pyx___last_overriding));
|
|
__pyx_v_copied->__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":229
|
|
* raise NotImplementedError()
|
|
*
|
|
* cpdef void _copy_overridings(self, Provider copied, dict memo): # <<<<<<<<<<<<<<
|
|
* """Copy provider overridings to a newly copied provider."""
|
|
* copied.__overridden = deepcopy(self.__overridden, memo)
|
|
*/
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_WriteUnraisable("dependency_injector.providers.Provider._copy_overridings", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_21_copy_overridings(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Provider_20_copy_overridings[] = "Copy provider overridings to a newly copied provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_21_copy_overridings(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_copied = 0;
|
|
PyObject *__pyx_v_memo = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_copy_overridings (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_copied,&__pyx_n_s_memo,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_copied)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_copy_overridings", 1, 2, 2, 1); __PYX_ERR(1, 229, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_copy_overridings") < 0)) __PYX_ERR(1, 229, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)values[0]);
|
|
__pyx_v_memo = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_copy_overridings", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 229, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider._copy_overridings", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_copied), __pyx_ptype_19dependency_injector_9providers_Provider, 1, "copied", 0))) __PYX_ERR(1, 229, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 229, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_20_copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), __pyx_v_copied, __pyx_v_memo);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_20_copy_overridings(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_copied, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_copy_overridings", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_void_to_None(__pyx_f_19dependency_injector_9providers_8Provider__copy_overridings(__pyx_v_self, __pyx_v_copied, __pyx_v_memo, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider._copy_overridings", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_22__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_22__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx___overridden);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Provider, (type(self), 0x0f5c5dd, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_2;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Provider, (type(self), 0x0f5c5dd, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Provider, (type(self), 0x0f5c5dd, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_Provider, (type(self), 0x0f5c5dd, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Provider); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_16106973);
|
|
__Pyx_GIVEREF(__pyx_int_16106973);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_16106973);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Provider, (type(self), 0x0f5c5dd, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_Provider, (type(self), 0x0f5c5dd, None), state
|
|
* else:
|
|
* return __pyx_unpickle_Provider, (type(self), 0x0f5c5dd, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Provider__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Provider); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_16106973);
|
|
__Pyx_GIVEREF(__pyx_int_16106973);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_16106973);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Provider, (type(self), 0x0f5c5dd, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Provider__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Provider_24__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_24__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_Provider, (type(self), 0x0f5c5dd, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Provider__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Provider__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Provider, (type(self), 0x0f5c5dd, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Provider__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Provider.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":245
|
|
* """
|
|
*
|
|
* def __init__(self, provides): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_6Object_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_6Object___init__[] = "Initializer.\n\n :param provides: Value that have to be provided.\n :type provides: object\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_6Object___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_6Object_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provides = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 245, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_provides = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 245, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Object.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_6Object___init__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self), __pyx_v_provides);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_6Object___init__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_provides) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":251
|
|
* :type provides: object
|
|
* """
|
|
* self.__provides = provides # <<<<<<<<<<<<<<
|
|
* super(Object, self).__init__()
|
|
*
|
|
*/
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___provides);
|
|
__pyx_v_self->__pyx___provides = __pyx_v_provides;
|
|
|
|
/* "dependency_injector/providers.pyx":252
|
|
* """
|
|
* self.__provides = provides
|
|
* super(Object, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 252, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 252, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":245
|
|
* """
|
|
*
|
|
* def __init__(self, provides): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Object.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":254
|
|
* super(Object, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_6Object_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_v_copied = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":256
|
|
* def __deepcopy__(self, memo):
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 256, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 256, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 256, __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":257
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_copied != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":258
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__(self.__provides)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":257
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":260
|
|
* return copied
|
|
*
|
|
* copied = self.__class__(self.__provides) # <<<<<<<<<<<<<<
|
|
*
|
|
* self._copy_overridings(copied, memo)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 260, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self->__pyx___provides) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx___provides);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 260, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":262
|
|
* copied = self.__class__(self.__provides)
|
|
*
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 262, __pyx_L1_error)
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 262, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_Object *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":264
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":254
|
|
* super(Object, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Object.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_copied);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":266
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_5__str__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_6Object_4__str__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_6Object_4__str__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_5__str__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_4__str__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_4__str__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":271
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, provides=self.__provides) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __repr__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_v_self->__pyx___provides;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 271, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":266
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Object.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":273
|
|
* return represent_provider(provider=self, provides=self.__provides)
|
|
*
|
|
* def __repr__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_7__repr__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_6Object_6__repr__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_6Object_6__repr__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_7__repr__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_6__repr__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_6__repr__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__repr__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":278
|
|
* :rtype: str
|
|
* """
|
|
* return self.__str__() # <<<<<<<<<<<<<<
|
|
*
|
|
* 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_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 278, __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, 278, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":273
|
|
* return represent_provider(provider=self, provides=self.__provides)
|
|
*
|
|
* def __repr__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* 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.Object.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":280
|
|
* return self.__str__()
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided instance.
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 280, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_6Object_9_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 280, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 280, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 280, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 280, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":291
|
|
* :rtype: object
|
|
* """
|
|
* return self.__provides # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___provides);
|
|
__pyx_r = __pyx_v_self->__pyx___provides;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":280
|
|
* return self.__str__()
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided instance.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Object._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_6Object_8_provide[] = "Return provided instance.\n\n :param args: Tuple of context positional arguments.\n :type args: tuple[object]\n\n :param kwargs: Dictionary of context keyword arguments.\n :type kwargs: dict[str, object]\n\n :rtype: object\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 280, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 280, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 280, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Object._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 280, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 280, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_8_provide(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_8_provide(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_6Object__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 280, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Object._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_10__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_10__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx___provides);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Object, (type(self), 0x3f4a3b6, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx___provides != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Object, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Object, (type(self), 0x3f4a3b6, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_Object, (type(self), 0x3f4a3b6, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Object); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Object, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_Object, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
* return __pyx_unpickle_Object, (type(self), 0x3f4a3b6, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Object__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Object); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Object.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Object, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Object__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_6Object_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_6Object_12__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6Object_12__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_Object, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Object__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Object__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Object, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Object__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Object.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":304
|
|
* """
|
|
*
|
|
* def __init__(self, provides): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_8Delegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Delegate___init__[] = "Initializer.\n\n :param provides: Value that have to be provided.\n :type provides: :py:class:`Provider`\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Delegate___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_8Delegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provides = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 304, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_provides = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 304, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Delegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Delegate___init__(((struct __pyx_obj_19dependency_injector_9providers_Delegate *)__pyx_v_self), __pyx_v_provides);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_8Delegate___init__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, PyObject *__pyx_v_provides) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":310
|
|
* :type provides: :py:class:`Provider`
|
|
* """
|
|
* self.__provides = ensure_is_provider(provides) # <<<<<<<<<<<<<<
|
|
* super(Delegate, self).__init__()
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_ensure_is_provider(__pyx_v_provides, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 310, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___provides);
|
|
__pyx_v_self->__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":311
|
|
* """
|
|
* self.__provides = ensure_is_provider(provides)
|
|
* super(Delegate, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 311, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 311, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 311, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 311, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":304
|
|
* """
|
|
*
|
|
* def __init__(self, provides): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Delegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":313
|
|
* super(Delegate, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Delegate_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Delegate_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_Delegate *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_v_copied = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":315
|
|
* def __deepcopy__(self, memo):
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 315, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 315, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 315, __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":316
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_copied != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":317
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__(deepcopy(self.__provides, memo))
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":316
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":319
|
|
* return copied
|
|
*
|
|
* copied = self.__class__(deepcopy(self.__provides, memo)) # <<<<<<<<<<<<<<
|
|
*
|
|
* self._copy_overridings(copied, memo)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 319, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __pyx_v_self->__pyx___provides;
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 319, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 319, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 319, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":321
|
|
* copied = self.__class__(deepcopy(self.__provides, memo))
|
|
*
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 321, __pyx_L1_error)
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 321, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":323
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":313
|
|
* super(Delegate, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Delegate.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_copied);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":325
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_5__str__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Delegate_4__str__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Delegate_4__str__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_5__str__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Delegate_4__str__(((struct __pyx_obj_19dependency_injector_9providers_Delegate *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_4__str__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":330
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, provides=self.__provides) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __repr__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_v_self->__pyx___provides;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 330, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":325
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Delegate.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":332
|
|
* return represent_provider(provider=self, provides=self.__provides)
|
|
*
|
|
* def __repr__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_7__repr__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Delegate_6__repr__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Delegate_6__repr__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_7__repr__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Delegate_6__repr__(((struct __pyx_obj_19dependency_injector_9providers_Delegate *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_6__repr__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__repr__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":337
|
|
* :rtype: str
|
|
* """
|
|
* return self.__str__() # <<<<<<<<<<<<<<
|
|
*
|
|
* 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_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 337, __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, 337, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":332
|
|
* return represent_provider(provider=self, provides=self.__provides)
|
|
*
|
|
* def __repr__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* 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.Delegate.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":339
|
|
* return self.__str__()
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided instance.
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_8Delegate__provide(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 339, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Delegate_9_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 339, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 339, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 339, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 339, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":350
|
|
* :rtype: object
|
|
* """
|
|
* return self.__provides # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___provides);
|
|
__pyx_r = __pyx_v_self->__pyx___provides;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":339
|
|
* return self.__str__()
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided instance.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Delegate._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Delegate_8_provide[] = "Return provided instance.\n\n :param args: Tuple of context positional arguments.\n :type args: tuple[object]\n\n :param kwargs: Dictionary of context keyword arguments.\n :type kwargs: dict[str, object]\n\n :rtype: object\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_9_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 339, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 339, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 339, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Delegate._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 339, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 339, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Delegate_8_provide(((struct __pyx_obj_19dependency_injector_9providers_Delegate *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_8_provide(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Delegate__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 339, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Delegate._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Delegate_10__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Delegate *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_10__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx___provides);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Delegate, (type(self), 0x3f4a3b6, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx___provides != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Delegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Delegate, (type(self), 0x3f4a3b6, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_Delegate, (type(self), 0x3f4a3b6, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Delegate); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Delegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_Delegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
* return __pyx_unpickle_Delegate, (type(self), 0x3f4a3b6, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Delegate__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Delegate); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Delegate.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Delegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Delegate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Delegate_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Delegate_12__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Delegate *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Delegate_12__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_Delegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Delegate__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegate__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Delegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Delegate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Delegate.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":375
|
|
* """
|
|
*
|
|
* def __init__(self, type instance_of=object): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__instance_of = instance_of
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_10Dependency_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_10Dependency___init__[] = "Initializer.";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_10Dependency___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_10Dependency_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyTypeObject *__pyx_v_instance_of = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_instance_of,0};
|
|
PyObject* values[1] = {0};
|
|
values[0] = (PyObject *)__pyx_k__2;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (kw_args > 0) {
|
|
PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance_of);
|
|
if (value) { values[0] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 375, __pyx_L3_error)
|
|
}
|
|
} else {
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
__pyx_v_instance_of = ((PyTypeObject*)values[0]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 375, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Dependency.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_instance_of), (&PyType_Type), 1, "instance_of", 1))) __PYX_ERR(1, 375, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency___init__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), __pyx_v_instance_of);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_10Dependency___init__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyTypeObject *__pyx_v_instance_of) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":377
|
|
* def __init__(self, type instance_of=object):
|
|
* """Initializer."""
|
|
* self.__instance_of = instance_of # <<<<<<<<<<<<<<
|
|
* super(Dependency, self).__init__()
|
|
*
|
|
*/
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_instance_of));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_instance_of));
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___instance_of);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___instance_of));
|
|
__pyx_v_self->__pyx___instance_of = __pyx_v_instance_of;
|
|
|
|
/* "dependency_injector/providers.pyx":378
|
|
* """Initializer."""
|
|
* self.__instance_of = instance_of
|
|
* super(Dependency, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 378, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 378, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 378, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 378, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":375
|
|
* """
|
|
*
|
|
* def __init__(self, type instance_of=object): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__instance_of = instance_of
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Dependency.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":380
|
|
* super(Dependency, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_10Dependency_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_v_copied = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":382
|
|
* def __deepcopy__(self, memo):
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 382, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 382, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 382, __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":383
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_copied != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":384
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__(self.__instance_of)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":383
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":386
|
|
* return copied
|
|
*
|
|
* copied = self.__class__(self.__instance_of) # <<<<<<<<<<<<<<
|
|
*
|
|
* self._copy_overridings(copied, memo)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 386, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self->__pyx___instance_of)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self->__pyx___instance_of));
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 386, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":388
|
|
* copied = self.__class__(self.__instance_of)
|
|
*
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 388, __pyx_L1_error)
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 388, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":390
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* def __call__(self, *args, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":380
|
|
* super(Dependency, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Dependency.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_copied);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":392
|
|
* return copied
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided instance.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_10Dependency_4__call__[] = "Return provided instance.\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :rtype: object\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_10Dependency_4__call__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
|
|
if (unlikely(__pyx_kwds)) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_4__call__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_4__call__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_v_instance = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__call__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":401
|
|
* cdef object instance
|
|
*
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('Dependency is not defined')
|
|
*
|
|
*/
|
|
__pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) == Py_None);
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":402
|
|
*
|
|
* if self.__last_overriding is None:
|
|
* raise Error('Dependency is not defined') # <<<<<<<<<<<<<<
|
|
*
|
|
* instance = self.__last_overriding(*args, **kwargs)
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 402, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Dependency_is_not_defined) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Dependency_is_not_defined);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 402, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 402, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":401
|
|
* cdef object instance
|
|
*
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('Dependency is not defined')
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":404
|
|
* raise Error('Dependency is not defined')
|
|
*
|
|
* instance = self.__last_overriding(*args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* if not isinstance(instance, self.instance_of):
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 404, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v_instance = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":406
|
|
* instance = self.__last_overriding(*args, **kwargs)
|
|
*
|
|
* if not isinstance(instance, self.instance_of): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} is not an '.format(instance) +
|
|
* 'instance of {0}'.format(self.instance_of))
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_instance_of); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 406, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 406, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
/* "dependency_injector/providers.pyx":407
|
|
*
|
|
* if not isinstance(instance, self.instance_of):
|
|
* raise Error('{0} is not an '.format(instance) + # <<<<<<<<<<<<<<
|
|
* 'instance of {0}'.format(self.instance_of))
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 407, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_is_not_an, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 407, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_instance);
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 407, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":408
|
|
* if not isinstance(instance, self.instance_of):
|
|
* raise Error('{0} is not an '.format(instance) +
|
|
* 'instance of {0}'.format(self.instance_of)) # <<<<<<<<<<<<<<
|
|
*
|
|
* return instance
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_instance_of_0, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 408, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_instance_of); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 408, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 408, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":407
|
|
*
|
|
* if not isinstance(instance, self.instance_of):
|
|
* raise Error('{0} is not an '.format(instance) + # <<<<<<<<<<<<<<
|
|
* 'instance of {0}'.format(self.instance_of))
|
|
*
|
|
*/
|
|
__pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 407, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 407, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 407, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":406
|
|
* instance = self.__last_overriding(*args, **kwargs)
|
|
*
|
|
* if not isinstance(instance, self.instance_of): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} is not an '.format(instance) +
|
|
* 'instance of {0}'.format(self.instance_of))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":410
|
|
* 'instance of {0}'.format(self.instance_of))
|
|
*
|
|
* return instance # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_instance);
|
|
__pyx_r = __pyx_v_instance;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":392
|
|
* return copied
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided instance.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Dependency.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_instance);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":412
|
|
* return instance
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_7__str__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_10Dependency_6__str__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_10Dependency_6__str__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_7__str__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_6__str__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_6__str__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":417
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, provides=self.__instance_of) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __repr__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx___instance_of);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 417, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":412
|
|
* return instance
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Dependency.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":419
|
|
* return represent_provider(provider=self, provides=self.__instance_of)
|
|
*
|
|
* def __repr__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_9__repr__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_10Dependency_8__repr__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_10Dependency_8__repr__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_9__repr__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_8__repr__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_8__repr__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__repr__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":424
|
|
* :rtype: str
|
|
* """
|
|
* return self.__str__() # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 424, __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, 424, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":419
|
|
* return represent_provider(provider=self, provides=self.__instance_of)
|
|
*
|
|
* def __repr__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* 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.Dependency.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":427
|
|
*
|
|
* @property
|
|
* def instance_of(self): # <<<<<<<<<<<<<<
|
|
* """Return class of required dependency."""
|
|
* return self.__instance_of
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_11instance_of_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_11instance_of_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_11instance_of___get__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_11instance_of___get__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":429
|
|
* def instance_of(self):
|
|
* """Return class of required dependency."""
|
|
* return self.__instance_of # <<<<<<<<<<<<<<
|
|
*
|
|
* def provided_by(self, provider):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___instance_of));
|
|
__pyx_r = ((PyObject *)__pyx_v_self->__pyx___instance_of);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":427
|
|
*
|
|
* @property
|
|
* def instance_of(self): # <<<<<<<<<<<<<<
|
|
* """Return class of required dependency."""
|
|
* return self.__instance_of
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":431
|
|
* return self.__instance_of
|
|
*
|
|
* def provided_by(self, provider): # <<<<<<<<<<<<<<
|
|
* """Set external dependency provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_11provided_by(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_10Dependency_10provided_by[] = "Set external dependency provider.\n\n :param provider: Provider that provides required dependency.\n :type provider: :py:class:`Provider`\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_11provided_by(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("provided_by (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_10provided_by(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v_provider));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_10provided_by(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("provided_by", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":439
|
|
* :rtype: None
|
|
* """
|
|
* return self.override(provider) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 439, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provider);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 439, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":431
|
|
* return self.__instance_of
|
|
*
|
|
* def provided_by(self, provider): # <<<<<<<<<<<<<<
|
|
* """Set external dependency provider.
|
|
*
|
|
*/
|
|
|
|
/* 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.Dependency.provided_by", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_12__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_12__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__instance_of, self.__last_overriding, self.__overridden) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___instance_of));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___instance_of));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx___instance_of));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__instance_of, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instance_of, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__instance_of is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instance_of, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__instance_of is not None or self.__last_overriding is not None or self.__overridden is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Dependency, (type(self), 0xf1f5217, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (__pyx_v_self->__pyx___instance_of != ((PyTypeObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instance_of is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Dependency, (type(self), 0xf1f5217, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__instance_of is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Dependency, (type(self), 0xf1f5217, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_Dependency, (type(self), 0xf1f5217, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Dependency); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_253710871);
|
|
__Pyx_GIVEREF(__pyx_int_253710871);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_253710871);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instance_of is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Dependency, (type(self), 0xf1f5217, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_Dependency, (type(self), 0xf1f5217, None), state
|
|
* else:
|
|
* return __pyx_unpickle_Dependency, (type(self), 0xf1f5217, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Dependency__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Dependency); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_253710871);
|
|
__Pyx_GIVEREF(__pyx_int_253710871);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_253710871);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Dependency.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Dependency, (type(self), 0xf1f5217, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Dependency__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_10Dependency_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_10Dependency_14__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10Dependency_14__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_Dependency, (type(self), 0xf1f5217, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Dependency__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Dependency__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Dependency, (type(self), 0xf1f5217, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Dependency__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Dependency.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18ExternalDependency_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18ExternalDependency_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_18ExternalDependency___reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18ExternalDependency___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__instance_of, self.__last_overriding, self.__overridden) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instance_of));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instance_of));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instance_of));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__instance_of, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instance_of, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__instance_of is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instance_of, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__instance_of is not None or self.__last_overriding is not None or self.__overridden is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_ExternalDependency, (type(self), 0xf1f5217, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___instance_of != ((PyTypeObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instance_of is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_ExternalDependency, (type(self), 0xf1f5217, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__instance_of is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_ExternalDependency, (type(self), 0xf1f5217, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_ExternalDependency, (type(self), 0xf1f5217, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_ExternalDependenc); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_253710871);
|
|
__Pyx_GIVEREF(__pyx_int_253710871);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_253710871);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instance_of is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_ExternalDependency, (type(self), 0xf1f5217, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_ExternalDependency, (type(self), 0xf1f5217, None), state
|
|
* else:
|
|
* return __pyx_unpickle_ExternalDependency, (type(self), 0xf1f5217, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_ExternalDependency__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ExternalDependenc); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_253710871);
|
|
__Pyx_GIVEREF(__pyx_int_253710871);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_253710871);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ExternalDependency.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_ExternalDependency, (type(self), 0xf1f5217, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ExternalDependency__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18ExternalDependency_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18ExternalDependency_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_18ExternalDependency_2__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18ExternalDependency_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_ExternalDependency, (type(self), 0xf1f5217, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_ExternalDependency__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_ExternalDependency__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_ExternalDependency, (type(self), 0xf1f5217, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ExternalDependency__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ExternalDependency.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":503
|
|
* """
|
|
*
|
|
* def __init__(self, provides=None, **dependencies): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__providers = dependencies
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_21DependenciesContainer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_21DependenciesContainer___init__[] = "Initializer.";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_21DependenciesContainer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provides = 0;
|
|
PyObject *__pyx_v_dependencies = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
__pyx_v_dependencies = PyDict_New(); if (unlikely(!__pyx_v_dependencies)) return -1;
|
|
__Pyx_GOTREF(__pyx_v_dependencies);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0};
|
|
PyObject* values[1] = {0};
|
|
values[0] = ((PyObject *)Py_None);
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (kw_args > 0) {
|
|
PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides);
|
|
if (value) { values[0] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_dependencies, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 503, __pyx_L3_error)
|
|
}
|
|
} else {
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
__pyx_v_provides = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 503, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_v_dependencies); __pyx_v_dependencies = 0;
|
|
__Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___init__(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self), __pyx_v_provides, __pyx_v_dependencies);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_dependencies);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___init__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_dependencies) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":505
|
|
* def __init__(self, provides=None, **dependencies):
|
|
* """Initializer."""
|
|
* self.__providers = dependencies # <<<<<<<<<<<<<<
|
|
*
|
|
* if provides:
|
|
*/
|
|
__Pyx_INCREF(__pyx_v_dependencies);
|
|
__Pyx_GIVEREF(__pyx_v_dependencies);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___providers);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___providers);
|
|
__pyx_v_self->__pyx___providers = __pyx_v_dependencies;
|
|
|
|
/* "dependency_injector/providers.pyx":507
|
|
* self.__providers = dependencies
|
|
*
|
|
* if provides: # <<<<<<<<<<<<<<
|
|
* self._override_providers(container=provides)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_provides); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 507, __pyx_L1_error)
|
|
if (__pyx_t_1) {
|
|
|
|
/* "dependency_injector/providers.pyx":508
|
|
*
|
|
* if provides:
|
|
* self._override_providers(container=provides) # <<<<<<<<<<<<<<
|
|
*
|
|
* super(DependenciesContainer, self).__init__(provides)
|
|
*/
|
|
__pyx_t_2 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_override_providers(__pyx_v_self, __pyx_v_provides, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 508, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":507
|
|
* self.__providers = dependencies
|
|
*
|
|
* if provides: # <<<<<<<<<<<<<<
|
|
* self._override_providers(container=provides)
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":510
|
|
* self._override_providers(container=provides)
|
|
*
|
|
* super(DependenciesContainer, self).__init__(provides) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 510, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 510, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 510, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_provides);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 510, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":503
|
|
* """
|
|
*
|
|
* def __init__(self, provides=None, **dependencies): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__providers = dependencies
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":512
|
|
* super(DependenciesContainer, self).__init__(provides)
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* cdef DependenciesContainer copied
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21DependenciesContainer_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_copied = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":516
|
|
* cdef DependenciesContainer copied
|
|
*
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 516, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_DependenciesContainer))))) __PYX_ERR(1, 516, __pyx_L1_error)
|
|
__pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":517
|
|
*
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_copied) != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":518
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__()
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_copied));
|
|
__pyx_r = ((PyObject *)__pyx_v_copied);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":517
|
|
*
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":520
|
|
* return copied
|
|
*
|
|
* copied = self.__class__() # <<<<<<<<<<<<<<
|
|
* copied.__provides = deepcopy(self.__provides, memo)
|
|
* copied.__providers = deepcopy(self.__providers, memo)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 520, __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, 520, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_DependenciesContainer))))) __PYX_ERR(1, 520, __pyx_L1_error)
|
|
__Pyx_DECREF_SET(__pyx_v_copied, ((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":521
|
|
*
|
|
* copied = self.__class__()
|
|
* copied.__provides = deepcopy(self.__provides, memo) # <<<<<<<<<<<<<<
|
|
* copied.__providers = deepcopy(self.__providers, memo)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx_base.__pyx___provides;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 521, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 521, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_copied->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v_copied->__pyx_base.__pyx___provides);
|
|
__pyx_v_copied->__pyx_base.__pyx___provides = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":522
|
|
* copied = self.__class__()
|
|
* copied.__provides = deepcopy(self.__provides, memo)
|
|
* copied.__providers = deepcopy(self.__providers, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* self._copy_overridings(copied, memo)
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___providers;
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 522, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 522, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 522, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_copied->__pyx___providers);
|
|
__Pyx_DECREF(__pyx_v_copied->__pyx___providers);
|
|
__pyx_v_copied->__pyx___providers = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":524
|
|
* copied.__providers = deepcopy(self.__providers, memo)
|
|
*
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 524, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":526
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* def __getattr__(self, name):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_copied));
|
|
__pyx_r = ((PyObject *)__pyx_v_copied);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":512
|
|
* super(DependenciesContainer, self).__init__(provides)
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* cdef DependenciesContainer copied
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_copied);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":528
|
|
* return copied
|
|
*
|
|
* def __getattr__(self, name): # <<<<<<<<<<<<<<
|
|
* """Return dependency provider."""
|
|
* if name.startswith('__') and name.endswith('__'):
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_5__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_4__getattr__[] = "Return dependency provider.";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer_4__getattr__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_5__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21DependenciesContainer_4__getattr__(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self), ((PyObject *)__pyx_v_name));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_4__getattr__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_name) {
|
|
PyObject *__pyx_v_provider = NULL;
|
|
PyObject *__pyx_v_container = NULL;
|
|
PyObject *__pyx_v_dependency_provider = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__getattr__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":530
|
|
* def __getattr__(self, name):
|
|
* """Return dependency provider."""
|
|
* if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<<
|
|
* raise AttributeError(
|
|
* '\'{cls}\' object has no attribute '
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 530, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 530, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 530, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 530, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_n_s__3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s__3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 530, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 530, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_1 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
/* "dependency_injector/providers.pyx":533
|
|
* raise AttributeError(
|
|
* '\'{cls}\' object has no attribute '
|
|
* '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<<
|
|
* attribute_name=name))
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 533, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 533, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 533, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 533, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 533, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":534
|
|
* '\'{cls}\' object has no attribute '
|
|
* '\'{attribute_name}\''.format(cls=self.__class__.__name__,
|
|
* attribute_name=name)) # <<<<<<<<<<<<<<
|
|
*
|
|
* provider = self.__providers.get(name)
|
|
*/
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_name, __pyx_v_name) < 0) __PYX_ERR(1, 533, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":533
|
|
* raise AttributeError(
|
|
* '\'{cls}\' object has no attribute '
|
|
* '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<<
|
|
* attribute_name=name))
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 533, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":531
|
|
* """Return dependency provider."""
|
|
* if name.startswith('__') and name.endswith('__'):
|
|
* raise AttributeError( # <<<<<<<<<<<<<<
|
|
* '\'{cls}\' object has no attribute '
|
|
* '\'{attribute_name}\''.format(cls=self.__class__.__name__,
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 531, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 531, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":530
|
|
* def __getattr__(self, name):
|
|
* """Return dependency provider."""
|
|
* if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<<
|
|
* raise AttributeError(
|
|
* '\'{cls}\' object has no attribute '
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":536
|
|
* attribute_name=name))
|
|
*
|
|
* provider = self.__providers.get(name) # <<<<<<<<<<<<<<
|
|
* if not provider:
|
|
* provider = Dependency()
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
|
|
__PYX_ERR(1, 536, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___providers, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 536, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v_provider = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":537
|
|
*
|
|
* provider = self.__providers.get(name)
|
|
* if not provider: # <<<<<<<<<<<<<<
|
|
* provider = Dependency()
|
|
* self.__providers[name] = provider
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_provider); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 537, __pyx_L1_error)
|
|
__pyx_t_5 = ((!__pyx_t_1) != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "dependency_injector/providers.pyx":538
|
|
* provider = self.__providers.get(name)
|
|
* if not provider:
|
|
* provider = Dependency() # <<<<<<<<<<<<<<
|
|
* self.__providers[name] = provider
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 538, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF_SET(__pyx_v_provider, __pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":539
|
|
* if not provider:
|
|
* provider = Dependency()
|
|
* self.__providers[name] = provider # <<<<<<<<<<<<<<
|
|
*
|
|
* container = self.__call__()
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(1, 539, __pyx_L1_error)
|
|
}
|
|
if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___providers, __pyx_v_name, __pyx_v_provider) < 0)) __PYX_ERR(1, 539, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":541
|
|
* self.__providers[name] = provider
|
|
*
|
|
* container = self.__call__() # <<<<<<<<<<<<<<
|
|
* if container:
|
|
* dependency_provider = container.providers.get(name)
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 541, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_2)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 541, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_container = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":542
|
|
*
|
|
* container = self.__call__()
|
|
* if container: # <<<<<<<<<<<<<<
|
|
* dependency_provider = container.providers.get(name)
|
|
* if dependency_provider:
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_container); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 542, __pyx_L1_error)
|
|
if (__pyx_t_5) {
|
|
|
|
/* "dependency_injector/providers.pyx":543
|
|
* container = self.__call__()
|
|
* if container:
|
|
* dependency_provider = container.providers.get(name) # <<<<<<<<<<<<<<
|
|
* if dependency_provider:
|
|
* provider.override(dependency_provider)
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 543, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 543, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 543, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_dependency_provider = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":544
|
|
* if container:
|
|
* dependency_provider = container.providers.get(name)
|
|
* if dependency_provider: # <<<<<<<<<<<<<<
|
|
* provider.override(dependency_provider)
|
|
*
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dependency_provider); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 544, __pyx_L1_error)
|
|
if (__pyx_t_5) {
|
|
|
|
/* "dependency_injector/providers.pyx":545
|
|
* dependency_provider = container.providers.get(name)
|
|
* if dependency_provider:
|
|
* provider.override(dependency_provider) # <<<<<<<<<<<<<<
|
|
*
|
|
* return provider
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 545, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_dependency_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dependency_provider);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 545, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":544
|
|
* if container:
|
|
* dependency_provider = container.providers.get(name)
|
|
* if dependency_provider: # <<<<<<<<<<<<<<
|
|
* provider.override(dependency_provider)
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":542
|
|
*
|
|
* container = self.__call__()
|
|
* if container: # <<<<<<<<<<<<<<
|
|
* dependency_provider = container.providers.get(name)
|
|
* if dependency_provider:
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":537
|
|
*
|
|
* provider = self.__providers.get(name)
|
|
* if not provider: # <<<<<<<<<<<<<<
|
|
* provider = Dependency()
|
|
* self.__providers[name] = provider
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":547
|
|
* provider.override(dependency_provider)
|
|
*
|
|
* return provider # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_provider);
|
|
__pyx_r = __pyx_v_provider;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":528
|
|
* return copied
|
|
*
|
|
* def __getattr__(self, name): # <<<<<<<<<<<<<<
|
|
* """Return dependency provider."""
|
|
* if name.startswith('__') and name.endswith('__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_provider);
|
|
__Pyx_XDECREF(__pyx_v_container);
|
|
__Pyx_XDECREF(__pyx_v_dependency_provider);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":550
|
|
*
|
|
* @property
|
|
* def providers(self): # <<<<<<<<<<<<<<
|
|
* """Read-only dictionary of dependency providers."""
|
|
* return self.__providers
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_9providers_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_9providers_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21DependenciesContainer_9providers___get__(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_9providers___get__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":552
|
|
* def providers(self):
|
|
* """Read-only dictionary of dependency providers."""
|
|
* return self.__providers # <<<<<<<<<<<<<<
|
|
*
|
|
* def override(self, provider):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___providers);
|
|
__pyx_r = __pyx_v_self->__pyx___providers;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":550
|
|
*
|
|
* @property
|
|
* def providers(self): # <<<<<<<<<<<<<<
|
|
* """Read-only dictionary of dependency providers."""
|
|
* return self.__providers
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":554
|
|
* return self.__providers
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_7override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_6override[] = "Override provider with another provider.\n\n :param provider: Overriding provider.\n :type provider: :py:class:`Provider`\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_7override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21DependenciesContainer_6override(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self), ((PyObject *)__pyx_v_provider));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_6override(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("override", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":565
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* self._override_providers(container=provider) # <<<<<<<<<<<<<<
|
|
* return super(DependenciesContainer, self).override(provider)
|
|
*
|
|
*/
|
|
__pyx_t_1 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_override_providers(__pyx_v_self, __pyx_v_provider, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 565, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":566
|
|
* """
|
|
* self._override_providers(container=provider)
|
|
* return super(DependenciesContainer, self).override(provider) # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset_last_overriding(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 566, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provider);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":554
|
|
* return self.__providers
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* 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.DependenciesContainer.override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":568
|
|
* return super(DependenciesContainer, self).override(provider)
|
|
*
|
|
* def reset_last_overriding(self): # <<<<<<<<<<<<<<
|
|
* """Reset last overriding provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_9reset_last_overriding(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_8reset_last_overriding[] = "Reset last overriding provider.\n\n :raise: :py:exc:`dependency_injector.errors.Error` if provider is not\n overridden.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_9reset_last_overriding(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset_last_overriding (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21DependenciesContainer_8reset_last_overriding(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_8reset_last_overriding(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self) {
|
|
PyObject *__pyx_v_child = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
Py_ssize_t __pyx_t_3;
|
|
PyObject *(*__pyx_t_4)(PyObject *);
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
int __pyx_t_11;
|
|
__Pyx_RefNannySetupContext("reset_last_overriding", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":576
|
|
* :rtype: None
|
|
* """
|
|
* for child in self.__providers.values(): # <<<<<<<<<<<<<<
|
|
* try:
|
|
* child.reset_last_overriding()
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
|
|
__PYX_ERR(1, 576, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 576, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
|
|
__pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
|
|
__pyx_t_4 = NULL;
|
|
} else {
|
|
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 576, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 576, __pyx_L1_error)
|
|
}
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
for (;;) {
|
|
if (likely(!__pyx_t_4)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_2))) {
|
|
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 576, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 576, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 576, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 576, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
}
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_4(__pyx_t_2);
|
|
if (unlikely(!__pyx_t_1)) {
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
else __PYX_ERR(1, 576, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
}
|
|
__Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":577
|
|
* """
|
|
* for child in self.__providers.values():
|
|
* try: # <<<<<<<<<<<<<<
|
|
* child.reset_last_overriding()
|
|
* except Error:
|
|
*/
|
|
{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
|
|
__Pyx_XGOTREF(__pyx_t_5);
|
|
__Pyx_XGOTREF(__pyx_t_6);
|
|
__Pyx_XGOTREF(__pyx_t_7);
|
|
/*try:*/ {
|
|
|
|
/* "dependency_injector/providers.pyx":578
|
|
* for child in self.__providers.values():
|
|
* try:
|
|
* child.reset_last_overriding() # <<<<<<<<<<<<<<
|
|
* except Error:
|
|
* pass
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 578, __pyx_L5_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 578, __pyx_L5_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":577
|
|
* """
|
|
* for child in self.__providers.values():
|
|
* try: # <<<<<<<<<<<<<<
|
|
* child.reset_last_overriding()
|
|
* except Error:
|
|
*/
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
goto __pyx_L12_try_end;
|
|
__pyx_L5_error:;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":579
|
|
* try:
|
|
* child.reset_last_overriding()
|
|
* except Error: # <<<<<<<<<<<<<<
|
|
* pass
|
|
* super(DependenciesContainer, self).reset_last_overriding()
|
|
*/
|
|
__Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 579, __pyx_L7_except_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
__pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_10);
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
__Pyx_ErrRestore(__pyx_t_1, __pyx_t_8, __pyx_t_9);
|
|
__pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0;
|
|
if (__pyx_t_11) {
|
|
__Pyx_ErrRestore(0,0,0);
|
|
goto __pyx_L6_exception_handled;
|
|
}
|
|
goto __pyx_L7_except_error;
|
|
__pyx_L7_except_error:;
|
|
|
|
/* "dependency_injector/providers.pyx":577
|
|
* """
|
|
* for child in self.__providers.values():
|
|
* try: # <<<<<<<<<<<<<<
|
|
* child.reset_last_overriding()
|
|
* except Error:
|
|
*/
|
|
__Pyx_XGIVEREF(__pyx_t_5);
|
|
__Pyx_XGIVEREF(__pyx_t_6);
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
|
|
goto __pyx_L1_error;
|
|
__pyx_L6_exception_handled:;
|
|
__Pyx_XGIVEREF(__pyx_t_5);
|
|
__Pyx_XGIVEREF(__pyx_t_6);
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
|
|
__pyx_L12_try_end:;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":576
|
|
* :rtype: None
|
|
* """
|
|
* for child in self.__providers.values(): # <<<<<<<<<<<<<<
|
|
* try:
|
|
* child.reset_last_overriding()
|
|
*/
|
|
}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":581
|
|
* except Error:
|
|
* pass
|
|
* super(DependenciesContainer, self).reset_last_overriding() # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset_override(self):
|
|
*/
|
|
__pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 581, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 581, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 581, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_9, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":568
|
|
* return super(DependenciesContainer, self).override(provider)
|
|
*
|
|
* def reset_last_overriding(self): # <<<<<<<<<<<<<<
|
|
* """Reset last overriding provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer.reset_last_overriding", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_child);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":583
|
|
* super(DependenciesContainer, self).reset_last_overriding()
|
|
*
|
|
* def reset_override(self): # <<<<<<<<<<<<<<
|
|
* """Reset all overriding providers.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_11reset_override(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_10reset_override[] = "Reset all overriding providers.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_11reset_override(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset_override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21DependenciesContainer_10reset_override(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_10reset_override(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self) {
|
|
PyObject *__pyx_v_child = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
Py_ssize_t __pyx_t_3;
|
|
PyObject *(*__pyx_t_4)(PyObject *);
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("reset_override", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":588
|
|
* :rtype: None
|
|
* """
|
|
* for child in self.__providers.values(): # <<<<<<<<<<<<<<
|
|
* child.reset_override()
|
|
* super(DependenciesContainer, self).reset_override()
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
|
|
__PYX_ERR(1, 588, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
|
|
__pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
|
|
__pyx_t_4 = NULL;
|
|
} else {
|
|
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 588, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 588, __pyx_L1_error)
|
|
}
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
for (;;) {
|
|
if (likely(!__pyx_t_4)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_2))) {
|
|
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 588, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 588, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
}
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_4(__pyx_t_2);
|
|
if (unlikely(!__pyx_t_1)) {
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
else __PYX_ERR(1, 588, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
}
|
|
__Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":589
|
|
* """
|
|
* for child in self.__providers.values():
|
|
* child.reset_override() # <<<<<<<<<<<<<<
|
|
* super(DependenciesContainer, self).reset_override()
|
|
*
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 589, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_5, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 589, __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":588
|
|
* :rtype: None
|
|
* """
|
|
* for child in self.__providers.values(): # <<<<<<<<<<<<<<
|
|
* child.reset_override()
|
|
* super(DependenciesContainer, self).reset_override()
|
|
*/
|
|
}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":590
|
|
* for child in self.__providers.values():
|
|
* child.reset_override()
|
|
* super(DependenciesContainer, self).reset_override() # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef object _override_providers(self, object container):
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 590, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 590, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 590, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_1, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 590, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":583
|
|
* super(DependenciesContainer, self).reset_last_overriding()
|
|
*
|
|
* def reset_override(self): # <<<<<<<<<<<<<<
|
|
* """Reset all overriding providers.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer.reset_override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_child);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":592
|
|
* super(DependenciesContainer, self).reset_override()
|
|
*
|
|
* cpdef object _override_providers(self, object container): # <<<<<<<<<<<<<<
|
|
* """Override providers with providers from provided container."""
|
|
* for name, dependency_provider in container.providers.items():
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_13_override_providers(PyObject *__pyx_v_self, PyObject *__pyx_v_container); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_21DependenciesContainer__override_providers(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_container, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_v_name = NULL;
|
|
PyObject *__pyx_v_dependency_provider = NULL;
|
|
PyObject *__pyx_v_provider = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
Py_ssize_t __pyx_t_5;
|
|
PyObject *(*__pyx_t_6)(PyObject *);
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *(*__pyx_t_8)(PyObject *);
|
|
int __pyx_t_9;
|
|
int __pyx_t_10;
|
|
__Pyx_RefNannySetupContext("_override_providers", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_13_override_providers)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_container) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_container);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 592, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":594
|
|
* cpdef object _override_providers(self, object container):
|
|
* """Override providers with providers from provided container."""
|
|
* for name, dependency_provider in container.providers.items(): # <<<<<<<<<<<<<<
|
|
* provider = self.__providers.get(name)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_container, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_2)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
|
|
__pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
|
|
__pyx_t_6 = NULL;
|
|
} else {
|
|
__pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
}
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
for (;;) {
|
|
if (likely(!__pyx_t_6)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_3))) {
|
|
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
}
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_6(__pyx_t_3);
|
|
if (unlikely(!__pyx_t_1)) {
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
else __PYX_ERR(1, 594, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
}
|
|
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
|
|
PyObject* sequence = __pyx_t_1;
|
|
Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
|
|
if (unlikely(size != 2)) {
|
|
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
__PYX_ERR(1, 594, __pyx_L1_error)
|
|
}
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
|
|
__pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
|
|
} else {
|
|
__pyx_t_2 = PyList_GET_ITEM(sequence, 0);
|
|
__pyx_t_4 = PyList_GET_ITEM(sequence, 1);
|
|
}
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
#else
|
|
__pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
} else {
|
|
Py_ssize_t index = -1;
|
|
__pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
|
|
index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 594, __pyx_L1_error)
|
|
__pyx_t_8 = NULL;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
goto __pyx_L6_unpacking_done;
|
|
__pyx_L5_unpacking_failed:;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__pyx_t_8 = NULL;
|
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
__PYX_ERR(1, 594, __pyx_L1_error)
|
|
__pyx_L6_unpacking_done:;
|
|
}
|
|
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__Pyx_XDECREF_SET(__pyx_v_dependency_provider, __pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":595
|
|
* """Override providers with providers from provided container."""
|
|
* for name, dependency_provider in container.providers.items():
|
|
* provider = self.__providers.get(name) # <<<<<<<<<<<<<<
|
|
*
|
|
* if not provider:
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___providers == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
|
|
__PYX_ERR(1, 595, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___providers, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 595, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":597
|
|
* provider = self.__providers.get(name)
|
|
*
|
|
* if not provider: # <<<<<<<<<<<<<<
|
|
* continue
|
|
*
|
|
*/
|
|
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_provider); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 597, __pyx_L1_error)
|
|
__pyx_t_10 = ((!__pyx_t_9) != 0);
|
|
if (__pyx_t_10) {
|
|
|
|
/* "dependency_injector/providers.pyx":598
|
|
*
|
|
* if not provider:
|
|
* continue # <<<<<<<<<<<<<<
|
|
*
|
|
* if provider.last_overriding is dependency_provider:
|
|
*/
|
|
goto __pyx_L3_continue;
|
|
|
|
/* "dependency_injector/providers.pyx":597
|
|
* provider = self.__providers.get(name)
|
|
*
|
|
* if not provider: # <<<<<<<<<<<<<<
|
|
* continue
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":600
|
|
* continue
|
|
*
|
|
* if provider.last_overriding is dependency_provider: # <<<<<<<<<<<<<<
|
|
* continue
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_last_overriding); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 600, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_10 = (__pyx_t_1 == __pyx_v_dependency_provider);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_9 = (__pyx_t_10 != 0);
|
|
if (__pyx_t_9) {
|
|
|
|
/* "dependency_injector/providers.pyx":601
|
|
*
|
|
* if provider.last_overriding is dependency_provider:
|
|
* continue # <<<<<<<<<<<<<<
|
|
*
|
|
* provider.override(dependency_provider)
|
|
*/
|
|
goto __pyx_L3_continue;
|
|
|
|
/* "dependency_injector/providers.pyx":600
|
|
* continue
|
|
*
|
|
* if provider.last_overriding is dependency_provider: # <<<<<<<<<<<<<<
|
|
* continue
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":603
|
|
* continue
|
|
*
|
|
* provider.override(dependency_provider) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 603, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_2 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_2)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_dependency_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dependency_provider);
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 603, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":594
|
|
* cpdef object _override_providers(self, object container):
|
|
* """Override providers with providers from provided container."""
|
|
* for name, dependency_provider in container.providers.items(): # <<<<<<<<<<<<<<
|
|
* provider = self.__providers.get(name)
|
|
*
|
|
*/
|
|
__pyx_L3_continue:;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":592
|
|
* super(DependenciesContainer, self).reset_override()
|
|
*
|
|
* cpdef object _override_providers(self, object container): # <<<<<<<<<<<<<<
|
|
* """Override providers with providers from provided container."""
|
|
* for name, dependency_provider in container.providers.items():
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer._override_providers", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_name);
|
|
__Pyx_XDECREF(__pyx_v_dependency_provider);
|
|
__Pyx_XDECREF(__pyx_v_provider);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_13_override_providers(PyObject *__pyx_v_self, PyObject *__pyx_v_container); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_12_override_providers[] = "Override providers with providers from provided container.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_13_override_providers(PyObject *__pyx_v_self, PyObject *__pyx_v_container) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_override_providers (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21DependenciesContainer_12_override_providers(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self), ((PyObject *)__pyx_v_container));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_12_override_providers(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v_container) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_override_providers", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_21DependenciesContainer__override_providers(__pyx_v_self, __pyx_v_container, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer._override_providers", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21DependenciesContainer_14__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__providers, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___providers);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___providers);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx___providers);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.__pyx___provides);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__providers, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__providers, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__providers is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__providers, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__providers is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DependenciesContainer, (type(self), 0xd8553c7, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx___providers != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_2;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__providers is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DependenciesContainer, (type(self), 0xd8553c7, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__providers is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DependenciesContainer, (type(self), 0xd8553c7, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_DependenciesContainer, (type(self), 0xd8553c7, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DependenciesConta); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_226841543);
|
|
__Pyx_GIVEREF(__pyx_int_226841543);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_226841543);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__providers is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DependenciesContainer, (type(self), 0xd8553c7, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_DependenciesContainer, (type(self), 0xd8553c7, None), state
|
|
* else:
|
|
* return __pyx_unpickle_DependenciesContainer, (type(self), 0xd8553c7, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DependenciesContainer__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DependenciesConta); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_226841543);
|
|
__Pyx_GIVEREF(__pyx_int_226841543);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_226841543);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DependenciesContainer, (type(self), 0xd8553c7, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DependenciesContainer__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21DependenciesContainer_16__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21DependenciesContainer_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_DependenciesContainer, (type(self), 0xd8553c7, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DependenciesContainer__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DependenciesContainer__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DependenciesContainer, (type(self), 0xd8553c7, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DependenciesContainer__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DependenciesContainer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":620
|
|
* """
|
|
*
|
|
* def __init__(self, Provider overridden, Provider overriding): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_17OverridingContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17OverridingContext___init__[] = "Initializer.\n\n :param overridden: Overridden provider.\n :type overridden: :py:class:`Provider`\n\n :param overriding: Overriding provider.\n :type overriding: :py:class:`Provider`\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_17OverridingContext___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_17OverridingContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_overridden = 0;
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_overriding = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_overridden,&__pyx_n_s_overriding,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_overridden)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_overriding)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 620, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 620, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_overridden = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)values[0]);
|
|
__pyx_v_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 620, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.OverridingContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_overridden), __pyx_ptype_19dependency_injector_9providers_Provider, 1, "overridden", 0))) __PYX_ERR(1, 620, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_overriding), __pyx_ptype_19dependency_injector_9providers_Provider, 1, "overriding", 0))) __PYX_ERR(1, 620, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17OverridingContext___init__(((struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)__pyx_v_self), __pyx_v_overridden, __pyx_v_overriding);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_17OverridingContext___init__(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v_self, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_overridden, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_overriding) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":629
|
|
* :type overriding: :py:class:`Provider`
|
|
* """
|
|
* self.__overridden = overridden # <<<<<<<<<<<<<<
|
|
* self.__overriding = overriding
|
|
* super(OverridingContext, self).__init__()
|
|
*/
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_overridden));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_overridden));
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___overridden);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___overridden));
|
|
__pyx_v_self->__pyx___overridden = __pyx_v_overridden;
|
|
|
|
/* "dependency_injector/providers.pyx":630
|
|
* """
|
|
* self.__overridden = overridden
|
|
* self.__overriding = overriding # <<<<<<<<<<<<<<
|
|
* super(OverridingContext, self).__init__()
|
|
*
|
|
*/
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_overriding));
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___overriding));
|
|
__pyx_v_self->__pyx___overriding = __pyx_v_overriding;
|
|
|
|
/* "dependency_injector/providers.pyx":631
|
|
* self.__overridden = overridden
|
|
* self.__overriding = overriding
|
|
* super(OverridingContext, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __enter__(self):
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 631, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_OverridingContext));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_OverridingContext));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_OverridingContext));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 631, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 631, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 631, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":620
|
|
* """
|
|
*
|
|
* def __init__(self, Provider overridden, Provider overriding): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.OverridingContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":633
|
|
* super(OverridingContext, self).__init__()
|
|
*
|
|
* def __enter__(self): # <<<<<<<<<<<<<<
|
|
* """Do nothing."""
|
|
* return self.__overriding
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17OverridingContext_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17OverridingContext_2__enter__[] = "Do nothing.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17OverridingContext_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17OverridingContext_2__enter__(((struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_2__enter__(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__enter__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":635
|
|
* def __enter__(self):
|
|
* """Do nothing."""
|
|
* return self.__overriding # <<<<<<<<<<<<<<
|
|
*
|
|
* def __exit__(self, *_):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___overriding));
|
|
__pyx_r = ((PyObject *)__pyx_v_self->__pyx___overriding);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":633
|
|
* super(OverridingContext, self).__init__()
|
|
*
|
|
* def __enter__(self): # <<<<<<<<<<<<<<
|
|
* """Do nothing."""
|
|
* return self.__overriding
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":637
|
|
* return self.__overriding
|
|
*
|
|
* def __exit__(self, *_): # <<<<<<<<<<<<<<
|
|
* """Exit overriding context."""
|
|
* self.__overridden.reset_last_overriding()
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17OverridingContext_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17OverridingContext_4__exit__[] = "Exit overriding context.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17OverridingContext_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
CYTHON_UNUSED PyObject *__pyx_v__ = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__exit__", 0))) return NULL;
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v__ = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17OverridingContext_4__exit__(((struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)__pyx_v_self), __pyx_v__);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v__);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_4__exit__(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__exit__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":639
|
|
* def __exit__(self, *_):
|
|
* """Exit overriding context."""
|
|
* self.__overridden.reset_last_overriding() # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___overridden), __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 639, __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, 639, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":637
|
|
* return self.__overriding
|
|
*
|
|
* def __exit__(self, *_): # <<<<<<<<<<<<<<
|
|
* """Exit overriding context."""
|
|
* self.__overridden.reset_last_overriding()
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.OverridingContext.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17OverridingContext_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17OverridingContext_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17OverridingContext_6__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__overridden, self.__overriding) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___overridden));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___overridden));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx___overridden));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx___overriding));
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__overridden, self.__overriding)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__overridden, self.__overriding)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__overridden is not None or self.__overriding is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__overridden, self.__overriding)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__overridden is not None or self.__overriding is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_OverridingContext, (type(self), 0x2071b6b, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx___overridden) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx___overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_2;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__overridden is not None or self.__overriding is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_OverridingContext, (type(self), 0x2071b6b, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__overridden is not None or self.__overriding is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_OverridingContext, (type(self), 0x2071b6b, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_OverridingContext, (type(self), 0x2071b6b, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_OverridingContext); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_34020203);
|
|
__Pyx_GIVEREF(__pyx_int_34020203);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34020203);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__overridden is not None or self.__overriding is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_OverridingContext, (type(self), 0x2071b6b, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_OverridingContext, (type(self), 0x2071b6b, None), state
|
|
* else:
|
|
* return __pyx_unpickle_OverridingContext, (type(self), 0x2071b6b, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_OverridingContext__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_OverridingContext); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_34020203);
|
|
__Pyx_GIVEREF(__pyx_int_34020203);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_34020203);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.OverridingContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_OverridingContext, (type(self), 0x2071b6b, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_OverridingContext__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17OverridingContext_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17OverridingContext_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17OverridingContext_8__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17OverridingContext_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_OverridingContext, (type(self), 0x2071b6b, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_OverridingContext__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_OverridingContext__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_OverridingContext, (type(self), 0x2071b6b, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_OverridingContext__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.OverridingContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":666
|
|
* """
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_8Callable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Callable___init__[] = "Initializer.\n\n :param provides: Wrapped callable.\n :type provides: callable\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Callable___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_8Callable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provides = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
__pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
if (PyTuple_GET_SIZE(__pyx_args) > 1) {
|
|
__pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
|
|
if (unlikely(!__pyx_v_args)) {
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
__Pyx_GOTREF(__pyx_v_args);
|
|
} else {
|
|
__pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
|
|
}
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
default:
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 666, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_provides = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 666, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable___init__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_provides, __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_8Callable___init__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
int __pyx_t_10;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":672
|
|
* :type provides: callable
|
|
* """
|
|
* if not callable(provides): # <<<<<<<<<<<<<<
|
|
* raise Error('Provider {0} expected to get callable, '
|
|
* 'got {0}'.format('.'.join((self.__class__.__module__,
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_provides); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 672, __pyx_L1_error)
|
|
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":673
|
|
* """
|
|
* if not callable(provides):
|
|
* raise Error('Provider {0} expected to get callable, ' # <<<<<<<<<<<<<<
|
|
* 'got {0}'.format('.'.join((self.__class__.__module__,
|
|
* self.__class__.__name__)),
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 673, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
|
|
/* "dependency_injector/providers.pyx":674
|
|
* if not callable(provides):
|
|
* raise Error('Provider {0} expected to get callable, '
|
|
* 'got {0}'.format('.'.join((self.__class__.__module__, # <<<<<<<<<<<<<<
|
|
* self.__class__.__name__)),
|
|
* provides))
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provider_0_expected_to_get_calla, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 674, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 674, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_module); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 674, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":675
|
|
* raise Error('Provider {0} expected to get callable, '
|
|
* 'got {0}'.format('.'.join((self.__class__.__module__,
|
|
* self.__class__.__name__)), # <<<<<<<<<<<<<<
|
|
* provides))
|
|
* self.__provides = provides
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 675, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":674
|
|
* if not callable(provides):
|
|
* raise Error('Provider {0} expected to get callable, '
|
|
* 'got {0}'.format('.'.join((self.__class__.__module__, # <<<<<<<<<<<<<<
|
|
* self.__class__.__name__)),
|
|
* provides))
|
|
*/
|
|
__pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 674, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_9);
|
|
PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_9 = 0;
|
|
__pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 674, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":676
|
|
* 'got {0}'.format('.'.join((self.__class__.__module__,
|
|
* self.__class__.__name__)),
|
|
* provides)) # <<<<<<<<<<<<<<
|
|
* self.__provides = provides
|
|
*
|
|
*/
|
|
__pyx_t_7 = NULL;
|
|
__pyx_t_10 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_10 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_provides};
|
|
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 674, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_provides};
|
|
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 674, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 674, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (__pyx_t_7) {
|
|
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_9);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_t_9);
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_provides);
|
|
__pyx_t_9 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 674, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 673, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 673, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":672
|
|
* :type provides: callable
|
|
* """
|
|
* if not callable(provides): # <<<<<<<<<<<<<<
|
|
* raise Error('Provider {0} expected to get callable, '
|
|
* 'got {0}'.format('.'.join((self.__class__.__module__,
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":677
|
|
* self.__class__.__name__)),
|
|
* provides))
|
|
* self.__provides = provides # <<<<<<<<<<<<<<
|
|
*
|
|
* self.__args = tuple()
|
|
*/
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___provides);
|
|
__pyx_v_self->__pyx___provides = __pyx_v_provides;
|
|
|
|
/* "dependency_injector/providers.pyx":679
|
|
* self.__provides = provides
|
|
*
|
|
* self.__args = tuple() # <<<<<<<<<<<<<<
|
|
* self.__args_len = 0
|
|
* self.set_args(*args)
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 679, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___args);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___args);
|
|
__pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":680
|
|
*
|
|
* self.__args = tuple()
|
|
* self.__args_len = 0 # <<<<<<<<<<<<<<
|
|
* self.set_args(*args)
|
|
*
|
|
*/
|
|
__pyx_v_self->__pyx___args_len = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":681
|
|
* self.__args = tuple()
|
|
* self.__args_len = 0
|
|
* self.set_args(*args) # <<<<<<<<<<<<<<
|
|
*
|
|
* self.__kwargs = tuple()
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 681, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 681, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":683
|
|
* self.set_args(*args)
|
|
*
|
|
* self.__kwargs = tuple() # <<<<<<<<<<<<<<
|
|
* self.__kwargs_len = 0
|
|
* self.set_kwargs(**kwargs)
|
|
*/
|
|
__pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 683, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___kwargs);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___kwargs);
|
|
__pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":684
|
|
*
|
|
* self.__kwargs = tuple()
|
|
* self.__kwargs_len = 0 # <<<<<<<<<<<<<<
|
|
* self.set_kwargs(**kwargs)
|
|
*
|
|
*/
|
|
__pyx_v_self->__pyx___kwargs_len = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":685
|
|
* self.__kwargs = tuple()
|
|
* self.__kwargs_len = 0
|
|
* self.set_kwargs(**kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* super(Callable, self).__init__()
|
|
*/
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 685, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 685, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":687
|
|
* self.set_kwargs(**kwargs)
|
|
*
|
|
* super(Callable, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 687, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 687, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 687, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 687, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":666
|
|
* """
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":689
|
|
* super(Callable, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Callable_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_v_copied = NULL;
|
|
PyObject *__pyx_v_provides = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":691
|
|
* def __deepcopy__(self, memo):
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 691, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 691, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 691, __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":692
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_copied != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":693
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* provides = self.provides
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":692
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":695
|
|
* return copied
|
|
*
|
|
* provides = self.provides # <<<<<<<<<<<<<<
|
|
* if isinstance(provides, Provider):
|
|
* provides = deepcopy(provides, memo)
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 695, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":696
|
|
*
|
|
* provides = self.provides
|
|
* if isinstance(provides, Provider): # <<<<<<<<<<<<<<
|
|
* provides = deepcopy(provides, memo)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_TypeCheck(__pyx_v_provides, __pyx_ptype_19dependency_injector_9providers_Provider);
|
|
__pyx_t_5 = (__pyx_t_6 != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "dependency_injector/providers.pyx":697
|
|
* provides = self.provides
|
|
* if isinstance(provides, Provider):
|
|
* provides = deepcopy(provides, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__(provides,
|
|
*/
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 697, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_provides, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 697, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF_SET(__pyx_v_provides, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":696
|
|
*
|
|
* provides = self.provides
|
|
* if isinstance(provides, Provider): # <<<<<<<<<<<<<<
|
|
* provides = deepcopy(provides, memo)
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":699
|
|
* provides = deepcopy(provides, memo)
|
|
*
|
|
* copied = self.__class__(provides, # <<<<<<<<<<<<<<
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 699, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 699, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_provides);
|
|
|
|
/* "dependency_injector/providers.pyx":700
|
|
*
|
|
* copied = self.__class__(provides,
|
|
* *deepcopy(self.args, memo), # <<<<<<<<<<<<<<
|
|
* **deepcopy(self.kwargs, memo))
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 700, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 700, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":699
|
|
* provides = deepcopy(provides, memo)
|
|
*
|
|
* copied = self.__class__(provides, # <<<<<<<<<<<<<<
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
*/
|
|
__pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 699, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 699, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":701
|
|
* copied = self.__class__(provides,
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<<
|
|
*
|
|
* self._copy_overridings(copied, memo)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 701, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 701, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 701, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(__pyx_t_8 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
|
|
__PYX_ERR(1, 701, __pyx_L1_error)
|
|
}
|
|
if (likely(PyDict_CheckExact(__pyx_t_8))) {
|
|
__pyx_t_3 = PyDict_Copy(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 701, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
} else {
|
|
__pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 699, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":699
|
|
* provides = deepcopy(provides, memo)
|
|
*
|
|
* copied = self.__class__(provides, # <<<<<<<<<<<<<<
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 699, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":703
|
|
* **deepcopy(self.kwargs, memo))
|
|
*
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 703, __pyx_L1_error)
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 703, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_Callable *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":705
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":689
|
|
* super(Callable, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_copied);
|
|
__Pyx_XDECREF(__pyx_v_provides);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":707
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_5__str__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Callable_4__str__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_8Callable_4__str__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_5__str__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_4__str__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4__str__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":712
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, provides=self.__provides) # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_v_self->__pyx___provides;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 712, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":707
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":715
|
|
*
|
|
* @property
|
|
* def provides(self): # <<<<<<<<<<<<<<
|
|
* """Return wrapped callable."""
|
|
* return self.__provides
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_8provides_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_8provides_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_8provides___get__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8provides___get__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":717
|
|
* def provides(self):
|
|
* """Return wrapped callable."""
|
|
* return self.__provides # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___provides);
|
|
__pyx_r = __pyx_v_self->__pyx___provides;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":715
|
|
*
|
|
* @property
|
|
* def provides(self): # <<<<<<<<<<<<<<
|
|
* """Return wrapped callable."""
|
|
* return self.__provides
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":720
|
|
*
|
|
* @property
|
|
* def args(self): # <<<<<<<<<<<<<<
|
|
* """Return positional argument injections."""
|
|
* cdef int index
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_4args_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_4args___get__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_4args___get__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) {
|
|
int __pyx_v_index;
|
|
struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_arg = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":726
|
|
* cdef list args
|
|
*
|
|
* args = list() # <<<<<<<<<<<<<<
|
|
* for index in range(self.__args_len):
|
|
* arg = self.__args[index]
|
|
*/
|
|
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 726, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":727
|
|
*
|
|
* args = list()
|
|
* for index in range(self.__args_len): # <<<<<<<<<<<<<<
|
|
* arg = self.__args[index]
|
|
* args.append(arg.__value)
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___args_len;
|
|
__pyx_t_3 = __pyx_t_2;
|
|
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
__pyx_v_index = __pyx_t_4;
|
|
|
|
/* "dependency_injector/providers.pyx":728
|
|
* args = list()
|
|
* for index in range(self.__args_len):
|
|
* arg = self.__args[index] # <<<<<<<<<<<<<<
|
|
* args.append(arg.__value)
|
|
* return tuple(args)
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___args == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(1, 728, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 728, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_PositionalInjection))))) __PYX_ERR(1, 728, __pyx_L1_error)
|
|
__Pyx_XDECREF_SET(__pyx_v_arg, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":729
|
|
* for index in range(self.__args_len):
|
|
* arg = self.__args[index]
|
|
* args.append(arg.__value) # <<<<<<<<<<<<<<
|
|
* return tuple(args)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_arg->__pyx_base.__pyx___value;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_5 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 729, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":730
|
|
* arg = self.__args[index]
|
|
* args.append(arg.__value)
|
|
* return tuple(args) # <<<<<<<<<<<<<<
|
|
*
|
|
* def add_args(self, *args):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 730, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":720
|
|
*
|
|
* @property
|
|
* def args(self): # <<<<<<<<<<<<<<
|
|
* """Return positional argument injections."""
|
|
* cdef int index
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.args.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_arg);
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":732
|
|
* return tuple(args)
|
|
*
|
|
* def add_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Add positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Callable_6add_args[] = "Add positional argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("add_args (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_args", 0))) return NULL;
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_6add_args(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_args);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6add_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
Py_ssize_t __pyx_t_3;
|
|
__Pyx_RefNannySetupContext("add_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":737
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__args += parse_positional_injections(args) # <<<<<<<<<<<<<<
|
|
* self.__args_len = len(self.__args)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 737, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 737, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___args);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___args);
|
|
__pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":738
|
|
* """
|
|
* self.__args += parse_positional_injections(args)
|
|
* self.__args_len = len(self.__args) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___args;
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
if (unlikely(__pyx_t_2 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 738, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 738, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_self->__pyx___args_len = __pyx_t_3;
|
|
|
|
/* "dependency_injector/providers.pyx":739
|
|
* self.__args += parse_positional_injections(args)
|
|
* self.__args_len = len(self.__args)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def set_args(self, *args):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":732
|
|
* return tuple(args)
|
|
*
|
|
* def add_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Add positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.add_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":741
|
|
* return self
|
|
*
|
|
* def set_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Set positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Callable_8set_args[] = "Set positional argument injections.\n\n Existing positional argument injections are dropped.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("set_args (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_args", 0))) return NULL;
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_8set_args(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_args);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_8set_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
Py_ssize_t __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("set_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":748
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__args = parse_positional_injections(args) # <<<<<<<<<<<<<<
|
|
* self.__args_len = len(self.__args)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___args);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___args);
|
|
__pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":749
|
|
* """
|
|
* self.__args = parse_positional_injections(args)
|
|
* self.__args_len = len(self.__args) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___args;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 749, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 749, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v_self->__pyx___args_len = __pyx_t_2;
|
|
|
|
/* "dependency_injector/providers.pyx":750
|
|
* self.__args = parse_positional_injections(args)
|
|
* self.__args_len = len(self.__args)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def clear_args(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":741
|
|
* return self
|
|
*
|
|
* def set_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Set positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.set_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":752
|
|
* return self
|
|
*
|
|
* def clear_args(self): # <<<<<<<<<<<<<<
|
|
* """Drop positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Callable_10clear_args[] = "Drop positional argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("clear_args (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_10clear_args(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_10clear_args(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
Py_ssize_t __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("clear_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":757
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__args = tuple() # <<<<<<<<<<<<<<
|
|
* self.__args_len = len(self.__args)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 757, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___args);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___args);
|
|
__pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":758
|
|
* """
|
|
* self.__args = tuple()
|
|
* self.__args_len = len(self.__args) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___args;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 758, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 758, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v_self->__pyx___args_len = __pyx_t_2;
|
|
|
|
/* "dependency_injector/providers.pyx":759
|
|
* self.__args = tuple()
|
|
* self.__args_len = len(self.__args)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":752
|
|
* return self
|
|
*
|
|
* def clear_args(self): # <<<<<<<<<<<<<<
|
|
* """Drop positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.clear_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":762
|
|
*
|
|
* @property
|
|
* def kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Return keyword argument injections."""
|
|
* cdef int index
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_6kwargs_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_6kwargs_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___get__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) {
|
|
int __pyx_v_index;
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_kwarg = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":768
|
|
* cdef dict kwargs
|
|
*
|
|
* kwargs = dict() # <<<<<<<<<<<<<<
|
|
* for index in range(self.__kwargs_len):
|
|
* kwarg = self.__kwargs[index]
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 768, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_kwargs = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":769
|
|
*
|
|
* kwargs = dict()
|
|
* for index in range(self.__kwargs_len): # <<<<<<<<<<<<<<
|
|
* kwarg = self.__kwargs[index]
|
|
* kwargs[kwarg.__name] = kwarg.__value
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___kwargs_len;
|
|
__pyx_t_3 = __pyx_t_2;
|
|
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
__pyx_v_index = __pyx_t_4;
|
|
|
|
/* "dependency_injector/providers.pyx":770
|
|
* kwargs = dict()
|
|
* for index in range(self.__kwargs_len):
|
|
* kwarg = self.__kwargs[index] # <<<<<<<<<<<<<<
|
|
* kwargs[kwarg.__name] = kwarg.__value
|
|
* return kwargs
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___kwargs == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(1, 770, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 770, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 770, __pyx_L1_error)
|
|
__Pyx_XDECREF_SET(__pyx_v_kwarg, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":771
|
|
* for index in range(self.__kwargs_len):
|
|
* kwarg = self.__kwargs[index]
|
|
* kwargs[kwarg.__name] = kwarg.__value # <<<<<<<<<<<<<<
|
|
* return kwargs
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_kwarg->__pyx_base.__pyx___value;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 771, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":772
|
|
* kwarg = self.__kwargs[index]
|
|
* kwargs[kwarg.__name] = kwarg.__value
|
|
* return kwargs # <<<<<<<<<<<<<<
|
|
*
|
|
* def add_kwargs(self, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__pyx_r = __pyx_v_kwargs;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":762
|
|
*
|
|
* @property
|
|
* def kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Return keyword argument injections."""
|
|
* cdef int index
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.kwargs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_kwarg);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":774
|
|
* return kwargs
|
|
*
|
|
* def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Add keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Callable_12add_kwargs[] = "Add keyword argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("add_kwargs (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("add_kwargs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_kwargs", 1))) return NULL;
|
|
__pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_12add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
Py_ssize_t __pyx_t_3;
|
|
__Pyx_RefNannySetupContext("add_kwargs", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":779
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__kwargs += parse_named_injections(kwargs) # <<<<<<<<<<<<<<
|
|
* self.__kwargs_len = len(self.__kwargs)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 779, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 779, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___kwargs);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___kwargs);
|
|
__pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":780
|
|
* """
|
|
* self.__kwargs += parse_named_injections(kwargs)
|
|
* self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___kwargs;
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
if (unlikely(__pyx_t_2 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 780, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 780, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_self->__pyx___kwargs_len = __pyx_t_3;
|
|
|
|
/* "dependency_injector/providers.pyx":781
|
|
* self.__kwargs += parse_named_injections(kwargs)
|
|
* self.__kwargs_len = len(self.__kwargs)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def set_kwargs(self, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":774
|
|
* return kwargs
|
|
*
|
|
* def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Add keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.add_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":783
|
|
* return self
|
|
*
|
|
* def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Set keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Callable_14set_kwargs[] = "Set keyword argument injections.\n\n Existing keyword argument injections are dropped.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("set_kwargs (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("set_kwargs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_kwargs", 1))) return NULL;
|
|
__pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_14set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
Py_ssize_t __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("set_kwargs", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":790
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__kwargs = parse_named_injections(kwargs) # <<<<<<<<<<<<<<
|
|
* self.__kwargs_len = len(self.__kwargs)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 790, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___kwargs);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___kwargs);
|
|
__pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":791
|
|
* """
|
|
* self.__kwargs = parse_named_injections(kwargs)
|
|
* self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___kwargs;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 791, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 791, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v_self->__pyx___kwargs_len = __pyx_t_2;
|
|
|
|
/* "dependency_injector/providers.pyx":792
|
|
* self.__kwargs = parse_named_injections(kwargs)
|
|
* self.__kwargs_len = len(self.__kwargs)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def clear_kwargs(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":783
|
|
* return self
|
|
*
|
|
* def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Set keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.set_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":794
|
|
* return self
|
|
*
|
|
* def clear_kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Drop keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Callable_16clear_kwargs[] = "Drop keyword argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("clear_kwargs (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
Py_ssize_t __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("clear_kwargs", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":799
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__kwargs = tuple() # <<<<<<<<<<<<<<
|
|
* self.__kwargs_len = len(self.__kwargs)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 799, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___kwargs);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___kwargs);
|
|
__pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":800
|
|
* """
|
|
* self.__kwargs = tuple()
|
|
* self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___kwargs;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 800, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 800, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v_self->__pyx___kwargs_len = __pyx_t_2;
|
|
|
|
/* "dependency_injector/providers.pyx":801
|
|
* self.__kwargs = tuple()
|
|
* self.__kwargs_len = len(self.__kwargs)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":794
|
|
* return self
|
|
*
|
|
* def clear_kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Drop keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.clear_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":803
|
|
* return self
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return result of provided callable's call."""
|
|
* return __callable_call(self, args, kwargs)
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_8Callable__provide(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 803, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Callable_19_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 803, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 803, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 803, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 803, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":805
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return result of provided callable's call."""
|
|
* return __callable_call(self, args, kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___callable_call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 805, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":803
|
|
* return self
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return result of provided callable's call."""
|
|
* return __callable_call(self, args, kwargs)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8Callable_18_provide[] = "Return result of provided callable's call.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 803, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 803, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 803, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 803, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 803, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_18_provide(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_18_provide(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_8Callable__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 803, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_20__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_20__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx___args_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___args);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx___provides);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v__dict = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_4 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
|
|
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Callable, (type(self), 0x03251dc, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_4 = (__pyx_v_self->__pyx___args != ((PyObject*)Py_None));
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx___kwargs != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (__pyx_v_self->__pyx___provides != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
__pyx_t_5 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_5;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Callable, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Callable, (type(self), 0x03251dc, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_Callable, (type(self), 0x03251dc, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Callable); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Callable, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_Callable, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
* return __pyx_unpickle_Callable, (type(self), 0x03251dc, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Callable__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Callable); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* 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.Callable.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Callable, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Callable__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_8Callable_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8Callable_22__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_22__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_Callable, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Callable__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Callable__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Callable, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Callable__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Callable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17DelegatedCallable_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17DelegatedCallable_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17DelegatedCallable___reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17DelegatedCallable___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___args_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___kwargs_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___args);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.__pyx___provides);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v__dict = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_4 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
|
|
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedCallable, (type(self), 0x03251dc, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx___args != ((PyObject*)Py_None));
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx___kwargs != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
__pyx_t_5 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_5;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedCallable, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedCallable, (type(self), 0x03251dc, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedCallable, (type(self), 0x03251dc, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_DelegatedCallable); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedCallable, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_DelegatedCallable, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedCallable, (type(self), 0x03251dc, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedCallable__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_DelegatedCallable); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* 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.DelegatedCallable.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedCallable, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedCallable__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17DelegatedCallable_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17DelegatedCallable_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17DelegatedCallable_2__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17DelegatedCallable_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_DelegatedCallable, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedCallable__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedCallable__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedCallable, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedCallable__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DelegatedCallable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":827
|
|
* """
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided object.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_16AbstractCallable___call__[] = "Return provided object.\n\n Callable interface implementation.\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_16AbstractCallable___call__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
|
|
if (unlikely(__pyx_kwds)) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16AbstractCallable___call__(((struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
__Pyx_RefNannySetupContext("__call__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":832
|
|
* Callable interface implementation.
|
|
* """
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*/
|
|
__pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) == Py_None);
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":833
|
|
* """
|
|
* if self.__last_overriding is None:
|
|
* raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<<
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 833, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 833, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self));
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 833, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 833, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":832
|
|
* Callable interface implementation.
|
|
* """
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":834
|
|
* if self.__last_overriding is None:
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* def override(self, provider):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":827
|
|
* """
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided object.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCallable.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":836
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_3override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_16AbstractCallable_2override[] = "Override provider with another provider.\n\n :param provider: Overriding provider.\n :type provider: :py:class:`Provider`\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_3override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16AbstractCallable_2override(((struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *)__pyx_v_self), ((PyObject *)__pyx_v_provider));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2override(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
int __pyx_t_8;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("override", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":847
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* if not isinstance(provider, Callable): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Callable))
|
|
*/
|
|
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_provider, __pyx_ptype_19dependency_injector_9providers_Callable);
|
|
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":848
|
|
* """
|
|
* if not isinstance(provider, Callable):
|
|
* raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<<
|
|
* '{1} providers'.format(self, Callable))
|
|
* return super(AbstractCallable, self).override(provider)
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 848, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
|
|
/* "dependency_injector/providers.pyx":849
|
|
* if not isinstance(provider, Callable):
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Callable)) # <<<<<<<<<<<<<<
|
|
* return super(AbstractCallable, self).override(provider)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 849, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
__pyx_t_8 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_8 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)};
|
|
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 849, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)};
|
|
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 849, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 849, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
if (__pyx_t_7) {
|
|
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
|
|
}
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 849, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 848, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 848, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":847
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* if not isinstance(provider, Callable): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Callable))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":850
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Callable))
|
|
* return super(AbstractCallable, self).override(provider) # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 850, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCallable));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCallable));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCallable));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 850, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 850, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 850, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":836
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCallable.override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":852
|
|
* return super(AbstractCallable, self).override(provider)
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return result of provided callable's call."""
|
|
* raise NotImplementedError('Abstract provider forward providing logic '
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_16AbstractCallable__provide(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 852, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_16AbstractCallable_5_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 852, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 852, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 852, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 852, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":854
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return result of provided callable's call."""
|
|
* raise NotImplementedError('Abstract provider forward providing logic ' # <<<<<<<<<<<<<<
|
|
* 'to overriding provider')
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 854, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 854, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":852
|
|
* return super(AbstractCallable, self).override(provider)
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return result of provided callable's call."""
|
|
* raise NotImplementedError('Abstract provider forward providing logic '
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCallable._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_16AbstractCallable_4_provide[] = "Return result of provided callable's call.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 852, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 852, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 852, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCallable._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 852, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 852, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16AbstractCallable_4_provide(((struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_4_provide(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_16AbstractCallable__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 852, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCallable._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16AbstractCallable_6__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___args_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___kwargs_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___args);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.__pyx___provides);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v__dict = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_4 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
|
|
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_AbstractCallable, (type(self), 0x03251dc, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx___args != ((PyObject*)Py_None));
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx___kwargs != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
__pyx_t_5 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_5;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_AbstractCallable, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_AbstractCallable, (type(self), 0x03251dc, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_AbstractCallable, (type(self), 0x03251dc, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_AbstractCallable); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_AbstractCallable, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_AbstractCallable, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
* return __pyx_unpickle_AbstractCallable, (type(self), 0x03251dc, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_AbstractCallable__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_AbstractCallable); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* 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.AbstractCallable.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_AbstractCallable, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractCallable__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16AbstractCallable_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16AbstractCallable_8__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_AbstractCallable, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_AbstractCallable__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractCallable__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_AbstractCallable, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractCallable__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCallable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":868
|
|
* """
|
|
*
|
|
* def __init__(self, callable): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_16CallableDelegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_16CallableDelegate___init__[] = "Initializer.\n\n :param callable: Value that have to be provided.\n :type callable: object\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_16CallableDelegate___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_16CallableDelegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_callable = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callable,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callable)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 868, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_callable = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 868, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.CallableDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__(((struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *)__pyx_v_self), __pyx_v_callable);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_16CallableDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *__pyx_v_self, PyObject *__pyx_v_callable) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
int __pyx_t_9;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":874
|
|
* :type callable: object
|
|
* """
|
|
* if isinstance(callable, Callable) is False: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Callable))
|
|
*/
|
|
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_callable, __pyx_ptype_19dependency_injector_9providers_Callable);
|
|
__pyx_t_2 = ((__pyx_t_1 == 0) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":875
|
|
* """
|
|
* if isinstance(callable, Callable) is False:
|
|
* raise Error('{0} can wrap only {1} providers'.format( # <<<<<<<<<<<<<<
|
|
* self.__class__, Callable))
|
|
* super(CallableDelegate, self).__init__(callable)
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 875, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 875, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
|
|
/* "dependency_injector/providers.pyx":876
|
|
* if isinstance(callable, Callable) is False:
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Callable)) # <<<<<<<<<<<<<<
|
|
* super(CallableDelegate, self).__init__(callable)
|
|
*
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 876, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = NULL;
|
|
__pyx_t_9 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_9 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)};
|
|
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 875, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)};
|
|
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 875, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 875, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
if (__pyx_t_8) {
|
|
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 875, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 875, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 875, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":874
|
|
* :type callable: object
|
|
* """
|
|
* if isinstance(callable, Callable) is False: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Callable))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":877
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Callable))
|
|
* super(CallableDelegate, self).__init__(callable) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 877, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_CallableDelegate));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_CallableDelegate));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_CallableDelegate));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 877, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 877, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_callable) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_callable);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 877, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":868
|
|
* """
|
|
*
|
|
* def __init__(self, callable): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_AddTraceback("dependency_injector.providers.CallableDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16CallableDelegate_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16CallableDelegate_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16CallableDelegate_2__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16CallableDelegate_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx___provides);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_CallableDelegate, (type(self), 0x3f4a3b6, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_CallableDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_CallableDelegate, (type(self), 0x3f4a3b6, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_CallableDelegate, (type(self), 0x3f4a3b6, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_CallableDelegate); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_CallableDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_CallableDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
* return __pyx_unpickle_CallableDelegate, (type(self), 0x3f4a3b6, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_CallableDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_CallableDelegate); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.CallableDelegate.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_CallableDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_CallableDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16CallableDelegate_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16CallableDelegate_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16CallableDelegate_4__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16CallableDelegate_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_CallableDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_CallableDelegate__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_CallableDelegate__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_CallableDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_CallableDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.CallableDelegate.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":906
|
|
* _is_coroutine = _is_coroutine_marker
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_9Coroutine_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_9Coroutine___init__[] = "Initializer.\n\n :param provides: Wrapped callable.\n :type provides: callable\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_9Coroutine___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_9Coroutine_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provides = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
__pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
if (PyTuple_GET_SIZE(__pyx_args) > 1) {
|
|
__pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
|
|
if (unlikely(!__pyx_v_args)) {
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
__Pyx_GOTREF(__pyx_v_args);
|
|
} else {
|
|
__pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
|
|
}
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
default:
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 906, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_provides = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 906, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Coroutine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_9Coroutine___init__(((struct __pyx_obj_19dependency_injector_9providers_Coroutine *)__pyx_v_self), __pyx_v_provides, __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_9Coroutine___init__(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
int __pyx_t_10;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":912
|
|
* :type provides: callable
|
|
* """
|
|
* if not asyncio: # <<<<<<<<<<<<<<
|
|
* raise Error('Package asyncio is not available')
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 912, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 912, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_3 = ((!__pyx_t_2) != 0);
|
|
if (unlikely(__pyx_t_3)) {
|
|
|
|
/* "dependency_injector/providers.pyx":913
|
|
* """
|
|
* if not asyncio:
|
|
* raise Error('Package asyncio is not available') # <<<<<<<<<<<<<<
|
|
*
|
|
* if not asyncio.iscoroutinefunction(provides):
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 913, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Package_asyncio_is_not_available) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Package_asyncio_is_not_available);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 913, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 913, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":912
|
|
* :type provides: callable
|
|
* """
|
|
* if not asyncio: # <<<<<<<<<<<<<<
|
|
* raise Error('Package asyncio is not available')
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":915
|
|
* raise Error('Package asyncio is not available')
|
|
*
|
|
* if not asyncio.iscoroutinefunction(provides): # <<<<<<<<<<<<<<
|
|
* raise Error('Provider {0} expected to get coroutine function, '
|
|
* 'got {1}'.format('.'.join((self.__class__.__module__,
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 915, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 915, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_5, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_provides) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_provides);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 915, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 915, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_2 = ((!__pyx_t_3) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":916
|
|
*
|
|
* if not asyncio.iscoroutinefunction(provides):
|
|
* raise Error('Provider {0} expected to get coroutine function, ' # <<<<<<<<<<<<<<
|
|
* 'got {1}'.format('.'.join((self.__class__.__module__,
|
|
* self.__class__.__name__)),
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 916, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
|
|
/* "dependency_injector/providers.pyx":917
|
|
* if not asyncio.iscoroutinefunction(provides):
|
|
* raise Error('Provider {0} expected to get coroutine function, '
|
|
* 'got {1}'.format('.'.join((self.__class__.__module__, # <<<<<<<<<<<<<<
|
|
* self.__class__.__name__)),
|
|
* provides))
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provider_0_expected_to_get_corou, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 917, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 917, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_module); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 917, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":918
|
|
* raise Error('Provider {0} expected to get coroutine function, '
|
|
* 'got {1}'.format('.'.join((self.__class__.__module__,
|
|
* self.__class__.__name__)), # <<<<<<<<<<<<<<
|
|
* provides))
|
|
*
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 918, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 918, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":917
|
|
* if not asyncio.iscoroutinefunction(provides):
|
|
* raise Error('Provider {0} expected to get coroutine function, '
|
|
* 'got {1}'.format('.'.join((self.__class__.__module__, # <<<<<<<<<<<<<<
|
|
* self.__class__.__name__)),
|
|
* provides))
|
|
*/
|
|
__pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 917, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_9);
|
|
PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_9 = 0;
|
|
__pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 917, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":919
|
|
* 'got {1}'.format('.'.join((self.__class__.__module__,
|
|
* self.__class__.__name__)),
|
|
* provides)) # <<<<<<<<<<<<<<
|
|
*
|
|
* super(Coroutine, self).__init__(provides, *args, **kwargs)
|
|
*/
|
|
__pyx_t_7 = NULL;
|
|
__pyx_t_10 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_10 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_provides};
|
|
__pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 917, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_provides};
|
|
__pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 917, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 917, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (__pyx_t_7) {
|
|
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_9);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_t_9);
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_provides);
|
|
__pyx_t_9 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 917, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_5, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 916, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 916, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":915
|
|
* raise Error('Package asyncio is not available')
|
|
*
|
|
* if not asyncio.iscoroutinefunction(provides): # <<<<<<<<<<<<<<
|
|
* raise Error('Provider {0} expected to get coroutine function, '
|
|
* 'got {1}'.format('.'.join((self.__class__.__module__,
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":921
|
|
* provides))
|
|
*
|
|
* super(Coroutine, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 921, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 921, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 921, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 921, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_provides);
|
|
__pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 921, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_v_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 921, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":906
|
|
* _is_coroutine = _is_coroutine_marker
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Coroutine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Coroutine_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Coroutine_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_9Coroutine_2__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Coroutine *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Coroutine_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___args_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___kwargs_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___args);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.__pyx___provides);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v__dict = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_4 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
|
|
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Coroutine, (type(self), 0x03251dc, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx___args != ((PyObject*)Py_None));
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx___kwargs != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
__pyx_t_5 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_5;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Coroutine, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Coroutine, (type(self), 0x03251dc, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_Coroutine, (type(self), 0x03251dc, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Coroutine); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Coroutine, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_Coroutine, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
* return __pyx_unpickle_Coroutine, (type(self), 0x03251dc, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Coroutine__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Coroutine); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* 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.Coroutine.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Coroutine, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Coroutine__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Coroutine_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Coroutine_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_9Coroutine_4__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Coroutine *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Coroutine_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_Coroutine, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Coroutine__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Coroutine__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Coroutine, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Coroutine__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Coroutine.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18DelegatedCoroutine_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18DelegatedCoroutine_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_18DelegatedCoroutine___reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedCoroutine___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx_base.__pyx___args_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx_base.__pyx___kwargs_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___args);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx_base.__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.__pyx_base.__pyx___provides);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v__dict = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_4 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
|
|
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedCoroutine, (type(self), 0x03251dc, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___args != ((PyObject*)Py_None));
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___kwargs != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
__pyx_t_5 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_5;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedCoroutine, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedCoroutine, (type(self), 0x03251dc, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedCoroutine, (type(self), 0x03251dc, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_DelegatedCoroutin); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedCoroutine, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_DelegatedCoroutine, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedCoroutine, (type(self), 0x03251dc, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_DelegatedCoroutin); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* 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.DelegatedCoroutine.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedCoroutine, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18DelegatedCoroutine_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18DelegatedCoroutine_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_18DelegatedCoroutine_2__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedCoroutine_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_DelegatedCoroutine, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedCoroutine__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedCoroutine, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DelegatedCoroutine.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":943
|
|
* """
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided object.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17AbstractCoroutine___call__[] = "Return provided object.\n\n Callable interface implementation.\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_17AbstractCoroutine___call__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
|
|
if (unlikely(__pyx_kwds)) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractCoroutine___call__(((struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
__Pyx_RefNannySetupContext("__call__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":948
|
|
* Callable interface implementation.
|
|
* """
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*/
|
|
__pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding) == Py_None);
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":949
|
|
* """
|
|
* if self.__last_overriding is None:
|
|
* raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<<
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 949, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 949, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self));
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 949, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 949, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 949, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":948
|
|
* Callable interface implementation.
|
|
* """
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":950
|
|
* if self.__last_overriding is None:
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* def override(self, provider):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":943
|
|
* """
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided object.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCoroutine.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":952
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_3override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17AbstractCoroutine_2override[] = "Override provider with another provider.\n\n :param provider: Overriding provider.\n :type provider: :py:class:`Provider`\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_3override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2override(((struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *)__pyx_v_self), ((PyObject *)__pyx_v_provider));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_2override(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
int __pyx_t_8;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("override", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":963
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* if not isinstance(provider, Coroutine): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Coroutine))
|
|
*/
|
|
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_provider, __pyx_ptype_19dependency_injector_9providers_Coroutine);
|
|
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":964
|
|
* """
|
|
* if not isinstance(provider, Coroutine):
|
|
* raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<<
|
|
* '{1} providers'.format(self, Coroutine))
|
|
* return super(AbstractCoroutine, self).override(provider)
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 964, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
|
|
/* "dependency_injector/providers.pyx":965
|
|
* if not isinstance(provider, Coroutine):
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Coroutine)) # <<<<<<<<<<<<<<
|
|
* return super(AbstractCoroutine, self).override(provider)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 965, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
__pyx_t_8 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_8 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)};
|
|
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 965, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine)};
|
|
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 965, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 965, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
if (__pyx_t_7) {
|
|
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
|
|
}
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 965, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 964, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 964, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":963
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* if not isinstance(provider, Coroutine): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Coroutine))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":966
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Coroutine))
|
|
* return super(AbstractCoroutine, self).override(provider) # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 966, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 966, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 966, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 966, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":952
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCoroutine.override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":968
|
|
* return super(AbstractCoroutine, self).override(provider)
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return result of provided callable's call."""
|
|
* raise NotImplementedError('Abstract provider forward providing logic '
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_17AbstractCoroutine__provide(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 968, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_5_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 968, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 968, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 968, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 968, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":970
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return result of provided callable's call."""
|
|
* raise NotImplementedError('Abstract provider forward providing logic ' # <<<<<<<<<<<<<<
|
|
* 'to overriding provider')
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 970, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 970, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":968
|
|
* return super(AbstractCoroutine, self).override(provider)
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return result of provided callable's call."""
|
|
* raise NotImplementedError('Abstract provider forward providing logic '
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCoroutine._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17AbstractCoroutine_4_provide[] = "Return result of provided callable's call.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 968, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 968, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 968, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCoroutine._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 968, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 968, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_4_provide(((struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_4_provide(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_17AbstractCoroutine__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 968, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCoroutine._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_6__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx_base.__pyx___args_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx_base.__pyx___kwargs_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___args);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.__pyx_base.__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx___kwargs);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.__pyx_base.__pyx___provides);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v__dict = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_4 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
|
|
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__kwargs, self.__kwargs_len, self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_AbstractCoroutine, (type(self), 0x03251dc, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___args != ((PyObject*)Py_None));
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___kwargs != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
if (!__pyx_t_6) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_6;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_4 = (__pyx_t_6 != 0);
|
|
if (!__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_5 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_6 = (__pyx_t_4 != 0);
|
|
__pyx_t_5 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_5;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_AbstractCoroutine, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_AbstractCoroutine, (type(self), 0x03251dc, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_AbstractCoroutine, (type(self), 0x03251dc, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_AbstractCoroutine); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__kwargs is not None or self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_AbstractCoroutine, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_AbstractCoroutine, (type(self), 0x03251dc, None), state
|
|
* else:
|
|
* return __pyx_unpickle_AbstractCoroutine, (type(self), 0x03251dc, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_AbstractCoroutine); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_3297756);
|
|
__Pyx_GIVEREF(__pyx_int_3297756);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3297756);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* 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.AbstractCoroutine.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_AbstractCoroutine, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_8__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractCoroutine_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_AbstractCoroutine, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractCoroutine__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_AbstractCoroutine, (type(self), 0x03251dc, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractCoroutine.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":984
|
|
* """
|
|
*
|
|
* def __init__(self, coroutine): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17CoroutineDelegate___init__[] = "Initializer.\n\n :param coroutine: Value that have to be provided.\n :type coroutine: object\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_17CoroutineDelegate___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_coroutine = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coroutine,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coroutine)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 984, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_coroutine = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 984, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.CoroutineDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init__(((struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *)__pyx_v_self), __pyx_v_coroutine);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *__pyx_v_self, PyObject *__pyx_v_coroutine) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
int __pyx_t_9;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":990
|
|
* :type coroutine: object
|
|
* """
|
|
* if isinstance(coroutine, Coroutine) is False: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Callable))
|
|
*/
|
|
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_coroutine, __pyx_ptype_19dependency_injector_9providers_Coroutine);
|
|
__pyx_t_2 = ((__pyx_t_1 == 0) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":991
|
|
* """
|
|
* if isinstance(coroutine, Coroutine) is False:
|
|
* raise Error('{0} can wrap only {1} providers'.format( # <<<<<<<<<<<<<<
|
|
* self.__class__, Callable))
|
|
* super(CoroutineDelegate, self).__init__(coroutine)
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 991, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 991, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
|
|
/* "dependency_injector/providers.pyx":992
|
|
* if isinstance(coroutine, Coroutine) is False:
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Callable)) # <<<<<<<<<<<<<<
|
|
* super(CoroutineDelegate, self).__init__(coroutine)
|
|
*
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 992, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = NULL;
|
|
__pyx_t_9 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_9 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)};
|
|
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 991, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable)};
|
|
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 991, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 991, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
if (__pyx_t_8) {
|
|
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable));
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 991, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 991, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 991, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":990
|
|
* :type coroutine: object
|
|
* """
|
|
* if isinstance(coroutine, Coroutine) is False: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Callable))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":993
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Callable))
|
|
* super(CoroutineDelegate, self).__init__(coroutine) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 993, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 993, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 993, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_coroutine) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_coroutine);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 993, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":984
|
|
* """
|
|
*
|
|
* def __init__(self, coroutine): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_AddTraceback("dependency_injector.providers.CoroutineDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate_2__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17CoroutineDelegate_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx___provides);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_CoroutineDelegate, (type(self), 0x3f4a3b6, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_CoroutineDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_CoroutineDelegate, (type(self), 0x3f4a3b6, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_CoroutineDelegate, (type(self), 0x3f4a3b6, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_CoroutineDelegate); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_CoroutineDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_CoroutineDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
* return __pyx_unpickle_CoroutineDelegate, (type(self), 0x3f4a3b6, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_CoroutineDelegate); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.CoroutineDelegate.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_CoroutineDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17CoroutineDelegate_4__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17CoroutineDelegate_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_CoroutineDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_CoroutineDelegate__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_CoroutineDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.CoroutineDelegate.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1016
|
|
* """
|
|
*
|
|
* def __init__(self, name, default=None): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_13Configuration_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13Configuration___init__[] = "Initializer.\n\n :param name: Name of configuration unit.\n :type name: str\n\n :param default: Default values of configuration unit.\n :type default: dict\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_13Configuration___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_13Configuration_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_name = 0;
|
|
PyObject *__pyx_v_default = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,0};
|
|
PyObject* values[2] = {0,0};
|
|
values[1] = ((PyObject *)Py_None);
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
|
|
if (value) { values[1] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1016, __pyx_L3_error)
|
|
}
|
|
} else {
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
__pyx_v_name = values[0];
|
|
__pyx_v_default = values[1];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1016, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration___init__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_name, __pyx_v_default);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1025
|
|
* :type default: dict
|
|
* """
|
|
* super(Configuration, self).__init__(default) # <<<<<<<<<<<<<<
|
|
*
|
|
* self.__name = name
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1025, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1025, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1025, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_default) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_default);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1025, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1027
|
|
* super(Configuration, self).__init__(default)
|
|
*
|
|
* self.__name = name # <<<<<<<<<<<<<<
|
|
* self.__children = self._create_children(default)
|
|
*
|
|
*/
|
|
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, 1027, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_v_name;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___name);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___name);
|
|
__pyx_v_self->__pyx___name = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1028
|
|
*
|
|
* self.__name = name
|
|
* self.__children = self._create_children(default) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1028, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_default) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_default);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1028, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 1028, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___children);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___children);
|
|
__pyx_v_self->__pyx___children = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1016
|
|
* """
|
|
*
|
|
* def __init__(self, name, default=None): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1030
|
|
* self.__children = self._create_children(default)
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* cdef Configuration copied
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13Configuration_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_copied = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1034
|
|
* cdef Configuration copied
|
|
*
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1034, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1034, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1034, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Configuration))))) __PYX_ERR(1, 1034, __pyx_L1_error)
|
|
__pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1035
|
|
*
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_copied) != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":1036
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__(self.__name)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_copied));
|
|
__pyx_r = ((PyObject *)__pyx_v_copied);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1035
|
|
*
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1038
|
|
* return copied
|
|
*
|
|
* copied = self.__class__(self.__name) # <<<<<<<<<<<<<<
|
|
* copied.__provides = deepcopy(self.__provides, memo)
|
|
* copied.__children = deepcopy(self.__children, memo)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1038, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self->__pyx___name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx___name);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1038, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Configuration))))) __PYX_ERR(1, 1038, __pyx_L1_error)
|
|
__Pyx_DECREF_SET(__pyx_v_copied, ((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1039
|
|
*
|
|
* copied = self.__class__(self.__name)
|
|
* copied.__provides = deepcopy(self.__provides, memo) # <<<<<<<<<<<<<<
|
|
* copied.__children = deepcopy(self.__children, memo)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx_base.__pyx___provides;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1039, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1039, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_copied->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v_copied->__pyx_base.__pyx___provides);
|
|
__pyx_v_copied->__pyx_base.__pyx___provides = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1040
|
|
* copied = self.__class__(self.__name)
|
|
* copied.__provides = deepcopy(self.__provides, memo)
|
|
* copied.__children = deepcopy(self.__children, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* self._copy_overridings(copied, memo)
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___children;
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1040, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1040, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 1040, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_copied->__pyx___children);
|
|
__Pyx_DECREF(__pyx_v_copied->__pyx___children);
|
|
__pyx_v_copied->__pyx___children = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1042
|
|
* copied.__children = deepcopy(self.__children, memo)
|
|
*
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1042, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1044
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_copied));
|
|
__pyx_r = ((PyObject *)__pyx_v_copied);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1030
|
|
* self.__children = self._create_children(default)
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* cdef Configuration copied
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_copied);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1046
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_5__str__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13Configuration_4__str__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_13Configuration_4__str__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_5__str__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_4__str__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_4__str__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1051
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, provides=self.__name) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __getattr__(self, str name):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_v_self->__pyx___name;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1051, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1046
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1053
|
|
* return represent_provider(provider=self, provides=self.__name)
|
|
*
|
|
* def __getattr__(self, str name): # <<<<<<<<<<<<<<
|
|
* """Return child configuration provider."""
|
|
* if name.startswith('__') and name.endswith('__'):
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_7__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13Configuration_6__getattr__[] = "Return child configuration provider.";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_13Configuration_6__getattr__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_7__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(1, 1053, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_6__getattr__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject*)__pyx_v_name));
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__getattr__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name) {
|
|
PyObject *__pyx_v_child_provider = NULL;
|
|
PyObject *__pyx_v_child_name = NULL;
|
|
PyObject *__pyx_v_value = NULL;
|
|
PyObject *__pyx_v_child_value = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__getattr__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1055
|
|
* def __getattr__(self, str name):
|
|
* """Return child configuration provider."""
|
|
* if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<<
|
|
* raise AttributeError(
|
|
* '\'{cls}\' object has no attribute '
|
|
*/
|
|
if (unlikely(__pyx_v_name == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith");
|
|
__PYX_ERR(1, 1055, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = __Pyx_PyStr_Tailmatch(__pyx_v_name, __pyx_n_s__3, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1055, __pyx_L1_error)
|
|
if ((__pyx_t_2 != 0)) {
|
|
} else {
|
|
__pyx_t_1 = (__pyx_t_2 != 0);
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
if (unlikely(__pyx_v_name == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "endswith");
|
|
__PYX_ERR(1, 1055, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = __Pyx_PyStr_Tailmatch(__pyx_v_name, __pyx_n_s__3, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1055, __pyx_L1_error)
|
|
__pyx_t_1 = (__pyx_t_2 != 0);
|
|
__pyx_L4_bool_binop_done:;
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1058
|
|
* raise AttributeError(
|
|
* '\'{cls}\' object has no attribute '
|
|
* '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<<
|
|
* attribute_name=name))
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1058, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1058, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1058, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1058, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 1058, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1059
|
|
* '\'{cls}\' object has no attribute '
|
|
* '\'{attribute_name}\''.format(cls=self.__class__.__name__,
|
|
* attribute_name=name)) # <<<<<<<<<<<<<<
|
|
*
|
|
* child_provider = self.__children.get(name)
|
|
*/
|
|
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_attribute_name, __pyx_v_name) < 0) __PYX_ERR(1, 1058, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1058
|
|
* raise AttributeError(
|
|
* '\'{cls}\' object has no attribute '
|
|
* '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<<
|
|
* attribute_name=name))
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1058, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1056
|
|
* """Return child configuration provider."""
|
|
* if name.startswith('__') and name.endswith('__'):
|
|
* raise AttributeError( # <<<<<<<<<<<<<<
|
|
* '\'{cls}\' object has no attribute '
|
|
* '\'{attribute_name}\''.format(cls=self.__class__.__name__,
|
|
*/
|
|
__pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1056, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__PYX_ERR(1, 1056, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1055
|
|
* def __getattr__(self, str name):
|
|
* """Return child configuration provider."""
|
|
* if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<<
|
|
* raise AttributeError(
|
|
* '\'{cls}\' object has no attribute '
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1061
|
|
* attribute_name=name))
|
|
*
|
|
* child_provider = self.__children.get(name) # <<<<<<<<<<<<<<
|
|
*
|
|
* if child_provider is None:
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___children == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
|
|
__PYX_ERR(1, 1061, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1061, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_v_child_provider = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1063
|
|
* child_provider = self.__children.get(name)
|
|
*
|
|
* if child_provider is None: # <<<<<<<<<<<<<<
|
|
* child_name = self._get_child_full_name(name)
|
|
* child_provider = self.__class__(child_name)
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_child_provider == Py_None);
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
/* "dependency_injector/providers.pyx":1064
|
|
*
|
|
* if child_provider is None:
|
|
* child_name = self._get_child_full_name(name) # <<<<<<<<<<<<<<
|
|
* child_provider = self.__class__(child_name)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_child_full_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1064, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_name);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1064, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_child_name = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1065
|
|
* if child_provider is None:
|
|
* child_name = self._get_child_full_name(name)
|
|
* child_provider = self.__class__(child_name) # <<<<<<<<<<<<<<
|
|
*
|
|
* value = self.__call__()
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1065, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_v_child_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_child_name);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1065, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_child_provider, __pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1067
|
|
* child_provider = self.__class__(child_name)
|
|
*
|
|
* value = self.__call__() # <<<<<<<<<<<<<<
|
|
* if isinstance(value, dict):
|
|
* child_value = value.get(name)
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1067, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1067, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_value = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1068
|
|
*
|
|
* value = self.__call__()
|
|
* if isinstance(value, dict): # <<<<<<<<<<<<<<
|
|
* child_value = value.get(name)
|
|
* child_provider.override(child_value)
|
|
*/
|
|
__pyx_t_2 = PyDict_Check(__pyx_v_value);
|
|
__pyx_t_1 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "dependency_injector/providers.pyx":1069
|
|
* value = self.__call__()
|
|
* if isinstance(value, dict):
|
|
* child_value = value.get(name) # <<<<<<<<<<<<<<
|
|
* child_provider.override(child_value)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1069, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_name);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1069, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_child_value = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1070
|
|
* if isinstance(value, dict):
|
|
* child_value = value.get(name)
|
|
* child_provider.override(child_value) # <<<<<<<<<<<<<<
|
|
*
|
|
* self.__children[name] = child_provider
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_child_provider, __pyx_n_s_override); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1070, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_v_child_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_child_value);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1070, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1068
|
|
*
|
|
* value = self.__call__()
|
|
* if isinstance(value, dict): # <<<<<<<<<<<<<<
|
|
* child_value = value.get(name)
|
|
* child_provider.override(child_value)
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1072
|
|
* child_provider.override(child_value)
|
|
*
|
|
* self.__children[name] = child_provider # <<<<<<<<<<<<<<
|
|
*
|
|
* return child_provider
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___children == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(1, 1072, __pyx_L1_error)
|
|
}
|
|
if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_name, __pyx_v_child_provider) < 0)) __PYX_ERR(1, 1072, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1063
|
|
* child_provider = self.__children.get(name)
|
|
*
|
|
* if child_provider is None: # <<<<<<<<<<<<<<
|
|
* child_name = self._get_child_full_name(name)
|
|
* child_provider = self.__class__(child_name)
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1074
|
|
* self.__children[name] = child_provider
|
|
*
|
|
* return child_provider # <<<<<<<<<<<<<<
|
|
*
|
|
* def get_name(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_child_provider);
|
|
__pyx_r = __pyx_v_child_provider;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1053
|
|
* return represent_provider(provider=self, provides=self.__name)
|
|
*
|
|
* def __getattr__(self, str name): # <<<<<<<<<<<<<<
|
|
* """Return child configuration provider."""
|
|
* if name.startswith('__') and name.endswith('__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_child_provider);
|
|
__Pyx_XDECREF(__pyx_v_child_name);
|
|
__Pyx_XDECREF(__pyx_v_value);
|
|
__Pyx_XDECREF(__pyx_v_child_value);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1076
|
|
* return child_provider
|
|
*
|
|
* def get_name(self): # <<<<<<<<<<<<<<
|
|
* """Name of configuration unit."""
|
|
* return self.__name
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_9get_name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13Configuration_8get_name[] = "Name of configuration unit.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_9get_name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("get_name (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_8get_name(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_8get_name(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("get_name", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1078
|
|
* def get_name(self):
|
|
* """Name of configuration unit."""
|
|
* return self.__name # <<<<<<<<<<<<<<
|
|
*
|
|
* def override(self, provider):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___name);
|
|
__pyx_r = __pyx_v_self->__pyx___name;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1076
|
|
* return child_provider
|
|
*
|
|
* def get_name(self): # <<<<<<<<<<<<<<
|
|
* """Name of configuration unit."""
|
|
* return self.__name
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1080
|
|
* return self.__name
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_11override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13Configuration_10override[] = "Override provider with another provider.\n\n :param provider: Overriding provider.\n :type provider: :py:class:`Provider`\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_11override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_10override(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_provider));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_v_overriding_context = NULL;
|
|
PyObject *__pyx_v_value = NULL;
|
|
PyObject *__pyx_v_name = NULL;
|
|
PyObject *__pyx_v_child_provider = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
Py_ssize_t __pyx_t_6;
|
|
PyObject *(*__pyx_t_7)(PyObject *);
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
__Pyx_RefNannySetupContext("override", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1091
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* overriding_context = super(Configuration, self).override(provider) # <<<<<<<<<<<<<<
|
|
*
|
|
* value = self.__call__()
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1091, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1091, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1091, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_provider);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1091, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_overriding_context = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1093
|
|
* overriding_context = super(Configuration, self).override(provider)
|
|
*
|
|
* value = self.__call__() # <<<<<<<<<<<<<<
|
|
* if not isinstance(value, dict):
|
|
* return
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1093, __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, 1093, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_value = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1094
|
|
*
|
|
* value = self.__call__()
|
|
* if not isinstance(value, dict): # <<<<<<<<<<<<<<
|
|
* return
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyDict_Check(__pyx_v_value);
|
|
__pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "dependency_injector/providers.pyx":1095
|
|
* value = self.__call__()
|
|
* if not isinstance(value, dict):
|
|
* return # <<<<<<<<<<<<<<
|
|
*
|
|
* for name in value:
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1094
|
|
*
|
|
* value = self.__call__()
|
|
* if not isinstance(value, dict): # <<<<<<<<<<<<<<
|
|
* return
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1097
|
|
* return
|
|
*
|
|
* for name in value: # <<<<<<<<<<<<<<
|
|
* child_provider = self.__children.get(name)
|
|
* if child_provider is None:
|
|
*/
|
|
if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
|
|
__pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
|
|
__pyx_t_7 = NULL;
|
|
} else {
|
|
__pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1097, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1097, __pyx_L1_error)
|
|
}
|
|
for (;;) {
|
|
if (likely(!__pyx_t_7)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_1))) {
|
|
if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 1097, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1097, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 1097, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1097, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
#endif
|
|
}
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_7(__pyx_t_1);
|
|
if (unlikely(!__pyx_t_2)) {
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
else __PYX_ERR(1, 1097, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
}
|
|
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1098
|
|
*
|
|
* for name in value:
|
|
* child_provider = self.__children.get(name) # <<<<<<<<<<<<<<
|
|
* if child_provider is None:
|
|
* continue
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___children == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
|
|
__PYX_ERR(1, 1098, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1098, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_XDECREF_SET(__pyx_v_child_provider, __pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1099
|
|
* for name in value:
|
|
* child_provider = self.__children.get(name)
|
|
* if child_provider is None: # <<<<<<<<<<<<<<
|
|
* continue
|
|
* child_provider.override(value.get(name))
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_child_provider == Py_None);
|
|
__pyx_t_4 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
/* "dependency_injector/providers.pyx":1100
|
|
* child_provider = self.__children.get(name)
|
|
* if child_provider is None:
|
|
* continue # <<<<<<<<<<<<<<
|
|
* child_provider.override(value.get(name))
|
|
*
|
|
*/
|
|
goto __pyx_L4_continue;
|
|
|
|
/* "dependency_injector/providers.pyx":1099
|
|
* for name in value:
|
|
* child_provider = self.__children.get(name)
|
|
* if child_provider is None: # <<<<<<<<<<<<<<
|
|
* continue
|
|
* child_provider.override(value.get(name))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1101
|
|
* if child_provider is None:
|
|
* continue
|
|
* child_provider.override(value.get(name)) # <<<<<<<<<<<<<<
|
|
*
|
|
* return overriding_context
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_child_provider, __pyx_n_s_override); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1101, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_get); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1101, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__pyx_t_10 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
|
|
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
|
|
if (likely(__pyx_t_10)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
|
|
__Pyx_INCREF(__pyx_t_10);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_9, function);
|
|
}
|
|
}
|
|
__pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_name);
|
|
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1101, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1101, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1097
|
|
* return
|
|
*
|
|
* for name in value: # <<<<<<<<<<<<<<
|
|
* child_provider = self.__children.get(name)
|
|
* if child_provider is None:
|
|
*/
|
|
__pyx_L4_continue:;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1103
|
|
* child_provider.override(value.get(name))
|
|
*
|
|
* return overriding_context # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset_last_overriding(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_overriding_context);
|
|
__pyx_r = __pyx_v_overriding_context;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1080
|
|
* return self.__name
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_overriding_context);
|
|
__Pyx_XDECREF(__pyx_v_value);
|
|
__Pyx_XDECREF(__pyx_v_name);
|
|
__Pyx_XDECREF(__pyx_v_child_provider);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1105
|
|
* return overriding_context
|
|
*
|
|
* def reset_last_overriding(self): # <<<<<<<<<<<<<<
|
|
* """Reset last overriding provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_13reset_last_overriding(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13Configuration_12reset_last_overriding[] = "Reset last overriding provider.\n\n :raise: :py:exc:`dependency_injector.errors.Error` if provider is not\n overridden.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_13reset_last_overriding(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset_last_overriding (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_12reset_last_overriding(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12reset_last_overriding(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) {
|
|
PyObject *__pyx_v_child = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
Py_ssize_t __pyx_t_3;
|
|
PyObject *(*__pyx_t_4)(PyObject *);
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
int __pyx_t_11;
|
|
__Pyx_RefNannySetupContext("reset_last_overriding", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1113
|
|
* :rtype: None
|
|
* """
|
|
* for child in self.__children.values(): # <<<<<<<<<<<<<<
|
|
* try:
|
|
* child.reset_last_overriding()
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___children == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
|
|
__PYX_ERR(1, 1113, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1113, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
|
|
__pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
|
|
__pyx_t_4 = NULL;
|
|
} else {
|
|
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1113, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1113, __pyx_L1_error)
|
|
}
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
for (;;) {
|
|
if (likely(!__pyx_t_4)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_2))) {
|
|
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1113, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1113, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1113, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1113, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
}
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_4(__pyx_t_2);
|
|
if (unlikely(!__pyx_t_1)) {
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
else __PYX_ERR(1, 1113, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
}
|
|
__Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1114
|
|
* """
|
|
* for child in self.__children.values():
|
|
* try: # <<<<<<<<<<<<<<
|
|
* child.reset_last_overriding()
|
|
* except Error:
|
|
*/
|
|
{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
|
|
__Pyx_XGOTREF(__pyx_t_5);
|
|
__Pyx_XGOTREF(__pyx_t_6);
|
|
__Pyx_XGOTREF(__pyx_t_7);
|
|
/*try:*/ {
|
|
|
|
/* "dependency_injector/providers.pyx":1115
|
|
* for child in self.__children.values():
|
|
* try:
|
|
* child.reset_last_overriding() # <<<<<<<<<<<<<<
|
|
* except Error:
|
|
* pass
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1115, __pyx_L5_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1115, __pyx_L5_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1114
|
|
* """
|
|
* for child in self.__children.values():
|
|
* try: # <<<<<<<<<<<<<<
|
|
* child.reset_last_overriding()
|
|
* except Error:
|
|
*/
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
goto __pyx_L12_try_end;
|
|
__pyx_L5_error:;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1116
|
|
* try:
|
|
* child.reset_last_overriding()
|
|
* except Error: # <<<<<<<<<<<<<<
|
|
* pass
|
|
* super(Configuration, self).reset_last_overriding()
|
|
*/
|
|
__Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1116, __pyx_L7_except_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
__pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_10);
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
__Pyx_ErrRestore(__pyx_t_1, __pyx_t_8, __pyx_t_9);
|
|
__pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0;
|
|
if (__pyx_t_11) {
|
|
__Pyx_ErrRestore(0,0,0);
|
|
goto __pyx_L6_exception_handled;
|
|
}
|
|
goto __pyx_L7_except_error;
|
|
__pyx_L7_except_error:;
|
|
|
|
/* "dependency_injector/providers.pyx":1114
|
|
* """
|
|
* for child in self.__children.values():
|
|
* try: # <<<<<<<<<<<<<<
|
|
* child.reset_last_overriding()
|
|
* except Error:
|
|
*/
|
|
__Pyx_XGIVEREF(__pyx_t_5);
|
|
__Pyx_XGIVEREF(__pyx_t_6);
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
|
|
goto __pyx_L1_error;
|
|
__pyx_L6_exception_handled:;
|
|
__Pyx_XGIVEREF(__pyx_t_5);
|
|
__Pyx_XGIVEREF(__pyx_t_6);
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
|
|
__pyx_L12_try_end:;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1113
|
|
* :rtype: None
|
|
* """
|
|
* for child in self.__children.values(): # <<<<<<<<<<<<<<
|
|
* try:
|
|
* child.reset_last_overriding()
|
|
*/
|
|
}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1118
|
|
* except Error:
|
|
* pass
|
|
* super(Configuration, self).reset_last_overriding() # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset_override(self):
|
|
*/
|
|
__pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1118, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1118, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_reset_last_overriding); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1118, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_9, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1118, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1105
|
|
* return overriding_context
|
|
*
|
|
* def reset_last_overriding(self): # <<<<<<<<<<<<<<
|
|
* """Reset last overriding provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.reset_last_overriding", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_child);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1120
|
|
* super(Configuration, self).reset_last_overriding()
|
|
*
|
|
* def reset_override(self): # <<<<<<<<<<<<<<
|
|
* """Reset all overriding providers.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_15reset_override(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13Configuration_14reset_override[] = "Reset all overriding providers.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_15reset_override(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset_override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_14reset_override(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_14reset_override(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) {
|
|
PyObject *__pyx_v_child = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
Py_ssize_t __pyx_t_3;
|
|
PyObject *(*__pyx_t_4)(PyObject *);
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("reset_override", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1125
|
|
* :rtype: None
|
|
* """
|
|
* for child in self.__children.values(): # <<<<<<<<<<<<<<
|
|
* child.reset_override()
|
|
* super(Configuration, self).reset_override()
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___children == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
|
|
__PYX_ERR(1, 1125, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->__pyx___children); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1125, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
|
|
__pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
|
|
__pyx_t_4 = NULL;
|
|
} else {
|
|
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1125, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1125, __pyx_L1_error)
|
|
}
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
for (;;) {
|
|
if (likely(!__pyx_t_4)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_2))) {
|
|
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1125, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1125, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1125, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1125, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
}
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_4(__pyx_t_2);
|
|
if (unlikely(!__pyx_t_1)) {
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
else __PYX_ERR(1, 1125, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
}
|
|
__Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1126
|
|
* """
|
|
* for child in self.__children.values():
|
|
* child.reset_override() # <<<<<<<<<<<<<<
|
|
* super(Configuration, self).reset_override()
|
|
*
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1126, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_5, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1126, __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":1125
|
|
* :rtype: None
|
|
* """
|
|
* for child in self.__children.values(): # <<<<<<<<<<<<<<
|
|
* child.reset_override()
|
|
* super(Configuration, self).reset_override()
|
|
*/
|
|
}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1127
|
|
* for child in self.__children.values():
|
|
* child.reset_override()
|
|
* super(Configuration, self).reset_override() # <<<<<<<<<<<<<<
|
|
*
|
|
* def update(self, value):
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1127, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1127, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_reset_override); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1127, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_1, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1127, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1120
|
|
* super(Configuration, self).reset_last_overriding()
|
|
*
|
|
* def reset_override(self): # <<<<<<<<<<<<<<
|
|
* """Reset all overriding providers.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.reset_override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_child);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1129
|
|
* super(Configuration, self).reset_override()
|
|
*
|
|
* def update(self, value): # <<<<<<<<<<<<<<
|
|
* """Set configuration options.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_17update(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13Configuration_16update[] = "Set configuration options.\n\n .. deprecated:: 3.11\n\n Use :py:meth:`Configuration.override` instead.\n\n :param value: Value of configuration option.\n :type value: object | dict\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_17update(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("update (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_16update(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_value));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_16update(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_value) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("update", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1141
|
|
* :rtype: None
|
|
* """
|
|
* self.override(value) # <<<<<<<<<<<<<<
|
|
*
|
|
* def _create_children(self, value):
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_override); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1141, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1141, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1129
|
|
* super(Configuration, self).reset_override()
|
|
*
|
|
* def update(self, value): # <<<<<<<<<<<<<<
|
|
* """Set configuration options.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1143
|
|
* self.override(value)
|
|
*
|
|
* def _create_children(self, value): # <<<<<<<<<<<<<<
|
|
* children = dict()
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_19_create_children(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_19_create_children(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_create_children (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_18_create_children(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_value));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_18_create_children(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_value) {
|
|
PyObject *__pyx_v_children = NULL;
|
|
PyObject *__pyx_v_child_name = NULL;
|
|
PyObject *__pyx_v_child_value = NULL;
|
|
PyObject *__pyx_v_child_full_name = NULL;
|
|
PyObject *__pyx_v_child_provider = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
Py_ssize_t __pyx_t_6;
|
|
PyObject *(*__pyx_t_7)(PyObject *);
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *(*__pyx_t_10)(PyObject *);
|
|
int __pyx_t_11;
|
|
__Pyx_RefNannySetupContext("_create_children", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1144
|
|
*
|
|
* def _create_children(self, value):
|
|
* children = dict() # <<<<<<<<<<<<<<
|
|
*
|
|
* if not isinstance(value, dict):
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1144, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_children = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1146
|
|
* children = dict()
|
|
*
|
|
* if not isinstance(value, dict): # <<<<<<<<<<<<<<
|
|
* return children
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyDict_Check(__pyx_v_value);
|
|
__pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "dependency_injector/providers.pyx":1147
|
|
*
|
|
* if not isinstance(value, dict):
|
|
* return children # <<<<<<<<<<<<<<
|
|
*
|
|
* for child_name, child_value in value.items():
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_children);
|
|
__pyx_r = __pyx_v_children;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1146
|
|
* children = dict()
|
|
*
|
|
* if not isinstance(value, dict): # <<<<<<<<<<<<<<
|
|
* return children
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1149
|
|
* return children
|
|
*
|
|
* for child_name, child_value in value.items(): # <<<<<<<<<<<<<<
|
|
* child_full_name = self._get_child_full_name(child_name)
|
|
* child_provider = self.__class__(child_full_name, child_value)
|
|
*/
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
|
|
__pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
|
|
__pyx_t_7 = NULL;
|
|
} else {
|
|
__pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
}
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
for (;;) {
|
|
if (likely(!__pyx_t_7)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_4))) {
|
|
if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
}
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_7(__pyx_t_4);
|
|
if (unlikely(!__pyx_t_1)) {
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
else __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
}
|
|
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
|
|
PyObject* sequence = __pyx_t_1;
|
|
Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
|
|
if (unlikely(size != 2)) {
|
|
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
__PYX_ERR(1, 1149, __pyx_L1_error)
|
|
}
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
|
|
__pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
|
|
} else {
|
|
__pyx_t_5 = PyList_GET_ITEM(sequence, 0);
|
|
__pyx_t_8 = PyList_GET_ITEM(sequence, 1);
|
|
}
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
#else
|
|
__pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
} else {
|
|
Py_ssize_t index = -1;
|
|
__pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
|
|
index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(1, 1149, __pyx_L1_error)
|
|
__pyx_t_10 = NULL;
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
goto __pyx_L7_unpacking_done;
|
|
__pyx_L6_unpacking_failed:;
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_t_10 = NULL;
|
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
__PYX_ERR(1, 1149, __pyx_L1_error)
|
|
__pyx_L7_unpacking_done:;
|
|
}
|
|
__Pyx_XDECREF_SET(__pyx_v_child_name, __pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__Pyx_XDECREF_SET(__pyx_v_child_value, __pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1150
|
|
*
|
|
* for child_name, child_value in value.items():
|
|
* child_full_name = self._get_child_full_name(child_name) # <<<<<<<<<<<<<<
|
|
* child_provider = self.__class__(child_full_name, child_value)
|
|
* children[child_name] = child_provider
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_child_full_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1150, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_v_child_name) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_child_name);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1150, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_XDECREF_SET(__pyx_v_child_full_name, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1151
|
|
* for child_name, child_value in value.items():
|
|
* child_full_name = self._get_child_full_name(child_name)
|
|
* child_provider = self.__class__(child_full_name, child_value) # <<<<<<<<<<<<<<
|
|
* children[child_name] = child_provider
|
|
*
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1151, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_5 = NULL;
|
|
__pyx_t_11 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
__pyx_t_11 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_8)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_child_full_name, __pyx_v_child_value};
|
|
__pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1151, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_child_full_name, __pyx_v_child_value};
|
|
__pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1151, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_9 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1151, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
if (__pyx_t_5) {
|
|
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_child_full_name);
|
|
__Pyx_GIVEREF(__pyx_v_child_full_name);
|
|
PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_11, __pyx_v_child_full_name);
|
|
__Pyx_INCREF(__pyx_v_child_value);
|
|
__Pyx_GIVEREF(__pyx_v_child_value);
|
|
PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_11, __pyx_v_child_value);
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1151, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_XDECREF_SET(__pyx_v_child_provider, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1152
|
|
* child_full_name = self._get_child_full_name(child_name)
|
|
* child_provider = self.__class__(child_full_name, child_value)
|
|
* children[child_name] = child_provider # <<<<<<<<<<<<<<
|
|
*
|
|
* return children
|
|
*/
|
|
if (unlikely(PyDict_SetItem(__pyx_v_children, __pyx_v_child_name, __pyx_v_child_provider) < 0)) __PYX_ERR(1, 1152, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1149
|
|
* return children
|
|
*
|
|
* for child_name, child_value in value.items(): # <<<<<<<<<<<<<<
|
|
* child_full_name = self._get_child_full_name(child_name)
|
|
* child_provider = self.__class__(child_full_name, child_value)
|
|
*/
|
|
}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1154
|
|
* children[child_name] = child_provider
|
|
*
|
|
* return children # <<<<<<<<<<<<<<
|
|
*
|
|
* def _get_child_full_name(self, child_name):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_children);
|
|
__pyx_r = __pyx_v_children;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1143
|
|
* self.override(value)
|
|
*
|
|
* def _create_children(self, value): # <<<<<<<<<<<<<<
|
|
* children = dict()
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration._create_children", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_children);
|
|
__Pyx_XDECREF(__pyx_v_child_name);
|
|
__Pyx_XDECREF(__pyx_v_child_value);
|
|
__Pyx_XDECREF(__pyx_v_child_full_name);
|
|
__Pyx_XDECREF(__pyx_v_child_provider);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1156
|
|
* return children
|
|
*
|
|
* def _get_child_full_name(self, child_name): # <<<<<<<<<<<<<<
|
|
* child_full_name = ''
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_21_get_child_full_name(PyObject *__pyx_v_self, PyObject *__pyx_v_child_name); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_21_get_child_full_name(PyObject *__pyx_v_self, PyObject *__pyx_v_child_name) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_get_child_full_name (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_20_get_child_full_name(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v_child_name));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_20_get_child_full_name(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_child_name) {
|
|
PyObject *__pyx_v_child_full_name = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("_get_child_full_name", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1157
|
|
*
|
|
* def _get_child_full_name(self, child_name):
|
|
* child_full_name = '' # <<<<<<<<<<<<<<
|
|
*
|
|
* if self.__name:
|
|
*/
|
|
__Pyx_INCREF(__pyx_kp_s__6);
|
|
__pyx_v_child_full_name = __pyx_kp_s__6;
|
|
|
|
/* "dependency_injector/providers.pyx":1159
|
|
* child_full_name = ''
|
|
*
|
|
* if self.__name: # <<<<<<<<<<<<<<
|
|
* child_full_name += self.__name + '.'
|
|
* child_full_name += child_name
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___name); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1159, __pyx_L1_error)
|
|
if (__pyx_t_1) {
|
|
|
|
/* "dependency_injector/providers.pyx":1160
|
|
*
|
|
* if self.__name:
|
|
* child_full_name += self.__name + '.' # <<<<<<<<<<<<<<
|
|
* child_full_name += child_name
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyNumber_Add(__pyx_v_self->__pyx___name, __pyx_kp_s__4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1160, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_child_full_name, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1160, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_child_full_name, __pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1159
|
|
* child_full_name = ''
|
|
*
|
|
* if self.__name: # <<<<<<<<<<<<<<
|
|
* child_full_name += self.__name + '.'
|
|
* child_full_name += child_name
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1161
|
|
* if self.__name:
|
|
* child_full_name += self.__name + '.'
|
|
* child_full_name += child_name # <<<<<<<<<<<<<<
|
|
*
|
|
* return child_full_name
|
|
*/
|
|
__pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_child_full_name, __pyx_v_child_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1161, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF_SET(__pyx_v_child_full_name, __pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1163
|
|
* child_full_name += child_name
|
|
*
|
|
* return child_full_name # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_child_full_name);
|
|
__pyx_r = __pyx_v_child_full_name;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1156
|
|
* return children
|
|
*
|
|
* def _get_child_full_name(self, child_name): # <<<<<<<<<<<<<<
|
|
* child_full_name = ''
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration._get_child_full_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_child_full_name);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_22__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_22__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__children, self.__last_overriding, self.__name, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___children);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___children);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx___children);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___name);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___name);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx___name);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->__pyx_base.__pyx___provides);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__children, self.__last_overriding, self.__name, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__children, self.__last_overriding, self.__name, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__children is not None or self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__children, self.__last_overriding, self.__name, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__children is not None or self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Configuration, (type(self), 0xa7663cf, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (__pyx_v_self->__pyx___children != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx___name != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__children is not None or self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Configuration, (type(self), 0xa7663cf, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__children is not None or self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Configuration, (type(self), 0xa7663cf, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_Configuration, (type(self), 0xa7663cf, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Configuration); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_175530959);
|
|
__Pyx_GIVEREF(__pyx_int_175530959);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_175530959);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__children is not None or self.__last_overriding is not None or self.__name is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Configuration, (type(self), 0xa7663cf, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_Configuration, (type(self), 0xa7663cf, None), state
|
|
* else:
|
|
* return __pyx_unpickle_Configuration, (type(self), 0xa7663cf, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Configuration__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Configuration); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_175530959);
|
|
__Pyx_GIVEREF(__pyx_int_175530959);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_175530959);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Configuration, (type(self), 0xa7663cf, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Configuration__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_24__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_24__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_Configuration, (type(self), 0xa7663cf, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Configuration__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Configuration__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Configuration, (type(self), 0xa7663cf, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Configuration__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Configuration.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1219
|
|
* provided_type = None
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_7Factory_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory___init__[] = "Initializer.\n\n :param provides: Provided type.\n :type provides: type\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_7Factory___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_7Factory_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provides = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
__pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
if (PyTuple_GET_SIZE(__pyx_args) > 1) {
|
|
__pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
|
|
if (unlikely(!__pyx_v_args)) {
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
__Pyx_GOTREF(__pyx_v_args);
|
|
} else {
|
|
__pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
|
|
}
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
default:
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1219, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_provides = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1219, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory___init__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_provides, __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
int __pyx_t_11;
|
|
PyObject *__pyx_t_12 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1225
|
|
* :type provides: type
|
|
* """
|
|
* if (self.__class__.provided_type and # <<<<<<<<<<<<<<
|
|
* not issubclass(provides, self.__class__.provided_type)):
|
|
* raise Error('{0} can provide only {1} instances'.format(
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1225, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1225, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1225, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1226
|
|
* """
|
|
* if (self.__class__.provided_type and
|
|
* not issubclass(provides, self.__class__.provided_type)): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} can provide only {1} instances'.format(
|
|
* self.__class__, self.__class__.provided_type))
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1226, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1226, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_4 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1226, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
|
|
__pyx_t_1 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
|
|
/* "dependency_injector/providers.pyx":1225
|
|
* :type provides: type
|
|
* """
|
|
* if (self.__class__.provided_type and # <<<<<<<<<<<<<<
|
|
* not issubclass(provides, self.__class__.provided_type)):
|
|
* raise Error('{0} can provide only {1} instances'.format(
|
|
*/
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1227
|
|
* if (self.__class__.provided_type and
|
|
* not issubclass(provides, self.__class__.provided_type)):
|
|
* raise Error('{0} can provide only {1} instances'.format( # <<<<<<<<<<<<<<
|
|
* self.__class__, self.__class__.provided_type))
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_provide_only_1_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
|
|
/* "dependency_injector/providers.pyx":1228
|
|
* not issubclass(provides, self.__class__.provided_type)):
|
|
* raise Error('{0} can provide only {1} instances'.format(
|
|
* self.__class__, self.__class__.provided_type)) # <<<<<<<<<<<<<<
|
|
*
|
|
* self.__instantiator = Callable(provides, *args, **kwargs)
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1228, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1228, __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, 1228, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_t_9 = NULL;
|
|
__pyx_t_11 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
__pyx_t_11 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_7)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10};
|
|
__pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1227, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10};
|
|
__pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1227, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_12);
|
|
if (__pyx_t_9) {
|
|
__Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_10);
|
|
PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_10);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_10 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__PYX_ERR(1, 1227, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1225
|
|
* :type provides: type
|
|
* """
|
|
* if (self.__class__.provided_type and # <<<<<<<<<<<<<<
|
|
* not issubclass(provides, self.__class__.provided_type)):
|
|
* raise Error('{0} can provide only {1} instances'.format(
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1230
|
|
* self.__class__, self.__class__.provided_type))
|
|
*
|
|
* self.__instantiator = Callable(provides, *args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* self.__attributes = tuple()
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1230, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_provides);
|
|
__pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1230, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1230, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___instantiator));
|
|
__pyx_v_self->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1232
|
|
* self.__instantiator = Callable(provides, *args, **kwargs)
|
|
*
|
|
* self.__attributes = tuple() # <<<<<<<<<<<<<<
|
|
* self.__attributes_len = 0
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1232, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___attributes);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___attributes);
|
|
__pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1233
|
|
*
|
|
* self.__attributes = tuple()
|
|
* self.__attributes_len = 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* super(Factory, self).__init__()
|
|
*/
|
|
__pyx_v_self->__pyx___attributes_len = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1235
|
|
* self.__attributes_len = 0
|
|
*
|
|
* super(Factory, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1235, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1235, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1235, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1235, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1219
|
|
* provided_type = None
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_XDECREF(__pyx_t_12);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1237
|
|
* super(Factory, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_v_copied = NULL;
|
|
PyObject *__pyx_v_cls = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1239
|
|
* def __deepcopy__(self, memo):
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1239, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1239, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1239, __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":1240
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_copied != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":1241
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* cls = self.cls
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1240
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1243
|
|
* return copied
|
|
*
|
|
* cls = self.cls # <<<<<<<<<<<<<<
|
|
* if isinstance(cls, Provider):
|
|
* cls = deepcopy(cls, memo)
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1243, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_cls = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1244
|
|
*
|
|
* cls = self.cls
|
|
* if isinstance(cls, Provider): # <<<<<<<<<<<<<<
|
|
* cls = deepcopy(cls, memo)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_TypeCheck(__pyx_v_cls, __pyx_ptype_19dependency_injector_9providers_Provider);
|
|
__pyx_t_5 = (__pyx_t_6 != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "dependency_injector/providers.pyx":1245
|
|
* cls = self.cls
|
|
* if isinstance(cls, Provider):
|
|
* cls = deepcopy(cls, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__(cls,
|
|
*/
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1245, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_cls, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1245, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF_SET(__pyx_v_cls, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1244
|
|
*
|
|
* cls = self.cls
|
|
* if isinstance(cls, Provider): # <<<<<<<<<<<<<<
|
|
* cls = deepcopy(cls, memo)
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1247
|
|
* cls = deepcopy(cls, memo)
|
|
*
|
|
* copied = self.__class__(cls, # <<<<<<<<<<<<<<
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1247, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1247, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_cls);
|
|
__Pyx_GIVEREF(__pyx_v_cls);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls);
|
|
|
|
/* "dependency_injector/providers.pyx":1248
|
|
*
|
|
* copied = self.__class__(cls,
|
|
* *deepcopy(self.args, memo), # <<<<<<<<<<<<<<
|
|
* **deepcopy(self.kwargs, memo))
|
|
* copied.set_attributes(**deepcopy(self.attributes, memo))
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1248, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1248, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1248, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1247
|
|
* cls = deepcopy(cls, memo)
|
|
*
|
|
* copied = self.__class__(cls, # <<<<<<<<<<<<<<
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
*/
|
|
__pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1247, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1247, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1249
|
|
* copied = self.__class__(cls,
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<<
|
|
* copied.set_attributes(**deepcopy(self.attributes, memo))
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1249, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1249, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1249, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(__pyx_t_8 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
|
|
__PYX_ERR(1, 1249, __pyx_L1_error)
|
|
}
|
|
if (likely(PyDict_CheckExact(__pyx_t_8))) {
|
|
__pyx_t_3 = PyDict_Copy(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1249, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
} else {
|
|
__pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1247, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1247
|
|
* cls = deepcopy(cls, memo)
|
|
*
|
|
* copied = self.__class__(cls, # <<<<<<<<<<<<<<
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1247, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1250
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
* copied.set_attributes(**deepcopy(self.attributes, memo)) # <<<<<<<<<<<<<<
|
|
*
|
|
* self._copy_overridings(copied, memo)
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1250, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
|
|
__PYX_ERR(1, 1250, __pyx_L1_error)
|
|
}
|
|
if (likely(PyDict_CheckExact(__pyx_t_1))) {
|
|
__pyx_t_3 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
} else {
|
|
__pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
}
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1252
|
|
* copied.set_attributes(**deepcopy(self.attributes, memo))
|
|
*
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 1252, __pyx_L1_error)
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1252, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_Factory *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1254
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1237
|
|
* super(Factory, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_copied);
|
|
__Pyx_XDECREF(__pyx_v_cls);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1256
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_5__str__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_4__str__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_7Factory_4__str__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_5__str__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_4__str__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4__str__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1261
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, # <<<<<<<<<<<<<<
|
|
* provides=self.__instantiator.provides)
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
|
|
/* "dependency_injector/providers.pyx":1262
|
|
* """
|
|
* return represent_provider(provider=self,
|
|
* provides=self.__instantiator.provides) # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1262, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
|
|
/* "dependency_injector/providers.pyx":1261
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, # <<<<<<<<<<<<<<
|
|
* provides=self.__instantiator.provides)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1261, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1256
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1265
|
|
*
|
|
* @property
|
|
* def cls(self): # <<<<<<<<<<<<<<
|
|
* """Return provided type."""
|
|
* return self.__instantiator.provides
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_3cls_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_3cls_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_3cls___get__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_3cls___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1267
|
|
* def cls(self):
|
|
* """Return provided type."""
|
|
* return self.__instantiator.provides # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1267, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1265
|
|
*
|
|
* @property
|
|
* def cls(self): # <<<<<<<<<<<<<<
|
|
* """Return provided type."""
|
|
* return self.__instantiator.provides
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.cls.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1270
|
|
*
|
|
* @property
|
|
* def args(self): # <<<<<<<<<<<<<<
|
|
* """Return positional argument injections."""
|
|
* return self.__instantiator.args
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_4args_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_4args___get__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4args___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1272
|
|
* def args(self):
|
|
* """Return positional argument injections."""
|
|
* return self.__instantiator.args # <<<<<<<<<<<<<<
|
|
*
|
|
* def add_args(self, *args):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1272, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1270
|
|
*
|
|
* @property
|
|
* def args(self): # <<<<<<<<<<<<<<
|
|
* """Return positional argument injections."""
|
|
* return self.__instantiator.args
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.args.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1274
|
|
* return self.__instantiator.args
|
|
*
|
|
* def add_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Add __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_6add_args[] = "Add __init__ positional argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("add_args (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_args", 0))) return NULL;
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_6add_args(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_args);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("add_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1279
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.add_args(*args) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1279, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1279, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1280
|
|
* """
|
|
* self.__instantiator.add_args(*args)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def set_args(self, *args):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1274
|
|
* return self.__instantiator.args
|
|
*
|
|
* def add_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Add __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.add_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1282
|
|
* return self
|
|
*
|
|
* def set_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Set __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_8set_args[] = "Set __init__ positional argument injections.\n\n Existing __init__ positional argument injections are dropped.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("set_args (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_args", 0))) return NULL;
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_8set_args(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_args);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("set_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1289
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.set_args(*args) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1289, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1289, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1290
|
|
* """
|
|
* self.__instantiator.set_args(*args)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def clear_args(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1282
|
|
* return self
|
|
*
|
|
* def set_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Set __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.set_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1292
|
|
* return self
|
|
*
|
|
* def clear_args(self): # <<<<<<<<<<<<<<
|
|
* """Drop __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_10clear_args[] = "Drop __init__ positional argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("clear_args (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_10clear_args(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("clear_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1297
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.clear_args() # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1297, __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, 1297, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1298
|
|
* """
|
|
* self.__instantiator.clear_args()
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1292
|
|
* return self
|
|
*
|
|
* def clear_args(self): # <<<<<<<<<<<<<<
|
|
* """Drop __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* 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.Factory.clear_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1301
|
|
*
|
|
* @property
|
|
* def kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Return keyword argument injections."""
|
|
* return self.__instantiator.kwargs
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_6kwargs_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_6kwargs_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___get__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1303
|
|
* def kwargs(self):
|
|
* """Return keyword argument injections."""
|
|
* return self.__instantiator.kwargs # <<<<<<<<<<<<<<
|
|
*
|
|
* def add_kwargs(self, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1303, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1301
|
|
*
|
|
* @property
|
|
* def kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Return keyword argument injections."""
|
|
* return self.__instantiator.kwargs
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.kwargs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1305
|
|
* return self.__instantiator.kwargs
|
|
*
|
|
* def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Add __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_12add_kwargs[] = "Add __init__ keyword argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("add_kwargs (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("add_kwargs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_kwargs", 1))) return NULL;
|
|
if (__pyx_kwds) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("add_kwargs", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1310
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.add_kwargs(**kwargs) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1310, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1310, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1311
|
|
* """
|
|
* self.__instantiator.add_kwargs(**kwargs)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def set_kwargs(self, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1305
|
|
* return self.__instantiator.kwargs
|
|
*
|
|
* def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Add __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.add_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1313
|
|
* return self
|
|
*
|
|
* def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Set __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_14set_kwargs[] = "Set __init__ keyword argument injections.\n\n Existing __init__ keyword argument injections are dropped.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("set_kwargs (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("set_kwargs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_kwargs", 1))) return NULL;
|
|
if (__pyx_kwds) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("set_kwargs", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1320
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.set_kwargs(**kwargs) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1320, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1320, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1321
|
|
* """
|
|
* self.__instantiator.set_kwargs(**kwargs)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def clear_kwargs(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1313
|
|
* return self
|
|
*
|
|
* def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Set __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.set_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1323
|
|
* return self
|
|
*
|
|
* def clear_kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Drop __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_16clear_kwargs[] = "Drop __init__ keyword argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("clear_kwargs (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("clear_kwargs", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1328
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.clear_kwargs() # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1328, __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, 1328, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1329
|
|
* """
|
|
* self.__instantiator.clear_kwargs()
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1323
|
|
* return self
|
|
*
|
|
* def clear_kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Drop __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* 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.Factory.clear_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1332
|
|
*
|
|
* @property
|
|
* def attributes(self): # <<<<<<<<<<<<<<
|
|
* """Return attribute injections."""
|
|
* cdef int index
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_10attributes_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_10attributes_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_10attributes___get__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes___get__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) {
|
|
int __pyx_v_index;
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_attribute = 0;
|
|
PyObject *__pyx_v_attributes = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1338
|
|
* cdef dict attributes
|
|
*
|
|
* attributes = dict() # <<<<<<<<<<<<<<
|
|
* for index in range(self.__attributes_len):
|
|
* attribute = self.__attributes[index]
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1338, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_attributes = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1339
|
|
*
|
|
* attributes = dict()
|
|
* for index in range(self.__attributes_len): # <<<<<<<<<<<<<<
|
|
* attribute = self.__attributes[index]
|
|
* attributes[attribute.__name] = attribute.__value
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___attributes_len;
|
|
__pyx_t_3 = __pyx_t_2;
|
|
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
__pyx_v_index = __pyx_t_4;
|
|
|
|
/* "dependency_injector/providers.pyx":1340
|
|
* attributes = dict()
|
|
* for index in range(self.__attributes_len):
|
|
* attribute = self.__attributes[index] # <<<<<<<<<<<<<<
|
|
* attributes[attribute.__name] = attribute.__value
|
|
* return attributes
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___attributes == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(1, 1340, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___attributes, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1340, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 1340, __pyx_L1_error)
|
|
__Pyx_XDECREF_SET(__pyx_v_attribute, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1341
|
|
* for index in range(self.__attributes_len):
|
|
* attribute = self.__attributes[index]
|
|
* attributes[attribute.__name] = attribute.__value # <<<<<<<<<<<<<<
|
|
* return attributes
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_attribute->__pyx_base.__pyx___value;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_v_attribute->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 1341, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1342
|
|
* attribute = self.__attributes[index]
|
|
* attributes[attribute.__name] = attribute.__value
|
|
* return attributes # <<<<<<<<<<<<<<
|
|
*
|
|
* def add_attributes(self, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_attributes);
|
|
__pyx_r = __pyx_v_attributes;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1332
|
|
*
|
|
* @property
|
|
* def attributes(self): # <<<<<<<<<<<<<<
|
|
* """Return attribute injections."""
|
|
* cdef int index
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.attributes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_attribute);
|
|
__Pyx_XDECREF(__pyx_v_attributes);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1344
|
|
* return attributes
|
|
*
|
|
* def add_attributes(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Add attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_19add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_18add_attributes[] = "Add attribute injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_19add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("add_attributes (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("add_attributes", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_attributes", 1))) return NULL;
|
|
__pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_18add_attributes(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
Py_ssize_t __pyx_t_3;
|
|
__Pyx_RefNannySetupContext("add_attributes", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1349
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__attributes += parse_named_injections(kwargs) # <<<<<<<<<<<<<<
|
|
* self.__attributes_len = len(self.__attributes)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1349, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___attributes, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1349, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___attributes);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___attributes);
|
|
__pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1350
|
|
* """
|
|
* self.__attributes += parse_named_injections(kwargs)
|
|
* self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___attributes;
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
if (unlikely(__pyx_t_2 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 1350, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1350, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_self->__pyx___attributes_len = __pyx_t_3;
|
|
|
|
/* "dependency_injector/providers.pyx":1351
|
|
* self.__attributes += parse_named_injections(kwargs)
|
|
* self.__attributes_len = len(self.__attributes)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def set_attributes(self, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1344
|
|
* return attributes
|
|
*
|
|
* def add_attributes(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Add attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.add_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1353
|
|
* return self
|
|
*
|
|
* def set_attributes(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Set attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_21set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_20set_attributes[] = "Set attribute injections.\n\n Existing attribute injections are dropped.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_21set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("set_attributes (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("set_attributes", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_attributes", 1))) return NULL;
|
|
__pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_20set_attributes(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
Py_ssize_t __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("set_attributes", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1360
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__attributes = parse_named_injections(kwargs) # <<<<<<<<<<<<<<
|
|
* self.__attributes_len = len(self.__attributes)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1360, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___attributes);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___attributes);
|
|
__pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1361
|
|
* """
|
|
* self.__attributes = parse_named_injections(kwargs)
|
|
* self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___attributes;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 1361, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1361, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v_self->__pyx___attributes_len = __pyx_t_2;
|
|
|
|
/* "dependency_injector/providers.pyx":1362
|
|
* self.__attributes = parse_named_injections(kwargs)
|
|
* self.__attributes_len = len(self.__attributes)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def clear_attributes(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1353
|
|
* return self
|
|
*
|
|
* def set_attributes(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Set attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.set_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1364
|
|
* return self
|
|
*
|
|
* def clear_attributes(self): # <<<<<<<<<<<<<<
|
|
* """Drop attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_23clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_22clear_attributes[] = "Drop attribute injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_23clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("clear_attributes (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_22clear_attributes(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attributes(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
Py_ssize_t __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("clear_attributes", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1369
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__attributes = tuple() # <<<<<<<<<<<<<<
|
|
* self.__attributes_len = len(self.__attributes)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1369, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___attributes);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___attributes);
|
|
__pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1370
|
|
* """
|
|
* self.__attributes = tuple()
|
|
* self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___attributes;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 1370, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1370, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v_self->__pyx___attributes_len = __pyx_t_2;
|
|
|
|
/* "dependency_injector/providers.pyx":1371
|
|
* self.__attributes = tuple()
|
|
* self.__attributes_len = len(self.__attributes)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1364
|
|
* return self
|
|
*
|
|
* def clear_attributes(self): # <<<<<<<<<<<<<<
|
|
* """Drop attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.clear_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1373
|
|
* return self
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return new instance."""
|
|
* return __factory_call(self, args, kwargs)
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1373, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_7Factory_25_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1373, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1373, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1373, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1373, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1375
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return new instance."""
|
|
* return __factory_call(self, args, kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___factory_call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1375, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1373
|
|
* return self
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return new instance."""
|
|
* return __factory_call(self, args, kwargs)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_7Factory_24_provide[] = "Return new instance.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1373, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1373, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1373, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1373, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1373, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_24_provide(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24_provide(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_7Factory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1373, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_27__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_27__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_26__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_26__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___attributes);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___attributes);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->__pyx___attributes);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__pyx_t_1 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_v__dict = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_3 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_4 = (__pyx_t_3 != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
|
|
__pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Factory, (type(self), 0xa73b866, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_3 = (__pyx_v_self->__pyx___attributes != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_3 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx___instantiator) != Py_None);
|
|
__pyx_t_3 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_3) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_3;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_3 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_3 = (__pyx_t_5 != 0);
|
|
__pyx_t_4 = __pyx_t_3;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_4;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Factory, (type(self), 0xa73b866, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Factory, (type(self), 0xa73b866, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_Factory, (type(self), 0xa73b866, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_175356006);
|
|
__Pyx_GIVEREF(__pyx_int_175356006);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_175356006);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Factory, (type(self), 0xa73b866, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_Factory, (type(self), 0xa73b866, None), state
|
|
* else:
|
|
* return __pyx_unpickle_Factory, (type(self), 0xa73b866, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Factory__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Factory); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_175356006);
|
|
__Pyx_GIVEREF(__pyx_int_175356006);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_175356006);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Factory, (type(self), 0xa73b866, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Factory__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_29__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_29__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_28__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_28__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_Factory, (type(self), 0xa73b866, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Factory__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Factory__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Factory, (type(self), 0xa73b866, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Factory__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Factory.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16DelegatedFactory_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16DelegatedFactory_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16DelegatedFactory___reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16DelegatedFactory___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___attributes_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___attributes);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___attributes);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->__pyx_base.__pyx___attributes);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_t_1 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_v__dict = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_3 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_4 = (__pyx_t_3 != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
|
|
__pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedFactory, (type(self), 0xa73b866, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_3 = (__pyx_v_self->__pyx_base.__pyx___attributes != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_3 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator) != Py_None);
|
|
__pyx_t_3 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_3) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_3;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_3 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_3 = (__pyx_t_5 != 0);
|
|
__pyx_t_4 = __pyx_t_3;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_4;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedFactory, (type(self), 0xa73b866, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedFactory, (type(self), 0xa73b866, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedFactory, (type(self), 0xa73b866, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_DelegatedFactory); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_175356006);
|
|
__Pyx_GIVEREF(__pyx_int_175356006);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_175356006);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedFactory, (type(self), 0xa73b866, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_DelegatedFactory, (type(self), 0xa73b866, None), state
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedFactory, (type(self), 0xa73b866, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedFactory__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DelegatedFactory); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_175356006);
|
|
__Pyx_GIVEREF(__pyx_int_175356006);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_175356006);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DelegatedFactory.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedFactory, (type(self), 0xa73b866, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedFactory__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16DelegatedFactory_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16DelegatedFactory_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16DelegatedFactory_2__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16DelegatedFactory_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_DelegatedFactory, (type(self), 0xa73b866, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedFactory__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedFactory__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedFactory, (type(self), 0xa73b866, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedFactory__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DelegatedFactory.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1409
|
|
* """
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided object.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_15AbstractFactory___call__[] = "Return provided object.\n\n Callable interface implementation.\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_15AbstractFactory___call__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
|
|
if (unlikely(__pyx_kwds)) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_15AbstractFactory___call__(((struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
__Pyx_RefNannySetupContext("__call__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1414
|
|
* Callable interface implementation.
|
|
* """
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*/
|
|
__pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) == Py_None);
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1415
|
|
* """
|
|
* if self.__last_overriding is None:
|
|
* raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<<
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1415, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1415, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self));
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1415, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1415, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 1415, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1414
|
|
* Callable interface implementation.
|
|
* """
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1416
|
|
* if self.__last_overriding is None:
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* def override(self, provider):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1416, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1409
|
|
* """
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided object.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractFactory.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1418
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_3override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_15AbstractFactory_2override[] = "Override provider with another provider.\n\n :param provider: Overriding provider.\n :type provider: :py:class:`Provider`\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_3override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_15AbstractFactory_2override(((struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *)__pyx_v_self), ((PyObject *)__pyx_v_provider));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2override(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
int __pyx_t_8;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("override", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1429
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* if not isinstance(provider, Factory): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Factory))
|
|
*/
|
|
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_provider, __pyx_ptype_19dependency_injector_9providers_Factory);
|
|
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1430
|
|
* """
|
|
* if not isinstance(provider, Factory):
|
|
* raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<<
|
|
* '{1} providers'.format(self, Factory))
|
|
* return super(AbstractFactory, self).override(provider)
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1430, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
|
|
/* "dependency_injector/providers.pyx":1431
|
|
* if not isinstance(provider, Factory):
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Factory)) # <<<<<<<<<<<<<<
|
|
* return super(AbstractFactory, self).override(provider)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1431, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
__pyx_t_8 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_8 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)};
|
|
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1431, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)};
|
|
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1431, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1431, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
if (__pyx_t_7) {
|
|
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
|
|
}
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1431, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1430, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 1430, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1429
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* if not isinstance(provider, Factory): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Factory))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1432
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, Factory))
|
|
* return super(AbstractFactory, self).override(provider) # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1432, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractFactory));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractFactory));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractFactory));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1432, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1432, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1432, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1418
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractFactory.override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1434
|
|
* return super(AbstractFactory, self).override(provider)
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return result of provided callable's call."""
|
|
* raise NotImplementedError('Abstract provider forward providing logic '
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__provide(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1434, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_15AbstractFactory_5_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1434, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1434, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1434, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1434, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1436
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return result of provided callable's call."""
|
|
* raise NotImplementedError('Abstract provider forward providing logic ' # <<<<<<<<<<<<<<
|
|
* 'to overriding provider')
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1436, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 1436, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1434
|
|
* return super(AbstractFactory, self).override(provider)
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return result of provided callable's call."""
|
|
* raise NotImplementedError('Abstract provider forward providing logic '
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractFactory._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_15AbstractFactory_4_provide[] = "Return result of provided callable's call.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1434, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1434, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1434, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractFactory._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1434, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1434, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_15AbstractFactory_4_provide(((struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_4_provide(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_15AbstractFactory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1434, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractFactory._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_15AbstractFactory_6__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___attributes_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___attributes);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___attributes);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->__pyx_base.__pyx___attributes);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_t_1 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_v__dict = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_3 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_4 = (__pyx_t_3 != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
|
|
__pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__attributes, self.__attributes_len, self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_AbstractFactory, (type(self), 0xa73b866, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_3 = (__pyx_v_self->__pyx_base.__pyx___attributes != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_3 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator) != Py_None);
|
|
__pyx_t_3 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_3) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_3;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_3 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_3 = (__pyx_t_5 != 0);
|
|
__pyx_t_4 = __pyx_t_3;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_4;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_AbstractFactory, (type(self), 0xa73b866, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_AbstractFactory, (type(self), 0xa73b866, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_AbstractFactory, (type(self), 0xa73b866, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_AbstractFactory); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_175356006);
|
|
__Pyx_GIVEREF(__pyx_int_175356006);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_175356006);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__attributes is not None or self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_AbstractFactory, (type(self), 0xa73b866, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_AbstractFactory, (type(self), 0xa73b866, None), state
|
|
* else:
|
|
* return __pyx_unpickle_AbstractFactory, (type(self), 0xa73b866, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_AbstractFactory__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_AbstractFactory); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_175356006);
|
|
__Pyx_GIVEREF(__pyx_int_175356006);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_175356006);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractFactory.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_AbstractFactory, (type(self), 0xa73b866, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractFactory__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_15AbstractFactory_8__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_AbstractFactory, (type(self), 0xa73b866, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_AbstractFactory__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractFactory__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_AbstractFactory, (type(self), 0xa73b866, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractFactory__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractFactory.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1450
|
|
* """
|
|
*
|
|
* def __init__(self, factory): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_15FactoryDelegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_15FactoryDelegate___init__[] = "Initializer.\n\n :param factory: Value that have to be provided.\n :type factory: object\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_15FactoryDelegate___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_15FactoryDelegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_factory = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_factory,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_factory)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1450, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_factory = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1450, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__(((struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *)__pyx_v_self), __pyx_v_factory);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *__pyx_v_self, PyObject *__pyx_v_factory) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
int __pyx_t_9;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1456
|
|
* :type factory: object
|
|
* """
|
|
* if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Factory))
|
|
*/
|
|
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_factory, __pyx_ptype_19dependency_injector_9providers_Factory);
|
|
__pyx_t_2 = ((__pyx_t_1 == 0) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1457
|
|
* """
|
|
* if isinstance(factory, Factory) is False:
|
|
* raise Error('{0} can wrap only {1} providers'.format( # <<<<<<<<<<<<<<
|
|
* self.__class__, Factory))
|
|
* super(FactoryDelegate, self).__init__(factory)
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1457, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1457, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
|
|
/* "dependency_injector/providers.pyx":1458
|
|
* if isinstance(factory, Factory) is False:
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Factory)) # <<<<<<<<<<<<<<
|
|
* super(FactoryDelegate, self).__init__(factory)
|
|
*
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1458, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = NULL;
|
|
__pyx_t_9 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_9 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)};
|
|
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1457, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)};
|
|
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1457, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1457, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
if (__pyx_t_8) {
|
|
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1457, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1457, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 1457, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1456
|
|
* :type factory: object
|
|
* """
|
|
* if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Factory))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1459
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, Factory))
|
|
* super(FactoryDelegate, self).__init__(factory) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1459, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryDelegate));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryDelegate));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryDelegate));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1459, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1459, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_factory) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_factory);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1459, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1450
|
|
* """
|
|
*
|
|
* def __init__(self, factory): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15FactoryDelegate_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15FactoryDelegate_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_15FactoryDelegate_2__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15FactoryDelegate_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx___provides);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_FactoryDelegate, (type(self), 0x3f4a3b6, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_FactoryDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_FactoryDelegate, (type(self), 0x3f4a3b6, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_FactoryDelegate, (type(self), 0x3f4a3b6, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_FactoryDelegate); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_FactoryDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_FactoryDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
* return __pyx_unpickle_FactoryDelegate, (type(self), 0x3f4a3b6, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_FactoryDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_FactoryDelegate); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryDelegate.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_FactoryDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_FactoryDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15FactoryDelegate_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15FactoryDelegate_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_15FactoryDelegate_4__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_15FactoryDelegate_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_FactoryDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_FactoryDelegate__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_FactoryDelegate__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_FactoryDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_FactoryDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryDelegate.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1478
|
|
* __IS_DELEGATED__ = True
|
|
*
|
|
* def __init__(self, **factories): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_16FactoryAggregate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate___init__[] = "Initializer.\n\n :param factories: Dictionary of aggregate factories.\n :type factories: dict[str, :py:class:`Factory`]\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_16FactoryAggregate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_factories = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
|
|
__pyx_v_factories = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_factories)) return -1;
|
|
__Pyx_GOTREF(__pyx_v_factories);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate___init__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), __pyx_v_factories);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_factories);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_16FactoryAggregate___init__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factories) {
|
|
PyObject *__pyx_v_factory = NULL;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
Py_ssize_t __pyx_t_3;
|
|
PyObject *(*__pyx_t_4)(PyObject *);
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
PyObject *__pyx_t_11 = NULL;
|
|
int __pyx_t_12;
|
|
PyObject *__pyx_t_13 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1484
|
|
* :type factories: dict[str, :py:class:`Factory`]
|
|
* """
|
|
* for factory in factories.values(): # <<<<<<<<<<<<<<
|
|
* if isinstance(factory, Factory) is False:
|
|
* raise Error(
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_factories); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1484, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
|
|
__pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
|
|
__pyx_t_4 = NULL;
|
|
} else {
|
|
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1484, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1484, __pyx_L1_error)
|
|
}
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
for (;;) {
|
|
if (likely(!__pyx_t_4)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_2))) {
|
|
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1484, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1484, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1484, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1484, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
}
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_4(__pyx_t_2);
|
|
if (unlikely(!__pyx_t_1)) {
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
else __PYX_ERR(1, 1484, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
}
|
|
__Pyx_XDECREF_SET(__pyx_v_factory, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1485
|
|
* """
|
|
* for factory in factories.values():
|
|
* if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<<
|
|
* raise Error(
|
|
* '{0} can aggregate only instances of {1}, given - {2}'
|
|
*/
|
|
__pyx_t_5 = __Pyx_TypeCheck(__pyx_v_factory, __pyx_ptype_19dependency_injector_9providers_Factory);
|
|
__pyx_t_6 = ((__pyx_t_5 == 0) != 0);
|
|
if (unlikely(__pyx_t_6)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1486
|
|
* for factory in factories.values():
|
|
* if isinstance(factory, Factory) is False:
|
|
* raise Error( # <<<<<<<<<<<<<<
|
|
* '{0} can aggregate only instances of {1}, given - {2}'
|
|
* .format(self.__class__, Factory, factory))
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1486, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
|
|
/* "dependency_injector/providers.pyx":1488
|
|
* raise Error(
|
|
* '{0} can aggregate only instances of {1}, given - {2}'
|
|
* .format(self.__class__, Factory, factory)) # <<<<<<<<<<<<<<
|
|
* self.__factories = factories
|
|
* super(FactoryAggregate, self).__init__()
|
|
*/
|
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_aggregate_only_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1488, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1488, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
__pyx_t_11 = NULL;
|
|
__pyx_t_12 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
|
|
__pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
|
|
if (likely(__pyx_t_11)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
|
|
__Pyx_INCREF(__pyx_t_11);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_9, function);
|
|
__pyx_t_12 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_9)) {
|
|
PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_10, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_v_factory};
|
|
__pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1488, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
|
|
PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_10, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_v_factory};
|
|
__pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1488, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_13 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1488, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_13);
|
|
if (__pyx_t_11) {
|
|
__Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_10);
|
|
PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_t_10);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory));
|
|
__Pyx_INCREF(__pyx_v_factory);
|
|
__Pyx_GIVEREF(__pyx_v_factory);
|
|
PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_12, __pyx_v_factory);
|
|
__pyx_t_10 = 0;
|
|
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1488, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1486, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 1486, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1485
|
|
* """
|
|
* for factory in factories.values():
|
|
* if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<<
|
|
* raise Error(
|
|
* '{0} can aggregate only instances of {1}, given - {2}'
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1484
|
|
* :type factories: dict[str, :py:class:`Factory`]
|
|
* """
|
|
* for factory in factories.values(): # <<<<<<<<<<<<<<
|
|
* if isinstance(factory, Factory) is False:
|
|
* raise Error(
|
|
*/
|
|
}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1489
|
|
* '{0} can aggregate only instances of {1}, given - {2}'
|
|
* .format(self.__class__, Factory, factory))
|
|
* self.__factories = factories # <<<<<<<<<<<<<<
|
|
* super(FactoryAggregate, self).__init__()
|
|
*
|
|
*/
|
|
__Pyx_INCREF(__pyx_v_factories);
|
|
__Pyx_GIVEREF(__pyx_v_factories);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___factories);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___factories);
|
|
__pyx_v_self->__pyx___factories = __pyx_v_factories;
|
|
|
|
/* "dependency_injector/providers.pyx":1490
|
|
* .format(self.__class__, Factory, factory))
|
|
* self.__factories = factories
|
|
* super(FactoryAggregate, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1490, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1490, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1490, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_1, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1490, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1478
|
|
* __IS_DELEGATED__ = True
|
|
*
|
|
* def __init__(self, **factories): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_XDECREF(__pyx_t_11);
|
|
__Pyx_XDECREF(__pyx_t_13);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_factory);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1492
|
|
* super(FactoryAggregate, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* cdef FactoryAggregate copied
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_copied = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1496
|
|
* cdef FactoryAggregate copied
|
|
*
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1496, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1496, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1496, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_FactoryAggregate))))) __PYX_ERR(1, 1496, __pyx_L1_error)
|
|
__pyx_v_copied = ((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1497
|
|
*
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_copied) != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":1498
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__()
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_copied));
|
|
__pyx_r = ((PyObject *)__pyx_v_copied);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1497
|
|
*
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1500
|
|
* return copied
|
|
*
|
|
* copied = self.__class__() # <<<<<<<<<<<<<<
|
|
* copied.__factories = deepcopy(self.__factories, memo)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1500, __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, 1500, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_FactoryAggregate))))) __PYX_ERR(1, 1500, __pyx_L1_error)
|
|
__Pyx_DECREF_SET(__pyx_v_copied, ((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1501
|
|
*
|
|
* copied = self.__class__()
|
|
* copied.__factories = deepcopy(self.__factories, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* self._copy_overridings(copied, memo)
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___factories;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1501, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_1, 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1501, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 1501, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_copied->__pyx___factories);
|
|
__Pyx_DECREF(__pyx_v_copied->__pyx___factories);
|
|
__pyx_v_copied->__pyx___factories = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1503
|
|
* copied.__factories = deepcopy(self.__factories, memo)
|
|
*
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1503, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1505
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* def __call__(self, factory_name, *args, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_copied));
|
|
__pyx_r = ((PyObject *)__pyx_v_copied);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1492
|
|
* super(FactoryAggregate, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* cdef FactoryAggregate copied
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_copied);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1507
|
|
* return copied
|
|
*
|
|
* def __call__(self, factory_name, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Create new object using factory with provided name.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_4__call__[] = "Create new object using factory with provided name.\n\n Callable interface implementation.\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_4__call__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_factory_name = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
|
|
__pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
if (PyTuple_GET_SIZE(__pyx_args) > 1) {
|
|
__pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
|
|
if (unlikely(!__pyx_v_args)) {
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
}
|
|
__Pyx_GOTREF(__pyx_v_args);
|
|
} else {
|
|
__pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
|
|
}
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_factory_name,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
default:
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_factory_name)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__call__") < 0)) __PYX_ERR(1, 1507, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_factory_name = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1507, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_4__call__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), __pyx_v_factory_name, __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_4__call__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factory_name, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__call__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1512
|
|
* Callable interface implementation.
|
|
* """
|
|
* return self.__get_factory(factory_name)(*args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __getattr__(self, factory_name):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
if (!(likely(PyString_CheckExact(__pyx_v_factory_name))||((__pyx_v_factory_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_factory_name)->tp_name), 0))) __PYX_ERR(1, 1512, __pyx_L1_error)
|
|
__pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx___get_factory(__pyx_v_self, ((PyObject*)__pyx_v_factory_name))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1512, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1512, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1507
|
|
* return copied
|
|
*
|
|
* def __call__(self, factory_name, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Create new object using factory with provided name.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1514
|
|
* return self.__get_factory(factory_name)(*args, **kwargs)
|
|
*
|
|
* def __getattr__(self, factory_name): # <<<<<<<<<<<<<<
|
|
* """Return aggregated factory."""
|
|
* return self.__get_factory(factory_name)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_7__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_factory_name); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_6__getattr__[] = "Return aggregated factory.";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_6__getattr__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_7__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_factory_name) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_6__getattr__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), ((PyObject *)__pyx_v_factory_name));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_6__getattr__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factory_name) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__getattr__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1516
|
|
* def __getattr__(self, factory_name):
|
|
* """Return aggregated factory."""
|
|
* return self.__get_factory(factory_name) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
if (!(likely(PyString_CheckExact(__pyx_v_factory_name))||((__pyx_v_factory_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_factory_name)->tp_name), 0))) __PYX_ERR(1, 1516, __pyx_L1_error)
|
|
__pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx___get_factory(__pyx_v_self, ((PyObject*)__pyx_v_factory_name))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1516, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1514
|
|
* return self.__get_factory(factory_name)(*args, **kwargs)
|
|
*
|
|
* def __getattr__(self, factory_name): # <<<<<<<<<<<<<<
|
|
* """Return aggregated factory."""
|
|
* return self.__get_factory(factory_name)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1518
|
|
* return self.__get_factory(factory_name)
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9__str__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_8__str__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_8__str__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9__str__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8__str__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_8__str__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1523
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, provides=self.factories) # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_factories); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1523, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1523, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1518
|
|
* return self.__get_factory(factory_name)
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1526
|
|
*
|
|
* @property
|
|
* def factories(self): # <<<<<<<<<<<<<<
|
|
* """Return dictionary of factories, read-only."""
|
|
* return self.__factories
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9factories_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9factories_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_9factories___get__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_9factories___get__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1528
|
|
* def factories(self):
|
|
* """Return dictionary of factories, read-only."""
|
|
* return self.__factories # <<<<<<<<<<<<<<
|
|
*
|
|
* def override(self, _):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___factories);
|
|
__pyx_r = __pyx_v_self->__pyx___factories;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1526
|
|
*
|
|
* @property
|
|
* def factories(self): # <<<<<<<<<<<<<<
|
|
* """Return dictionary of factories, read-only."""
|
|
* return self.__factories
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1530
|
|
* return self.__factories
|
|
*
|
|
* def override(self, _): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11override(PyObject *__pyx_v_self, PyObject *__pyx_v__); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_10override[] = "Override provider with another provider.\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11override(PyObject *__pyx_v_self, PyObject *__pyx_v__) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10override(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), ((PyObject *)__pyx_v__));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_10override(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("override", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1538
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* raise Error( # <<<<<<<<<<<<<<
|
|
* '{0} providers could not be overridden'.format(self.__class__))
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1538, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
|
|
/* "dependency_injector/providers.pyx":1539
|
|
* """
|
|
* raise Error(
|
|
* '{0} providers could not be overridden'.format(self.__class__)) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef Factory __get_factory(self, str factory_name):
|
|
*/
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_providers_could_not_be_overri, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1539, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1539, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1539, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1538, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 1538, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1530
|
|
* return self.__factories
|
|
*
|
|
* def override(self, _): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1541
|
|
* '{0} providers could not be overridden'.format(self.__class__))
|
|
*
|
|
* cdef Factory __get_factory(self, str factory_name): # <<<<<<<<<<<<<<
|
|
* if factory_name not in self.__factories:
|
|
* raise NoSuchProviderError(
|
|
*/
|
|
|
|
static struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_f_19dependency_injector_9providers_16FactoryAggregate___get_factory(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v_factory_name) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
int __pyx_t_8;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__get_factory", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1542
|
|
*
|
|
* cdef Factory __get_factory(self, str factory_name):
|
|
* if factory_name not in self.__factories: # <<<<<<<<<<<<<<
|
|
* raise NoSuchProviderError(
|
|
* '{0} does not contain factory with name {1}'.format(
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___factories == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
__PYX_ERR(1, 1542, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_factory_name, __pyx_v_self->__pyx___factories, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1542, __pyx_L1_error)
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1543
|
|
* cdef Factory __get_factory(self, str factory_name):
|
|
* if factory_name not in self.__factories:
|
|
* raise NoSuchProviderError( # <<<<<<<<<<<<<<
|
|
* '{0} does not contain factory with name {1}'.format(
|
|
* self, factory_name))
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NoSuchProviderError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1543, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
|
|
/* "dependency_injector/providers.pyx":1544
|
|
* if factory_name not in self.__factories:
|
|
* raise NoSuchProviderError(
|
|
* '{0} does not contain factory with name {1}'.format( # <<<<<<<<<<<<<<
|
|
* self, factory_name))
|
|
* return <Factory> self.__factories[factory_name]
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_does_not_contain_factory_with, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1544, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
|
|
/* "dependency_injector/providers.pyx":1545
|
|
* raise NoSuchProviderError(
|
|
* '{0} does not contain factory with name {1}'.format(
|
|
* self, factory_name)) # <<<<<<<<<<<<<<
|
|
* return <Factory> self.__factories[factory_name]
|
|
*
|
|
*/
|
|
__pyx_t_7 = NULL;
|
|
__pyx_t_8 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_8 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_v_factory_name};
|
|
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1544, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_v_factory_name};
|
|
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1544, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1544, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
if (__pyx_t_7) {
|
|
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
|
|
}
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
|
|
__Pyx_INCREF(__pyx_v_factory_name);
|
|
__Pyx_GIVEREF(__pyx_v_factory_name);
|
|
PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_factory_name);
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1544, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1543, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 1543, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1542
|
|
*
|
|
* cdef Factory __get_factory(self, str factory_name):
|
|
* if factory_name not in self.__factories: # <<<<<<<<<<<<<<
|
|
* raise NoSuchProviderError(
|
|
* '{0} does not contain factory with name {1}'.format(
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1546
|
|
* '{0} does not contain factory with name {1}'.format(
|
|
* self, factory_name))
|
|
* return <Factory> self.__factories[factory_name] # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(((PyObject *)__pyx_r));
|
|
if (unlikely(__pyx_v_self->__pyx___factories == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(1, 1546, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx___factories, __pyx_v_factory_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1546, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_3)));
|
|
__pyx_r = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1541
|
|
* '{0} providers could not be overridden'.format(self.__class__))
|
|
*
|
|
* cdef Factory __get_factory(self, str factory_name): # <<<<<<<<<<<<<<
|
|
* if factory_name not in self.__factories:
|
|
* raise NoSuchProviderError(
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__get_factory", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF((PyObject *)__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_12__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_12__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__factories, self.__last_overriding, self.__overridden) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___factories);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___factories);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx___factories);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__factories, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__factories, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__factories is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__factories, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__factories is not None or self.__last_overriding is not None or self.__overridden is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_FactoryAggregate, (type(self), 0xa6696fd, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (__pyx_v_self->__pyx___factories != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__factories is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_FactoryAggregate, (type(self), 0xa6696fd, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__factories is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_FactoryAggregate, (type(self), 0xa6696fd, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_FactoryAggregate, (type(self), 0xa6696fd, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_FactoryAggregate); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_174495485);
|
|
__Pyx_GIVEREF(__pyx_int_174495485);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_174495485);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__factories is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_FactoryAggregate, (type(self), 0xa6696fd, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_FactoryAggregate, (type(self), 0xa6696fd, None), state
|
|
* else:
|
|
* return __pyx_unpickle_FactoryAggregate, (type(self), 0xa6696fd, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_FactoryAggregate__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_FactoryAggregate); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_174495485);
|
|
__Pyx_GIVEREF(__pyx_int_174495485);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_174495485);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_FactoryAggregate, (type(self), 0xa6696fd, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_FactoryAggregate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_16FactoryAggregate_14__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_16FactoryAggregate_14__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_FactoryAggregate, (type(self), 0xa6696fd, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_FactoryAggregate__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_FactoryAggregate__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_FactoryAggregate, (type(self), 0xa6696fd, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_FactoryAggregate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.FactoryAggregate.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1554
|
|
* provided_type = None
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton___init__[] = "Initializer.\n\n :param provides: Provided type.\n :type provides: type\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provides = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
__pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
if (PyTuple_GET_SIZE(__pyx_args) > 1) {
|
|
__pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
|
|
if (unlikely(!__pyx_v_args)) {
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
__Pyx_GOTREF(__pyx_v_args);
|
|
} else {
|
|
__pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
|
|
}
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
default:
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1554, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_provides = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1554, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_provides, __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
int __pyx_t_11;
|
|
PyObject *__pyx_t_12 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1560
|
|
* :type provides: type
|
|
* """
|
|
* if (self.__class__.provided_type and # <<<<<<<<<<<<<<
|
|
* not issubclass(provides, self.__class__.provided_type)):
|
|
* raise Error('{0} can provide only {1} instances'.format(
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1560, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1560, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1560, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1561
|
|
* """
|
|
* if (self.__class__.provided_type and
|
|
* not issubclass(provides, self.__class__.provided_type)): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} can provide only {1} instances'.format(
|
|
* self.__class__, self.__class__.provided_type))
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1561, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1561, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_4 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1561, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
|
|
__pyx_t_1 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
|
|
/* "dependency_injector/providers.pyx":1560
|
|
* :type provides: type
|
|
* """
|
|
* if (self.__class__.provided_type and # <<<<<<<<<<<<<<
|
|
* not issubclass(provides, self.__class__.provided_type)):
|
|
* raise Error('{0} can provide only {1} instances'.format(
|
|
*/
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1562
|
|
* if (self.__class__.provided_type and
|
|
* not issubclass(provides, self.__class__.provided_type)):
|
|
* raise Error('{0} can provide only {1} instances'.format( # <<<<<<<<<<<<<<
|
|
* self.__class__, self.__class__.provided_type))
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1562, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_provide_only_1_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1562, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
|
|
/* "dependency_injector/providers.pyx":1563
|
|
* not issubclass(provides, self.__class__.provided_type)):
|
|
* raise Error('{0} can provide only {1} instances'.format(
|
|
* self.__class__, self.__class__.provided_type)) # <<<<<<<<<<<<<<
|
|
*
|
|
* self.__instantiator = Factory(provides, *args, **kwargs)
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1563, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1563, __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, 1563, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_t_9 = NULL;
|
|
__pyx_t_11 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
__pyx_t_11 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_7)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10};
|
|
__pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1562, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10};
|
|
__pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1562, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1562, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_12);
|
|
if (__pyx_t_9) {
|
|
__Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_10);
|
|
PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_10);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_10 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1562, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1562, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__PYX_ERR(1, 1562, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1560
|
|
* :type provides: type
|
|
* """
|
|
* if (self.__class__.provided_type and # <<<<<<<<<<<<<<
|
|
* not issubclass(provides, self.__class__.provided_type)):
|
|
* raise Error('{0} can provide only {1} instances'.format(
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1565
|
|
* self.__class__, self.__class__.provided_type))
|
|
*
|
|
* self.__instantiator = Factory(provides, *args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* super(BaseSingleton, self).__init__()
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1565, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_provides);
|
|
__pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1565, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1565, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___instantiator));
|
|
__pyx_v_self->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1567
|
|
* self.__instantiator = Factory(provides, *args, **kwargs)
|
|
*
|
|
* super(BaseSingleton, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1567, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1567, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1567, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1567, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1554
|
|
* provided_type = None
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_XDECREF(__pyx_t_12);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1569
|
|
* super(BaseSingleton, self).__init__()
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3__str__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_2__str__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton_2__str__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3__str__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__str__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__str__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1574
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, # <<<<<<<<<<<<<<
|
|
* provides=self.__instantiator.cls)
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
|
|
/* "dependency_injector/providers.pyx":1575
|
|
* """
|
|
* return represent_provider(provider=self,
|
|
* provides=self.__instantiator.cls) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1575, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
|
|
/* "dependency_injector/providers.pyx":1574
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, # <<<<<<<<<<<<<<
|
|
* provides=self.__instantiator.cls)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1574, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1569
|
|
* super(BaseSingleton, self).__init__()
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1577
|
|
* provides=self.__instantiator.cls)
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_4__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_v_copied = NULL;
|
|
PyObject *__pyx_v_cls = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1579
|
|
* def __deepcopy__(self, memo):
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1579, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1579, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1579, __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":1580
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_copied != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":1581
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* cls = self.cls
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1580
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1583
|
|
* return copied
|
|
*
|
|
* cls = self.cls # <<<<<<<<<<<<<<
|
|
* if isinstance(cls, Provider):
|
|
* cls = deepcopy(cls, memo)
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1583, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_cls = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1584
|
|
*
|
|
* cls = self.cls
|
|
* if isinstance(cls, Provider): # <<<<<<<<<<<<<<
|
|
* cls = deepcopy(cls, memo)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_TypeCheck(__pyx_v_cls, __pyx_ptype_19dependency_injector_9providers_Provider);
|
|
__pyx_t_5 = (__pyx_t_6 != 0);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "dependency_injector/providers.pyx":1585
|
|
* cls = self.cls
|
|
* if isinstance(cls, Provider):
|
|
* cls = deepcopy(cls, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__(cls,
|
|
*/
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1585, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_cls, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1585, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF_SET(__pyx_v_cls, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1584
|
|
*
|
|
* cls = self.cls
|
|
* if isinstance(cls, Provider): # <<<<<<<<<<<<<<
|
|
* cls = deepcopy(cls, memo)
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1587
|
|
* cls = deepcopy(cls, memo)
|
|
*
|
|
* copied = self.__class__(cls, # <<<<<<<<<<<<<<
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1587, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1587, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_cls);
|
|
__Pyx_GIVEREF(__pyx_v_cls);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls);
|
|
|
|
/* "dependency_injector/providers.pyx":1588
|
|
*
|
|
* copied = self.__class__(cls,
|
|
* *deepcopy(self.args, memo), # <<<<<<<<<<<<<<
|
|
* **deepcopy(self.kwargs, memo))
|
|
* copied.set_attributes(**deepcopy(self.attributes, memo))
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1588, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1588, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1588, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1587
|
|
* cls = deepcopy(cls, memo)
|
|
*
|
|
* copied = self.__class__(cls, # <<<<<<<<<<<<<<
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
*/
|
|
__pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1587, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1587, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1589
|
|
* copied = self.__class__(cls,
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<<
|
|
* copied.set_attributes(**deepcopy(self.attributes, memo))
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1589, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1589, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1589, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(__pyx_t_8 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
|
|
__PYX_ERR(1, 1589, __pyx_L1_error)
|
|
}
|
|
if (likely(PyDict_CheckExact(__pyx_t_8))) {
|
|
__pyx_t_3 = PyDict_Copy(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1589, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
} else {
|
|
__pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1587, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1587
|
|
* cls = deepcopy(cls, memo)
|
|
*
|
|
* copied = self.__class__(cls, # <<<<<<<<<<<<<<
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1587, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1590
|
|
* *deepcopy(self.args, memo),
|
|
* **deepcopy(self.kwargs, memo))
|
|
* copied.set_attributes(**deepcopy(self.attributes, memo)) # <<<<<<<<<<<<<<
|
|
*
|
|
* self._copy_overridings(copied, memo)
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1590, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1590, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1590, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1590, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
|
|
__PYX_ERR(1, 1590, __pyx_L1_error)
|
|
}
|
|
if (likely(PyDict_CheckExact(__pyx_t_1))) {
|
|
__pyx_t_3 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1590, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
} else {
|
|
__pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1590, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
}
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1590, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1592
|
|
* copied.set_attributes(**deepcopy(self.attributes, memo))
|
|
*
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 1592, __pyx_L1_error)
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 1592, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1594
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1577
|
|
* provides=self.__instantiator.cls)
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_copied);
|
|
__Pyx_XDECREF(__pyx_v_cls);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1597
|
|
*
|
|
* @property
|
|
* def cls(self): # <<<<<<<<<<<<<<
|
|
* """Return provided type."""
|
|
* return self.__instantiator.cls
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3cls_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3cls_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls___get__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1599
|
|
* def cls(self):
|
|
* """Return provided type."""
|
|
* return self.__instantiator.cls # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1599, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1597
|
|
*
|
|
* @property
|
|
* def cls(self): # <<<<<<<<<<<<<<
|
|
* """Return provided type."""
|
|
* return self.__instantiator.cls
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.cls.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1602
|
|
*
|
|
* @property
|
|
* def args(self): # <<<<<<<<<<<<<<
|
|
* """Return positional argument injections."""
|
|
* return self.__instantiator.args
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_4args_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args___get__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1604
|
|
* def args(self):
|
|
* """Return positional argument injections."""
|
|
* return self.__instantiator.args # <<<<<<<<<<<<<<
|
|
*
|
|
* def add_args(self, *args):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1604, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1602
|
|
*
|
|
* @property
|
|
* def args(self): # <<<<<<<<<<<<<<
|
|
* """Return positional argument injections."""
|
|
* return self.__instantiator.args
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.args.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1606
|
|
* return self.__instantiator.args
|
|
*
|
|
* def add_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Add __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_6add_args[] = "Add __init__ positional argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("add_args (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_args", 0))) return NULL;
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_args(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_args);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("add_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1611
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.add_args(*args) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1611, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1611, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1612
|
|
* """
|
|
* self.__instantiator.add_args(*args)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def set_args(self, *args):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1606
|
|
* return self.__instantiator.args
|
|
*
|
|
* def add_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Add __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.add_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1614
|
|
* return self
|
|
*
|
|
* def set_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Set __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_8set_args[] = "Set __init__ positional argument injections.\n\n Existing __init__ positional argument injections are dropped.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("set_args (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_args", 0))) return NULL;
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_args(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_args);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_args) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("set_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1621
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.set_args(*args) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1621, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1621, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1622
|
|
* """
|
|
* self.__instantiator.set_args(*args)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def clear_args(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1614
|
|
* return self
|
|
*
|
|
* def set_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Set __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.set_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1624
|
|
* return self
|
|
*
|
|
* def clear_args(self): # <<<<<<<<<<<<<<
|
|
* """Drop __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_10clear_args[] = "Drop __init__ positional argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("clear_args (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_10clear_args(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10clear_args(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("clear_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1629
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.clear_args() # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1629, __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, 1629, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1630
|
|
* """
|
|
* self.__instantiator.clear_args()
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1624
|
|
* return self
|
|
*
|
|
* def clear_args(self): # <<<<<<<<<<<<<<
|
|
* """Drop __init__ positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* 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.BaseSingleton.clear_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1633
|
|
*
|
|
* @property
|
|
* def kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Return keyword argument injections."""
|
|
* return self.__instantiator.kwargs
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_6kwargs_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_6kwargs_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwargs___get__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwargs___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1635
|
|
* def kwargs(self):
|
|
* """Return keyword argument injections."""
|
|
* return self.__instantiator.kwargs # <<<<<<<<<<<<<<
|
|
*
|
|
* def add_kwargs(self, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1635, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1633
|
|
*
|
|
* @property
|
|
* def kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Return keyword argument injections."""
|
|
* return self.__instantiator.kwargs
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.kwargs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1637
|
|
* return self.__instantiator.kwargs
|
|
*
|
|
* def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Add __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_12add_kwargs[] = "Add __init__ keyword argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13add_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("add_kwargs (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("add_kwargs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_kwargs", 1))) return NULL;
|
|
if (__pyx_kwds) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add_kwargs(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("add_kwargs", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1642
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.add_kwargs(**kwargs) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1642, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1642, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1643
|
|
* """
|
|
* self.__instantiator.add_kwargs(**kwargs)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def set_kwargs(self, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1637
|
|
* return self.__instantiator.kwargs
|
|
*
|
|
* def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Add __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.add_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1645
|
|
* return self
|
|
*
|
|
* def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Set __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_14set_kwargs[] = "Set __init__ keyword argument injections.\n\n Existing __init__ keyword argument injections are dropped.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15set_kwargs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("set_kwargs (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("set_kwargs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_kwargs", 1))) return NULL;
|
|
if (__pyx_kwds) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set_kwargs(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("set_kwargs", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1652
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.set_kwargs(**kwargs) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1652, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1652, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1653
|
|
* """
|
|
* self.__instantiator.set_kwargs(**kwargs)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def clear_kwargs(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1645
|
|
* return self
|
|
*
|
|
* def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Set __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.set_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1655
|
|
* return self
|
|
*
|
|
* def clear_kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Drop __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_16clear_kwargs[] = "Drop __init__ keyword argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_17clear_kwargs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("clear_kwargs (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_16clear_kwargs(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16clear_kwargs(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("clear_kwargs", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1660
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.clear_kwargs() # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1660, __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, 1660, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1661
|
|
* """
|
|
* self.__instantiator.clear_kwargs()
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1655
|
|
* return self
|
|
*
|
|
* def clear_kwargs(self): # <<<<<<<<<<<<<<
|
|
* """Drop __init__ keyword argument injections.
|
|
*
|
|
*/
|
|
|
|
/* 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.BaseSingleton.clear_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1664
|
|
*
|
|
* @property
|
|
* def attributes(self): # <<<<<<<<<<<<<<
|
|
* """Return attribute injections."""
|
|
* return self.__instantiator.attributes
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_10attributes_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_10attributes_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_10attributes___get__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10attributes___get__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1666
|
|
* def attributes(self):
|
|
* """Return attribute injections."""
|
|
* return self.__instantiator.attributes # <<<<<<<<<<<<<<
|
|
*
|
|
* def add_attributes(self, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1666, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1664
|
|
*
|
|
* @property
|
|
* def attributes(self): # <<<<<<<<<<<<<<
|
|
* """Return attribute injections."""
|
|
* return self.__instantiator.attributes
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.attributes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1668
|
|
* return self.__instantiator.attributes
|
|
*
|
|
* def add_attributes(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Add attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_18add_attributes[] = "Add attribute injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19add_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("add_attributes (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("add_attributes", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_attributes", 1))) return NULL;
|
|
if (__pyx_kwds) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add_attributes(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("add_attributes", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1673
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.add_attributes(**kwargs) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1673, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1673, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1674
|
|
* """
|
|
* self.__instantiator.add_attributes(**kwargs)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def set_attributes(self, **kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1668
|
|
* return self.__instantiator.attributes
|
|
*
|
|
* def add_attributes(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Add attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.add_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1676
|
|
* return self
|
|
*
|
|
* def set_attributes(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Set attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_20set_attributes[] = "Set attribute injections.\n\n Existing attribute injections are dropped.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("set_attributes (wrapper)", 0);
|
|
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
|
|
__Pyx_RaiseArgtupleInvalid("set_attributes", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
|
|
if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_attributes", 1))) return NULL;
|
|
if (__pyx_kwds) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set_attributes(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("set_attributes", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1683
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.set_attributes(**kwargs) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1683, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1683, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1684
|
|
* """
|
|
* self.__instantiator.set_attributes(**kwargs)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def clear_attributes(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1676
|
|
* return self
|
|
*
|
|
* def set_attributes(self, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Set attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.set_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1686
|
|
* return self
|
|
*
|
|
* def clear_attributes(self): # <<<<<<<<<<<<<<
|
|
* """Drop attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_23clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_22clear_attributes[] = "Drop attribute injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_23clear_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("clear_attributes (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_22clear_attributes(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22clear_attributes(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("clear_attributes", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1691
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__instantiator.clear_attributes() # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1691, __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, 1691, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1692
|
|
* """
|
|
* self.__instantiator.clear_attributes()
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1686
|
|
* return self
|
|
*
|
|
* def clear_attributes(self): # <<<<<<<<<<<<<<
|
|
* """Drop attribute injections.
|
|
*
|
|
*/
|
|
|
|
/* 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.BaseSingleton.clear_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1694
|
|
* return self
|
|
*
|
|
* def reset(self): # <<<<<<<<<<<<<<
|
|
* """Reset cached instance, if any.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_25reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_13BaseSingleton_24reset[] = "Reset cached instance, if any.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_25reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_24reset(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24reset(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("reset", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1699
|
|
* :rtype: None
|
|
* """
|
|
* raise NotImplementedError() # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1699, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__PYX_ERR(1, 1699, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1694
|
|
* return self
|
|
*
|
|
* def reset(self): # <<<<<<<<<<<<<<
|
|
* """Reset cached instance, if any.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_27__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_27__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_26__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_26__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_BaseSingleton, (type(self), 0x0c49df0, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx___instantiator) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_BaseSingleton, (type(self), 0x0c49df0, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_BaseSingleton, (type(self), 0x0c49df0, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_BaseSingleton, (type(self), 0x0c49df0, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BaseSingleton); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_12885488);
|
|
__Pyx_GIVEREF(__pyx_int_12885488);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_12885488);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_BaseSingleton, (type(self), 0x0c49df0, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_BaseSingleton, (type(self), 0x0c49df0, None), state
|
|
* else:
|
|
* return __pyx_unpickle_BaseSingleton, (type(self), 0x0c49df0, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_BaseSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_BaseSingleton); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_12885488);
|
|
__Pyx_GIVEREF(__pyx_int_12885488);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_12885488);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_BaseSingleton, (type(self), 0x0c49df0, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_BaseSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_13BaseSingleton_28__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_28__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_BaseSingleton, (type(self), 0x0c49df0, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_BaseSingleton__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_BaseSingleton__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_BaseSingleton, (type(self), 0x0c49df0, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_BaseSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.BaseSingleton.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1733
|
|
* """
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_9Singleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_9Singleton___init__[] = "Initializer.\n\n :param provides: Provided type.\n :type provides: type\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_9Singleton___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_9Singleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provides = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
__pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
if (PyTuple_GET_SIZE(__pyx_args) > 1) {
|
|
__pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
|
|
if (unlikely(!__pyx_v_args)) {
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
__Pyx_GOTREF(__pyx_v_args);
|
|
} else {
|
|
__pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
|
|
}
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
default:
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1733, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_provides = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1733, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Singleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_9Singleton___init__(((struct __pyx_obj_19dependency_injector_9providers_Singleton *)__pyx_v_self), __pyx_v_provides, __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1739
|
|
* :type provides: type
|
|
* """
|
|
* self.__storage = None # <<<<<<<<<<<<<<
|
|
* super(Singleton, self).__init__(provides, *args, **kwargs)
|
|
*
|
|
*/
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___storage);
|
|
__pyx_v_self->__pyx___storage = Py_None;
|
|
|
|
/* "dependency_injector/providers.pyx":1740
|
|
* """
|
|
* self.__storage = None
|
|
* super(Singleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset(self):
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1740, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Singleton));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Singleton));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Singleton));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1740, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1740, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1740, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_provides);
|
|
__pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1740, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1740, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1733
|
|
* """
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Singleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1742
|
|
* super(Singleton, self).__init__(provides, *args, **kwargs)
|
|
*
|
|
* def reset(self): # <<<<<<<<<<<<<<
|
|
* """Reset cached instance, if any.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_3reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_9Singleton_2reset[] = "Reset cached instance, if any.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_3reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_9Singleton_2reset(((struct __pyx_obj_19dependency_injector_9providers_Singleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1747
|
|
* :rtype: None
|
|
* """
|
|
* self.__storage = None # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
*/
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___storage);
|
|
__pyx_v_self->__pyx___storage = Py_None;
|
|
|
|
/* "dependency_injector/providers.pyx":1742
|
|
* super(Singleton, self).__init__(provides, *args, **kwargs)
|
|
*
|
|
* def reset(self): # <<<<<<<<<<<<<<
|
|
* """Reset cached instance, if any.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1749
|
|
* self.__storage = None
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return single instance."""
|
|
* if self.__storage is None:
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
int __pyx_t_7;
|
|
int __pyx_t_8;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1749, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1749, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1749, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1749, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1749, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1751
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return single instance."""
|
|
* if self.__storage is None: # <<<<<<<<<<<<<<
|
|
* self.__storage = __factory_call(self.__instantiator,
|
|
* args, kwargs)
|
|
*/
|
|
__pyx_t_7 = (__pyx_v_self->__pyx___storage == Py_None);
|
|
__pyx_t_8 = (__pyx_t_7 != 0);
|
|
if (__pyx_t_8) {
|
|
|
|
/* "dependency_injector/providers.pyx":1752
|
|
* """Return single instance."""
|
|
* if self.__storage is None:
|
|
* self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<<
|
|
* args, kwargs)
|
|
* return self.__storage
|
|
*/
|
|
__pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
|
|
/* "dependency_injector/providers.pyx":1753
|
|
* if self.__storage is None:
|
|
* self.__storage = __factory_call(self.__instantiator,
|
|
* args, kwargs) # <<<<<<<<<<<<<<
|
|
* return self.__storage
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1752, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1752
|
|
* """Return single instance."""
|
|
* if self.__storage is None:
|
|
* self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<<
|
|
* args, kwargs)
|
|
* return self.__storage
|
|
*/
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___storage);
|
|
__pyx_v_self->__pyx___storage = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1751
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return single instance."""
|
|
* if self.__storage is None: # <<<<<<<<<<<<<<
|
|
* self.__storage = __factory_call(self.__instantiator,
|
|
* args, kwargs)
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1754
|
|
* self.__storage = __factory_call(self.__instantiator,
|
|
* args, kwargs)
|
|
* return self.__storage # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___storage);
|
|
__pyx_r = __pyx_v_self->__pyx___storage;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1749
|
|
* self.__storage = None
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return single instance."""
|
|
* if self.__storage is None:
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Singleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_9Singleton_4_provide[] = "Return single instance.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1749, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1749, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1749, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.Singleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1749, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1749, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_9Singleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_Singleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_4_provide(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_9Singleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1749, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Singleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_9Singleton_6__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Singleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___storage);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___storage);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx___storage);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Singleton, (type(self), 0x76eb8a2, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx___storage != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_2;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Singleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Singleton, (type(self), 0x76eb8a2, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_Singleton, (type(self), 0x76eb8a2, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Singleton); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_124696738);
|
|
__Pyx_GIVEREF(__pyx_int_124696738);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_124696738);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Singleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_Singleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
* return __pyx_unpickle_Singleton, (type(self), 0x76eb8a2, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Singleton__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Singleton); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_124696738);
|
|
__Pyx_GIVEREF(__pyx_int_124696738);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_124696738);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Singleton.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Singleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Singleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_9Singleton_8__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Singleton *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_Singleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Singleton__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Singleton__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Singleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Singleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Singleton.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18DelegatedSingleton_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18DelegatedSingleton_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_18DelegatedSingleton___reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedSingleton___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___storage);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___storage);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.__pyx___storage);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedSingleton, (type(self), 0x76eb8a2, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx___storage != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_2;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedSingleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedSingleton, (type(self), 0x76eb8a2, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedSingleton, (type(self), 0x76eb8a2, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DelegatedSingleto); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_124696738);
|
|
__Pyx_GIVEREF(__pyx_int_124696738);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_124696738);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedSingleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_DelegatedSingleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedSingleton, (type(self), 0x76eb8a2, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DelegatedSingleto); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_124696738);
|
|
__Pyx_GIVEREF(__pyx_int_124696738);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_124696738);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DelegatedSingleton.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedSingleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18DelegatedSingleton_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18DelegatedSingleton_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_18DelegatedSingleton_2__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_18DelegatedSingleton_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_DelegatedSingleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedSingleton__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedSingleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DelegatedSingleton.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1787
|
|
* """
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_19ThreadSafeSingleton___init__[] = "Initializer.\n\n :param provides: Provided type.\n :type provides: type\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_19ThreadSafeSingleton___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provides = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
__pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
if (PyTuple_GET_SIZE(__pyx_args) > 1) {
|
|
__pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
|
|
if (unlikely(!__pyx_v_args)) {
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
__Pyx_GOTREF(__pyx_v_args);
|
|
} else {
|
|
__pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
|
|
}
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
default:
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1787, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_provides = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1787, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___init__(((struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)__pyx_v_self), __pyx_v_provides, __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___init__(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1793
|
|
* :type provides: type
|
|
* """
|
|
* self.__storage = None # <<<<<<<<<<<<<<
|
|
* self.__storage_lock = self.__class__.storage_lock
|
|
* super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs)
|
|
*/
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___storage);
|
|
__pyx_v_self->__pyx___storage = Py_None;
|
|
|
|
/* "dependency_injector/providers.pyx":1794
|
|
* """
|
|
* self.__storage = None
|
|
* self.__storage_lock = self.__class__.storage_lock # <<<<<<<<<<<<<<
|
|
* super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1794, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_storage_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1794, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___storage_lock);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___storage_lock);
|
|
__pyx_v_self->__pyx___storage_lock = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1795
|
|
* self.__storage = None
|
|
* self.__storage_lock = self.__class__.storage_lock
|
|
* super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset(self):
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1795, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1795, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1795, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1795, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_provides);
|
|
__pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1795, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1795, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1787
|
|
* """
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1797
|
|
* super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs)
|
|
*
|
|
* def reset(self): # <<<<<<<<<<<<<<
|
|
* """Reset cached instance, if any.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_3reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_19ThreadSafeSingleton_2reset[] = "Reset cached instance, if any.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_3reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_2reset(((struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_2reset(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1802
|
|
* :rtype: None
|
|
* """
|
|
* self.__storage = None # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
*/
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___storage);
|
|
__pyx_v_self->__pyx___storage = Py_None;
|
|
|
|
/* "dependency_injector/providers.pyx":1797
|
|
* super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs)
|
|
*
|
|
* def reset(self): # <<<<<<<<<<<<<<
|
|
* """Reset cached instance, if any.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1804
|
|
* self.__storage = None
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return single instance."""
|
|
* with self.__storage_lock:
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
int __pyx_t_11;
|
|
int __pyx_t_12;
|
|
PyObject *__pyx_t_13 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1804, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_5_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1804, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1804, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1804, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1804, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1806
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return single instance."""
|
|
* with self.__storage_lock: # <<<<<<<<<<<<<<
|
|
* if self.__storage is None:
|
|
* self.__storage = __factory_call(self.__instantiator,
|
|
*/
|
|
/*with:*/ {
|
|
__pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1806, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1806, __pyx_L3_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, 1806, __pyx_L3_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
/*try:*/ {
|
|
{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
|
|
__Pyx_XGOTREF(__pyx_t_8);
|
|
__Pyx_XGOTREF(__pyx_t_9);
|
|
__Pyx_XGOTREF(__pyx_t_10);
|
|
/*try:*/ {
|
|
|
|
/* "dependency_injector/providers.pyx":1807
|
|
* """Return single instance."""
|
|
* with self.__storage_lock:
|
|
* if self.__storage is None: # <<<<<<<<<<<<<<
|
|
* self.__storage = __factory_call(self.__instantiator,
|
|
* args, kwargs)
|
|
*/
|
|
__pyx_t_11 = (__pyx_v_self->__pyx___storage == Py_None);
|
|
__pyx_t_12 = (__pyx_t_11 != 0);
|
|
if (__pyx_t_12) {
|
|
|
|
/* "dependency_injector/providers.pyx":1808
|
|
* with self.__storage_lock:
|
|
* if self.__storage is None:
|
|
* self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<<
|
|
* args, kwargs)
|
|
* return self.__storage
|
|
*/
|
|
__pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
|
|
/* "dependency_injector/providers.pyx":1809
|
|
* if self.__storage is None:
|
|
* self.__storage = __factory_call(self.__instantiator,
|
|
* args, kwargs) # <<<<<<<<<<<<<<
|
|
* return self.__storage
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1808, __pyx_L7_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1808
|
|
* with self.__storage_lock:
|
|
* if self.__storage is None:
|
|
* self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<<
|
|
* args, kwargs)
|
|
* return self.__storage
|
|
*/
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___storage);
|
|
__pyx_v_self->__pyx___storage = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1807
|
|
* """Return single instance."""
|
|
* with self.__storage_lock:
|
|
* if self.__storage is None: # <<<<<<<<<<<<<<
|
|
* self.__storage = __factory_call(self.__instantiator,
|
|
* args, kwargs)
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1806
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return single instance."""
|
|
* with self.__storage_lock: # <<<<<<<<<<<<<<
|
|
* if self.__storage is None:
|
|
* self.__storage = __factory_call(self.__instantiator,
|
|
*/
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
goto __pyx_L12_try_end;
|
|
__pyx_L7_error:;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
/*except:*/ {
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(1, 1806, __pyx_L9_except_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1806, __pyx_L9_except_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1806, __pyx_L9_except_error)
|
|
__Pyx_GOTREF(__pyx_t_13);
|
|
__pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13);
|
|
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
|
|
if (__pyx_t_12 < 0) __PYX_ERR(1, 1806, __pyx_L9_except_error)
|
|
__pyx_t_11 = ((!(__pyx_t_12 != 0)) != 0);
|
|
if (__pyx_t_11) {
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_XGIVEREF(__pyx_t_3);
|
|
__Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_3);
|
|
__pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 1806, __pyx_L9_except_error)
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
goto __pyx_L8_exception_handled;
|
|
}
|
|
__pyx_L9_except_error:;
|
|
__Pyx_XGIVEREF(__pyx_t_8);
|
|
__Pyx_XGIVEREF(__pyx_t_9);
|
|
__Pyx_XGIVEREF(__pyx_t_10);
|
|
__Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
|
|
goto __pyx_L1_error;
|
|
__pyx_L8_exception_handled:;
|
|
__Pyx_XGIVEREF(__pyx_t_8);
|
|
__Pyx_XGIVEREF(__pyx_t_9);
|
|
__Pyx_XGIVEREF(__pyx_t_10);
|
|
__Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
|
|
__pyx_L12_try_end:;
|
|
}
|
|
}
|
|
/*finally:*/ {
|
|
/*normal exit:*/{
|
|
if (__pyx_t_7) {
|
|
__pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple_, NULL);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1806, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
}
|
|
goto __pyx_L17;
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
goto __pyx_L1_error;
|
|
__pyx_L17:;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1810
|
|
* self.__storage = __factory_call(self.__instantiator,
|
|
* args, kwargs)
|
|
* return self.__storage # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___storage);
|
|
__pyx_r = __pyx_v_self->__pyx___storage;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1804
|
|
* self.__storage = None
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return single instance."""
|
|
* with self.__storage_lock:
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_19ThreadSafeSingleton_4_provide[] = "Return single instance.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1804, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1804, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1804, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1804, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1804, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_4_provide(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1804, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_6__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage, self.__storage_lock) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___storage);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___storage);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx___storage);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___storage_lock);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___storage_lock);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->__pyx___storage_lock);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage, self.__storage_lock)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage, self.__storage_lock)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None or self.__storage_lock is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage, self.__storage_lock)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None or self.__storage_lock is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_ThreadSafeSingleton, (type(self), 0xa5833ef, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx___storage != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx___storage_lock != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None or self.__storage_lock is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_ThreadSafeSingleton, (type(self), 0xa5833ef, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None or self.__storage_lock is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_ThreadSafeSingleton, (type(self), 0xa5833ef, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_ThreadSafeSingleton, (type(self), 0xa5833ef, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_ThreadSafeSinglet); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_173552623);
|
|
__Pyx_GIVEREF(__pyx_int_173552623);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_173552623);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None or self.__storage_lock is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_ThreadSafeSingleton, (type(self), 0xa5833ef, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_ThreadSafeSingleton, (type(self), 0xa5833ef, None), state
|
|
* else:
|
|
* return __pyx_unpickle_ThreadSafeSingleton, (type(self), 0xa5833ef, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ThreadSafeSinglet); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_173552623);
|
|
__Pyx_GIVEREF(__pyx_int_173552623);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_173552623);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_ThreadSafeSingleton, (type(self), 0xa5833ef, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_8__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_ThreadSafeSingleton, (type(self), 0xa5833ef, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_ThreadSafeSingleton__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_ThreadSafeSingleton, (type(self), 0xa5833ef, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_28DelegatedThreadSafeSingleton_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_28DelegatedThreadSafeSingleton_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_28DelegatedThreadSafeSingleton___reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_28DelegatedThreadSafeSingleton___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage, self.__storage_lock) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___storage);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___storage);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.__pyx___storage);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___storage_lock);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___storage_lock);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->__pyx_base.__pyx___storage_lock);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage, self.__storage_lock)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage, self.__storage_lock)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None or self.__storage_lock is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage, self.__storage_lock)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None or self.__storage_lock is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedThreadSafeSingleton, (type(self), 0xa5833ef, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx___storage != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___storage_lock != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None or self.__storage_lock is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedThreadSafeSingleton, (type(self), 0xa5833ef, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None or self.__storage_lock is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedThreadSafeSingleton, (type(self), 0xa5833ef, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedThreadSafeSingleton, (type(self), 0xa5833ef, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DelegatedThreadSa); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_173552623);
|
|
__Pyx_GIVEREF(__pyx_int_173552623);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_173552623);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None or self.__storage_lock is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedThreadSafeSingleton, (type(self), 0xa5833ef, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_DelegatedThreadSafeSingleton, (type(self), 0xa5833ef, None), state
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedThreadSafeSingleton, (type(self), 0xa5833ef, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DelegatedThreadSa); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_173552623);
|
|
__Pyx_GIVEREF(__pyx_int_173552623);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_173552623);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DelegatedThreadSafeSingleton.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedThreadSafeSingleton, (type(self), 0xa5833ef, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_28DelegatedThreadSafeSingleton_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_28DelegatedThreadSafeSingleton_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_28DelegatedThreadSafeSingleton_2__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_28DelegatedThreadSafeSingleton_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_DelegatedThreadSafeSingleton, (type(self), 0xa5833ef, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedThreadSafeSingleton__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedThreadSafeSingleton, (type(self), 0xa5833ef, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DelegatedThreadSafeSingleton.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1852
|
|
* """
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_20ThreadLocalSingleton___init__[] = "Initializer.\n\n :param provides: Provided type.\n :type provides: type\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_20ThreadLocalSingleton___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provides = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
__pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
if (PyTuple_GET_SIZE(__pyx_args) > 1) {
|
|
__pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
|
|
if (unlikely(!__pyx_v_args)) {
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
__Pyx_GOTREF(__pyx_v_args);
|
|
} else {
|
|
__pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
|
|
}
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provides,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
default:
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1852, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_provides = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1852, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
|
|
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___init__(((struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)__pyx_v_self), __pyx_v_provides, __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___init__(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1858
|
|
* :type provides: type
|
|
* """
|
|
* self.__storage = threading.local() # <<<<<<<<<<<<<<
|
|
* super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs)
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1858, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_local); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1858, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_2)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1858, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___storage);
|
|
__pyx_v_self->__pyx___storage = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1859
|
|
* """
|
|
* self.__storage = threading.local()
|
|
* super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset(self):
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1859, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1859, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1859, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1859, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_provides);
|
|
__Pyx_GIVEREF(__pyx_v_provides);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_provides);
|
|
__pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1859, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1859, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1852
|
|
* """
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1861
|
|
* super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs)
|
|
*
|
|
* def reset(self): # <<<<<<<<<<<<<<
|
|
* """Reset cached instance, if any.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_3reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_20ThreadLocalSingleton_2reset[] = "Reset cached instance, if any.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_3reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_2reset(((struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_2reset(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1866
|
|
* :rtype: None
|
|
* """
|
|
* del self.__storage.instance # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
*/
|
|
if (__Pyx_PyObject_DelAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance) < 0) __PYX_ERR(1, 1866, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1861
|
|
* super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs)
|
|
*
|
|
* def reset(self): # <<<<<<<<<<<<<<
|
|
* """Reset cached instance, if any.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1868
|
|
* del self.__storage.instance
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return single instance."""
|
|
* cdef object instance
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_v_instance = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
PyObject *__pyx_t_11 = NULL;
|
|
PyObject *__pyx_t_12 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1868, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_5_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1868, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1868, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1868, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1868, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1872
|
|
* cdef object instance
|
|
*
|
|
* try: # <<<<<<<<<<<<<<
|
|
* instance = self.__storage.instance
|
|
* except AttributeError:
|
|
*/
|
|
/*try:*/ {
|
|
{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
|
|
__Pyx_XGOTREF(__pyx_t_7);
|
|
__Pyx_XGOTREF(__pyx_t_8);
|
|
__Pyx_XGOTREF(__pyx_t_9);
|
|
/*try:*/ {
|
|
|
|
/* "dependency_injector/providers.pyx":1873
|
|
*
|
|
* try:
|
|
* instance = self.__storage.instance # <<<<<<<<<<<<<<
|
|
* except AttributeError:
|
|
* instance = __factory_call(self.__instantiator, args, kwargs)
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1873, __pyx_L6_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_instance = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1872
|
|
* cdef object instance
|
|
*
|
|
* try: # <<<<<<<<<<<<<<
|
|
* instance = self.__storage.instance
|
|
* except AttributeError:
|
|
*/
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
goto __pyx_L11_try_end;
|
|
__pyx_L6_error:;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1874
|
|
* try:
|
|
* instance = self.__storage.instance
|
|
* except AttributeError: # <<<<<<<<<<<<<<
|
|
* instance = __factory_call(self.__instantiator, args, kwargs)
|
|
* self.__storage.instance = instance
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
|
|
if (__pyx_t_5) {
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 1874, __pyx_L8_except_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
|
|
/* "dependency_injector/providers.pyx":1875
|
|
* instance = self.__storage.instance
|
|
* except AttributeError:
|
|
* instance = __factory_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<<
|
|
* self.__storage.instance = instance
|
|
* finally:
|
|
*/
|
|
__pyx_t_6 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__pyx_t_4 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_6), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1875, __pyx_L8_except_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_XDECREF_SET(__pyx_v_instance, __pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1876
|
|
* except AttributeError:
|
|
* instance = __factory_call(self.__instantiator, args, kwargs)
|
|
* self.__storage.instance = instance # <<<<<<<<<<<<<<
|
|
* finally:
|
|
* return instance
|
|
*/
|
|
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(1, 1876, __pyx_L8_except_error)
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
goto __pyx_L7_exception_handled;
|
|
}
|
|
goto __pyx_L8_except_error;
|
|
__pyx_L8_except_error:;
|
|
|
|
/* "dependency_injector/providers.pyx":1872
|
|
* cdef object instance
|
|
*
|
|
* try: # <<<<<<<<<<<<<<
|
|
* instance = self.__storage.instance
|
|
* except AttributeError:
|
|
*/
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_XGIVEREF(__pyx_t_8);
|
|
__Pyx_XGIVEREF(__pyx_t_9);
|
|
__Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
|
|
goto __pyx_L4_error;
|
|
__pyx_L7_exception_handled:;
|
|
__Pyx_XGIVEREF(__pyx_t_7);
|
|
__Pyx_XGIVEREF(__pyx_t_8);
|
|
__Pyx_XGIVEREF(__pyx_t_9);
|
|
__Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
|
|
__pyx_L11_try_end:;
|
|
}
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1878
|
|
* self.__storage.instance = instance
|
|
* finally:
|
|
* return instance # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
/*finally:*/ {
|
|
/*normal exit:*/{
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_instance);
|
|
__pyx_r = __pyx_v_instance;
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L4_error:;
|
|
/*exception exit:*/{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
|
|
if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
|
|
__Pyx_XGOTREF(__pyx_t_9);
|
|
__Pyx_XGOTREF(__pyx_t_8);
|
|
__Pyx_XGOTREF(__pyx_t_7);
|
|
__Pyx_XGOTREF(__pyx_t_10);
|
|
__Pyx_XGOTREF(__pyx_t_11);
|
|
__Pyx_XGOTREF(__pyx_t_12);
|
|
{
|
|
__Pyx_XDECREF(__pyx_r);
|
|
if (unlikely(!__pyx_v_instance)) { __Pyx_RaiseUnboundLocalError("instance"); __PYX_ERR(1, 1878, __pyx_L15_error) }
|
|
__Pyx_INCREF(__pyx_v_instance);
|
|
__pyx_r = __pyx_v_instance;
|
|
goto __pyx_L14_return;
|
|
}
|
|
__pyx_L14_return:;
|
|
if (PY_MAJOR_VERSION >= 3) {
|
|
__Pyx_XGIVEREF(__pyx_t_10);
|
|
__Pyx_XGIVEREF(__pyx_t_11);
|
|
__Pyx_XGIVEREF(__pyx_t_12);
|
|
__Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L15_error:;
|
|
if (PY_MAJOR_VERSION >= 3) {
|
|
__Pyx_XGIVEREF(__pyx_t_10);
|
|
__Pyx_XGIVEREF(__pyx_t_11);
|
|
__Pyx_XGIVEREF(__pyx_t_12);
|
|
__Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
|
|
goto __pyx_L1_error;
|
|
}
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1868
|
|
* del self.__storage.instance
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return single instance."""
|
|
* cdef object instance
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_instance);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_20ThreadLocalSingleton_4_provide[] = "Return single instance.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_5_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1868, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1868, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1868, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1868, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1868, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_4_provide(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1868, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_6__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___storage);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___storage);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx___storage);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_ThreadLocalSingleton, (type(self), 0x76eb8a2, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx___storage != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_2;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_ThreadLocalSingleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_ThreadLocalSingleton, (type(self), 0x76eb8a2, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_ThreadLocalSingleton, (type(self), 0x76eb8a2, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_ThreadLocalSingle); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_124696738);
|
|
__Pyx_GIVEREF(__pyx_int_124696738);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_124696738);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_ThreadLocalSingleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_ThreadLocalSingleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
* return __pyx_unpickle_ThreadLocalSingleton, (type(self), 0x76eb8a2, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ThreadLocalSingle); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_124696738);
|
|
__Pyx_GIVEREF(__pyx_int_124696738);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_124696738);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_ThreadLocalSingleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_8__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_ThreadLocalSingleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_ThreadLocalSingleton__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_ThreadLocalSingleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_29DelegatedThreadLocalSingleton_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_29DelegatedThreadLocalSingleton_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_29DelegatedThreadLocalSingleton___reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_29DelegatedThreadLocalSingleton___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___storage);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___storage);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.__pyx___storage);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden, self.__storage)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedThreadLocalSingleton, (type(self), 0x76eb8a2, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___instantiator) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx___storage != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_2;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedThreadLocalSingleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_DelegatedThreadLocalSingleton, (type(self), 0x76eb8a2, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedThreadLocalSingleton, (type(self), 0x76eb8a2, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DelegatedThreadLo); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_124696738);
|
|
__Pyx_GIVEREF(__pyx_int_124696738);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_124696738);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None or self.__storage is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_DelegatedThreadLocalSingleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_DelegatedThreadLocalSingleton, (type(self), 0x76eb8a2, None), state
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedThreadLocalSingleton, (type(self), 0x76eb8a2, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_DelegatedThreadLo); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_124696738);
|
|
__Pyx_GIVEREF(__pyx_int_124696738);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_124696738);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DelegatedThreadLocalSingleton.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedThreadLocalSingleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_29DelegatedThreadLocalSingleton_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_29DelegatedThreadLocalSingleton_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_29DelegatedThreadLocalSingleton_2__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_29DelegatedThreadLocalSingleton_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_DelegatedThreadLocalSingleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedThreadLocalSingleton__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_DelegatedThreadLocalSingleton, (type(self), 0x76eb8a2, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.DelegatedThreadLocalSingleton.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1912
|
|
* """
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided object.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17AbstractSingleton___call__[] = "Return provided object.\n\n Callable interface implementation.\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_17AbstractSingleton___call__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
|
|
if (unlikely(__pyx_kwds)) {
|
|
__pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
__Pyx_GOTREF(__pyx_v_kwargs);
|
|
} else {
|
|
__pyx_v_kwargs = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractSingleton___call__(((struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XDECREF(__pyx_v_kwargs);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
__Pyx_RefNannySetupContext("__call__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1917
|
|
* Callable interface implementation.
|
|
* """
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*/
|
|
__pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) == Py_None);
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1918
|
|
* """
|
|
* if self.__last_overriding is None:
|
|
* raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<<
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1918, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1918, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self));
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1918, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1918, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 1918, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1917
|
|
* Callable interface implementation.
|
|
* """
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1919
|
|
* if self.__last_overriding is None:
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding(*args, **kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* def override(self, provider):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1919, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1912
|
|
* """
|
|
*
|
|
* def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<<
|
|
* """Return provided object.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractSingleton.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1921
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_3override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17AbstractSingleton_2override[] = "Override provider with another provider.\n\n :param provider: Overriding provider.\n :type provider: :py:class:`Provider`\n\n :raise: :py:exc:`dependency_injector.errors.Error`\n\n :return: Overriding context.\n :rtype: :py:class:`OverridingContext`\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_3override(PyObject *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("override (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2override(((struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *)__pyx_v_self), ((PyObject *)__pyx_v_provider));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2override(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v_self, PyObject *__pyx_v_provider) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
int __pyx_t_8;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("override", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1932
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* if not isinstance(provider, BaseSingleton): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, BaseSingleton))
|
|
*/
|
|
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_provider, __pyx_ptype_19dependency_injector_9providers_BaseSingleton);
|
|
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1933
|
|
* """
|
|
* if not isinstance(provider, BaseSingleton):
|
|
* raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<<
|
|
* '{1} providers'.format(self, BaseSingleton))
|
|
* return super(AbstractSingleton, self).override(provider)
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1933, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
|
|
/* "dependency_injector/providers.pyx":1934
|
|
* if not isinstance(provider, BaseSingleton):
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, BaseSingleton)) # <<<<<<<<<<<<<<
|
|
* return super(AbstractSingleton, self).override(provider)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1934, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
__pyx_t_8 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_8 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)};
|
|
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1934, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)};
|
|
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1934, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1934, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
if (__pyx_t_7) {
|
|
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
|
|
}
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton));
|
|
PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1934, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1933, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 1933, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1932
|
|
* :rtype: :py:class:`OverridingContext`
|
|
* """
|
|
* if not isinstance(provider, BaseSingleton): # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, BaseSingleton))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1935
|
|
* raise Error('{0} must be overridden only by '
|
|
* '{1} providers'.format(self, BaseSingleton))
|
|
* return super(AbstractSingleton, self).override(provider) # <<<<<<<<<<<<<<
|
|
*
|
|
* def reset(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1935, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1935, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1935, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_provider) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1935, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1921
|
|
* return self.__last_overriding(*args, **kwargs)
|
|
*
|
|
* def override(self, provider): # <<<<<<<<<<<<<<
|
|
* """Override provider with another provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractSingleton.override", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1937
|
|
* return super(AbstractSingleton, self).override(provider)
|
|
*
|
|
* def reset(self): # <<<<<<<<<<<<<<
|
|
* """Reset cached instance, if any.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_5reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17AbstractSingleton_4reset[] = "Reset cached instance, if any.\n\n :rtype: None\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_5reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("reset (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4reset(((struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4reset(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
__Pyx_RefNannySetupContext("reset", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1942
|
|
* :rtype: None
|
|
* """
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding.reset()
|
|
*/
|
|
__pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) == Py_None);
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1943
|
|
* """
|
|
* if self.__last_overriding is None:
|
|
* raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<<
|
|
* return self.__last_overriding.reset()
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1943, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1943, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
}
|
|
}
|
|
__pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self));
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1943, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1943, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 1943, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1942
|
|
* :rtype: None
|
|
* """
|
|
* if self.__last_overriding is None: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding.reset()
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1944
|
|
* if self.__last_overriding is None:
|
|
* raise Error('{0} must be overridden before calling'.format(self))
|
|
* return self.__last_overriding.reset() # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1944, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1944, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":1937
|
|
* return super(AbstractSingleton, self).override(provider)
|
|
*
|
|
* def reset(self): # <<<<<<<<<<<<<<
|
|
* """Reset cached instance, if any.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractSingleton.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractSingleton_6__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_6__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__instantiator, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_AbstractSingleton, (type(self), 0x0c49df0, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_AbstractSingleton, (type(self), 0x0c49df0, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_AbstractSingleton, (type(self), 0x0c49df0, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_AbstractSingleton, (type(self), 0x0c49df0, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_AbstractSingleton); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_12885488);
|
|
__Pyx_GIVEREF(__pyx_int_12885488);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_12885488);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__instantiator is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_AbstractSingleton, (type(self), 0x0c49df0, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_AbstractSingleton, (type(self), 0x0c49df0, None), state
|
|
* else:
|
|
* return __pyx_unpickle_AbstractSingleton, (type(self), 0x0c49df0, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_AbstractSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_AbstractSingleton); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_12885488);
|
|
__Pyx_GIVEREF(__pyx_int_12885488);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_12885488);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractSingleton.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_AbstractSingleton, (type(self), 0x0c49df0, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17AbstractSingleton_8__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_8__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_AbstractSingleton, (type(self), 0x0c49df0, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_AbstractSingleton__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractSingleton__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_AbstractSingleton, (type(self), 0x0c49df0, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractSingleton__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.AbstractSingleton.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1957
|
|
* """
|
|
*
|
|
* def __init__(self, singleton): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_17SingletonDelegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_17SingletonDelegate___init__[] = "Initializer.\n\n :param singleton: Value that have to be provided.\n :type singleton: py:class:`BaseSingleton`\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_17SingletonDelegate___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_17SingletonDelegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_singleton = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_singleton,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_singleton)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1957, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_singleton = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1957, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.SingletonDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init__(((struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *)__pyx_v_self), __pyx_v_singleton);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_17SingletonDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *__pyx_v_self, PyObject *__pyx_v_singleton) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
int __pyx_t_9;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":1963
|
|
* :type singleton: py:class:`BaseSingleton`
|
|
* """
|
|
* if isinstance(singleton, BaseSingleton) is False: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, BaseSingleton))
|
|
*/
|
|
__pyx_t_1 = __Pyx_TypeCheck(__pyx_v_singleton, __pyx_ptype_19dependency_injector_9providers_BaseSingleton);
|
|
__pyx_t_2 = ((__pyx_t_1 == 0) != 0);
|
|
if (unlikely(__pyx_t_2)) {
|
|
|
|
/* "dependency_injector/providers.pyx":1964
|
|
* """
|
|
* if isinstance(singleton, BaseSingleton) is False:
|
|
* raise Error('{0} can wrap only {1} providers'.format( # <<<<<<<<<<<<<<
|
|
* self.__class__, BaseSingleton))
|
|
* super(SingletonDelegate, self).__init__(singleton)
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1964, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1964, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
|
|
/* "dependency_injector/providers.pyx":1965
|
|
* if isinstance(singleton, BaseSingleton) is False:
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, BaseSingleton)) # <<<<<<<<<<<<<<
|
|
* super(SingletonDelegate, self).__init__(singleton)
|
|
*
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1965, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = NULL;
|
|
__pyx_t_9 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_6, function);
|
|
__pyx_t_9 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)};
|
|
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1964, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)};
|
|
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1964, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1964, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
if (__pyx_t_8) {
|
|
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton));
|
|
PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton));
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1964, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_6)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1964, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(1, 1964, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":1963
|
|
* :type singleton: py:class:`BaseSingleton`
|
|
* """
|
|
* if isinstance(singleton, BaseSingleton) is False: # <<<<<<<<<<<<<<
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, BaseSingleton))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1966
|
|
* raise Error('{0} can wrap only {1} providers'.format(
|
|
* self.__class__, BaseSingleton))
|
|
* super(SingletonDelegate, self).__init__(singleton) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1966, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonDelegate));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonDelegate));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonDelegate));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1966, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1966, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_singleton) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_singleton);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1966, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1957
|
|
* """
|
|
*
|
|
* def __init__(self, singleton): # <<<<<<<<<<<<<<
|
|
* """Initializer.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_AddTraceback("dependency_injector.providers.SingletonDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17SingletonDelegate_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17SingletonDelegate_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17SingletonDelegate_2__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17SingletonDelegate_2__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___provides);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.__pyx___provides);
|
|
__pyx_v_state = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v__dict = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_2 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_3 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
|
|
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__last_overriding, self.__overridden, self.__provides)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_SingletonDelegate, (type(self), 0x3f4a3b6, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_2 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_2 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_2;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___provides != Py_None);
|
|
__pyx_t_5 = (__pyx_t_2 != 0);
|
|
__pyx_t_3 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_3;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_SingletonDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_SingletonDelegate, (type(self), 0x3f4a3b6, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_SingletonDelegate, (type(self), 0x3f4a3b6, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_SingletonDelegate); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__last_overriding is not None or self.__overridden is not None or self.__provides is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_SingletonDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_SingletonDelegate, (type(self), 0x3f4a3b6, None), state
|
|
* else:
|
|
* return __pyx_unpickle_SingletonDelegate, (type(self), 0x3f4a3b6, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_SingletonDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_SingletonDelegate); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_66364342);
|
|
__Pyx_GIVEREF(__pyx_int_66364342);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_66364342);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.SingletonDelegate.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_SingletonDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_SingletonDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17SingletonDelegate_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_17SingletonDelegate_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17SingletonDelegate_4__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17SingletonDelegate_4__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_SingletonDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_SingletonDelegate__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_SingletonDelegate__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_SingletonDelegate, (type(self), 0x3f4a3b6, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_SingletonDelegate__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.SingletonDelegate.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":1999
|
|
* """
|
|
*
|
|
* def __init__(self, *args): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__args = tuple()
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_4List_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_4List___init__[] = "Initializer.";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_4List___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_4List_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4List___init__(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self), __pyx_v_args);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_4List___init__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_args) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2001
|
|
* def __init__(self, *args):
|
|
* """Initializer."""
|
|
* self.__args = tuple() # <<<<<<<<<<<<<<
|
|
* self.__args_len = 0
|
|
* self.set_args(*args)
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2001, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___args);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___args);
|
|
__pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2002
|
|
* """Initializer."""
|
|
* self.__args = tuple()
|
|
* self.__args_len = 0 # <<<<<<<<<<<<<<
|
|
* self.set_args(*args)
|
|
* super(List, self).__init__()
|
|
*/
|
|
__pyx_v_self->__pyx___args_len = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2003
|
|
* self.__args = tuple()
|
|
* self.__args_len = 0
|
|
* self.set_args(*args) # <<<<<<<<<<<<<<
|
|
* super(List, self).__init__()
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2003, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2003, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2004
|
|
* self.__args_len = 0
|
|
* self.set_args(*args)
|
|
* super(List, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2004, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_List));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_List));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_List));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2004, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2004, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_1, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2004, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1999
|
|
* """
|
|
*
|
|
* def __init__(self, *args): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__args = tuple()
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2006
|
|
* super(List, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_4List_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4List_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_v_copied = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2008
|
|
* def __deepcopy__(self, memo):
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2008, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2008, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2008, __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":2009
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_copied != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":2010
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* copied = self.__class__(*deepcopy(self.args, memo))
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2009
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2012
|
|
* return copied
|
|
*
|
|
* copied = self.__class__(*deepcopy(self.args, memo)) # <<<<<<<<<<<<<<
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2012, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2012, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2012, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2012, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2012, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2012, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2013
|
|
*
|
|
* copied = self.__class__(*deepcopy(self.args, memo))
|
|
* self._copy_overridings(copied, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copied
|
|
*/
|
|
if (!(likely(((__pyx_v_copied) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_copied, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(1, 2013, __pyx_L1_error)
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2013, __pyx_L1_error)
|
|
((struct __pyx_vtabstruct_19dependency_injector_9providers_List *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._copy_overridings(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_self), ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v_copied), ((PyObject*)__pyx_v_memo), 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2015
|
|
* self._copy_overridings(copied, memo)
|
|
*
|
|
* return copied # <<<<<<<<<<<<<<
|
|
*
|
|
* def __str__(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2006
|
|
* super(List, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_copied);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2017
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_5__str__(PyObject *__pyx_v_self); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_4List_4__str__[] = "Return string representation of provider.\n\n :rtype: str\n ";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_4List_4__str__;
|
|
#endif
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_5__str__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4List_4__str__(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4__str__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__str__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2022
|
|
* :rtype: str
|
|
* """
|
|
* return represent_provider(provider=self, provides=list(self.args)) # <<<<<<<<<<<<<<
|
|
*
|
|
* @property
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2022, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2022, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2022, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2017
|
|
* return copied
|
|
*
|
|
* def __str__(self): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2025
|
|
*
|
|
* @property
|
|
* def args(self): # <<<<<<<<<<<<<<
|
|
* """Return positional argument injections."""
|
|
* cdef int index
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_4args_1__get__(PyObject *__pyx_v_self) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4List_4args___get__(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_4args___get__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self) {
|
|
int __pyx_v_index;
|
|
struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_arg = 0;
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
__Pyx_RefNannySetupContext("__get__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2031
|
|
* cdef list args
|
|
*
|
|
* args = list() # <<<<<<<<<<<<<<
|
|
* for index in range(self.__args_len):
|
|
* arg = self.__args[index]
|
|
*/
|
|
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2031, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2032
|
|
*
|
|
* args = list()
|
|
* for index in range(self.__args_len): # <<<<<<<<<<<<<<
|
|
* arg = self.__args[index]
|
|
* args.append(arg.__value)
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___args_len;
|
|
__pyx_t_3 = __pyx_t_2;
|
|
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
|
|
__pyx_v_index = __pyx_t_4;
|
|
|
|
/* "dependency_injector/providers.pyx":2033
|
|
* args = list()
|
|
* for index in range(self.__args_len):
|
|
* arg = self.__args[index] # <<<<<<<<<<<<<<
|
|
* args.append(arg.__value)
|
|
* return tuple(args)
|
|
*/
|
|
if (unlikely(__pyx_v_self->__pyx___args == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(1, 2033, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2033, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_PositionalInjection))))) __PYX_ERR(1, 2033, __pyx_L1_error)
|
|
__Pyx_XDECREF_SET(__pyx_v_arg, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2034
|
|
* for index in range(self.__args_len):
|
|
* arg = self.__args[index]
|
|
* args.append(arg.__value) # <<<<<<<<<<<<<<
|
|
* return tuple(args)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_arg->__pyx_base.__pyx___value;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_5 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 2034, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2035
|
|
* arg = self.__args[index]
|
|
* args.append(arg.__value)
|
|
* return tuple(args) # <<<<<<<<<<<<<<
|
|
*
|
|
* def add_args(self, *args):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2035, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2025
|
|
*
|
|
* @property
|
|
* def args(self): # <<<<<<<<<<<<<<
|
|
* """Return positional argument injections."""
|
|
* cdef int index
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List.args.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_arg);
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2037
|
|
* return tuple(args)
|
|
*
|
|
* def add_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Add positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_4List_6add_args[] = "Add positional argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_7add_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("add_args (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add_args", 0))) return NULL;
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4List_6add_args(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self), __pyx_v_args);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_6add_args(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_args) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
Py_ssize_t __pyx_t_3;
|
|
__Pyx_RefNannySetupContext("add_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2042
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__args += parse_positional_injections(args) # <<<<<<<<<<<<<<
|
|
* self.__args_len = len(self.__args)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2042, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2042, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___args);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___args);
|
|
__pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2043
|
|
* """
|
|
* self.__args += parse_positional_injections(args)
|
|
* self.__args_len = len(self.__args) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___args;
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
if (unlikely(__pyx_t_2 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 2043, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2043, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_self->__pyx___args_len = __pyx_t_3;
|
|
|
|
/* "dependency_injector/providers.pyx":2044
|
|
* self.__args += parse_positional_injections(args)
|
|
* self.__args_len = len(self.__args)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def set_args(self, *args):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2037
|
|
* return tuple(args)
|
|
*
|
|
* def add_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Add positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List.add_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2046
|
|
* return self
|
|
*
|
|
* def set_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Set positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_4List_8set_args[] = "Set positional argument injections.\n\n Existing positional argument injections are dropped.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_9set_args(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("set_args (wrapper)", 0);
|
|
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "set_args", 0))) return NULL;
|
|
__Pyx_INCREF(__pyx_args);
|
|
__pyx_v_args = __pyx_args;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4List_8set_args(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self), __pyx_v_args);
|
|
|
|
/* function exit code */
|
|
__Pyx_XDECREF(__pyx_v_args);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_8set_args(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_args) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
Py_ssize_t __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("set_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2053
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__args = parse_positional_injections(args) # <<<<<<<<<<<<<<
|
|
* self.__args_len = len(self.__args)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2053, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___args);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___args);
|
|
__pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2054
|
|
* """
|
|
* self.__args = parse_positional_injections(args)
|
|
* self.__args_len = len(self.__args) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___args;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 2054, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2054, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v_self->__pyx___args_len = __pyx_t_2;
|
|
|
|
/* "dependency_injector/providers.pyx":2055
|
|
* self.__args = parse_positional_injections(args)
|
|
* self.__args_len = len(self.__args)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* def clear_args(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2046
|
|
* return self
|
|
*
|
|
* def set_args(self, *args): # <<<<<<<<<<<<<<
|
|
* """Set positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List.set_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2057
|
|
* return self
|
|
*
|
|
* def clear_args(self): # <<<<<<<<<<<<<<
|
|
* """Drop positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_4List_10clear_args[] = "Drop positional argument injections.\n\n :return: Reference ``self``\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_11clear_args(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("clear_args (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4List_10clear_args(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_10clear_args(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
Py_ssize_t __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("clear_args", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2062
|
|
* :return: Reference ``self``
|
|
* """
|
|
* self.__args = tuple() # <<<<<<<<<<<<<<
|
|
* self.__args_len = len(self.__args)
|
|
* return self
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyTuple_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2062, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___args);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___args);
|
|
__pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2063
|
|
* """
|
|
* self.__args = tuple()
|
|
* self.__args_len = len(self.__args) # <<<<<<<<<<<<<<
|
|
* return self
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___args;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 2063, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2063, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v_self->__pyx___args_len = __pyx_t_2;
|
|
|
|
/* "dependency_injector/providers.pyx":2064
|
|
* self.__args = tuple()
|
|
* self.__args_len = len(self.__args)
|
|
* return self # <<<<<<<<<<<<<<
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__pyx_r = ((PyObject *)__pyx_v_self);
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2057
|
|
* return self
|
|
*
|
|
* def clear_args(self): # <<<<<<<<<<<<<<
|
|
* """Drop positional argument injections.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List.clear_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2066
|
|
* return self
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return result of provided callable's call."""
|
|
* return list(__provide_positional_args(args, self.__args, self.__args_len))
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_4List__provide(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
/* Check if called by wrapper */
|
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
/* Check if overridden in Python */
|
|
else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
#endif
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2066, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_4List_13_provide)) {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
|
|
__pyx_t_5 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
__pyx_t_5 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2066, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs};
|
|
__pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2066, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2066, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__Pyx_GIVEREF(__pyx_v_args);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__Pyx_GIVEREF(__pyx_v_kwargs);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs);
|
|
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2066, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
|
|
if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
|
|
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
|
|
}
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
|
|
}
|
|
#endif
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2068
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return result of provided callable's call."""
|
|
* return list(__provide_positional_args(args, self.__args, self.__args_len)) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_v_self->__pyx___args;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_args, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2068, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2068, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2066
|
|
* return self
|
|
*
|
|
* cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Return result of provided callable's call."""
|
|
* return list(__provide_positional_args(args, self.__args, self.__args_len))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_4List_12_provide[] = "Return result of provided callable's call.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_13_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_args = 0;
|
|
PyObject *__pyx_v_kwargs = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("_provide (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 2066, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 2066, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_args = ((PyObject*)values[0]);
|
|
__pyx_v_kwargs = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2066, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.List._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2066, __pyx_L1_error)
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2066, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4List_12_provide(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_12_provide(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("_provide", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_4List__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2066, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List._provide", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4List_14__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_14__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__last_overriding, self.__overridden) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx___args_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___args);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->__pyx___args);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding));
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___overridden);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->__pyx_base.__pyx___overridden);
|
|
__pyx_t_1 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__args, self.__args_len, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_v__dict = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_3 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_4 = (__pyx_t_3 != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
|
|
__pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__args, self.__args_len, self.__last_overriding, self.__overridden)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__last_overriding is not None or self.__overridden is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_List, (type(self), 0x631cff7, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_3 = (__pyx_v_self->__pyx___args != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_3 != 0);
|
|
if (!__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx___last_overriding) != Py_None);
|
|
__pyx_t_3 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_3) {
|
|
} else {
|
|
__pyx_t_4 = __pyx_t_3;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_3 = (__pyx_v_self->__pyx_base.__pyx___overridden != ((PyObject*)Py_None));
|
|
__pyx_t_5 = (__pyx_t_3 != 0);
|
|
__pyx_t_4 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_4;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_List, (type(self), 0x631cff7, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_4) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__args is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_List, (type(self), 0x631cff7, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_List, (type(self), 0x631cff7, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_103927799);
|
|
__Pyx_GIVEREF(__pyx_int_103927799);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_103927799);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
|
|
__pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_6;
|
|
__pyx_t_6 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__args is not None or self.__last_overriding is not None or self.__overridden is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_List, (type(self), 0x631cff7, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_List, (type(self), 0x631cff7, None), state
|
|
* else:
|
|
* return __pyx_unpickle_List, (type(self), 0x631cff7, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_List__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_List); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_103927799);
|
|
__Pyx_GIVEREF(__pyx_int_103927799);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_103927799);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_List, (type(self), 0x631cff7, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_List__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_4List_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4List_16__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4List_16__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_List, (type(self), 0x631cff7, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_List__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_List__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_List, (type(self), 0x631cff7, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_List__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.List.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Injection_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Injection_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_9Injection___reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Injection___reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_Injection *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__value) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx___call); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx___is_delegated); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx___is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___value);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___value);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->__pyx___value);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__value)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_v__dict = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__value)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_5 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
|
|
__pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__value is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__value)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__value is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Injection, (type(self), 0x2e1d18f, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_6 = (__pyx_v_self->__pyx___value != Py_None);
|
|
__pyx_v_use_setstate = __pyx_t_6;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__value is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Injection, (type(self), 0x2e1d18f, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_6 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__value is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_Injection, (type(self), 0x2e1d18f, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_Injection, (type(self), 0x2e1d18f, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Injection); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_48353679);
|
|
__Pyx_GIVEREF(__pyx_int_48353679);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_48353679);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__value is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_Injection, (type(self), 0x2e1d18f, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_Injection, (type(self), 0x2e1d18f, None), state
|
|
* else:
|
|
* return __pyx_unpickle_Injection, (type(self), 0x2e1d18f, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Injection__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Injection); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_48353679);
|
|
__Pyx_GIVEREF(__pyx_int_48353679);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_48353679);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
|
|
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Injection.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Injection, (type(self), 0x2e1d18f, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Injection__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Injection_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9Injection_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_9Injection_2__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_9Injection_2__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_Injection *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_Injection, (type(self), 0x2e1d18f, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_Injection__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Injection__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_Injection, (type(self), 0x2e1d18f, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Injection__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.Injection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2078
|
|
* """Positional injection class."""
|
|
*
|
|
* def __init__(self, value): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__value = value
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_19PositionalInjection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_19PositionalInjection___init__[] = "Initializer.";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_19PositionalInjection___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_19PositionalInjection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_value = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,0};
|
|
PyObject* values[1] = {0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 2078, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
}
|
|
__pyx_v_value = values[0];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2078, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.PositionalInjection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19PositionalInjection___init__(((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_v_self), __pyx_v_value);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___init__(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self, PyObject *__pyx_v_value) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2080
|
|
* def __init__(self, value):
|
|
* """Initializer."""
|
|
* self.__value = value # <<<<<<<<<<<<<<
|
|
* self.__is_provider = <int>is_provider(value)
|
|
* self.__is_delegated = <int>is_delegated(value)
|
|
*/
|
|
__Pyx_INCREF(__pyx_v_value);
|
|
__Pyx_GIVEREF(__pyx_v_value);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx___value);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___value);
|
|
__pyx_v_self->__pyx_base.__pyx___value = __pyx_v_value;
|
|
|
|
/* "dependency_injector/providers.pyx":2081
|
|
* """Initializer."""
|
|
* self.__value = value
|
|
* self.__is_provider = <int>is_provider(value) # <<<<<<<<<<<<<<
|
|
* self.__is_delegated = <int>is_delegated(value)
|
|
* self.__call = <int>(self.__is_provider == 1 and
|
|
*/
|
|
__pyx_v_self->__pyx_base.__pyx___is_provider = ((int)__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_value, 0));
|
|
|
|
/* "dependency_injector/providers.pyx":2082
|
|
* self.__value = value
|
|
* self.__is_provider = <int>is_provider(value)
|
|
* self.__is_delegated = <int>is_delegated(value) # <<<<<<<<<<<<<<
|
|
* self.__call = <int>(self.__is_provider == 1 and
|
|
* self.__is_delegated == 0)
|
|
*/
|
|
__pyx_v_self->__pyx_base.__pyx___is_delegated = ((int)__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_value, 0));
|
|
|
|
/* "dependency_injector/providers.pyx":2083
|
|
* self.__is_provider = <int>is_provider(value)
|
|
* self.__is_delegated = <int>is_delegated(value)
|
|
* self.__call = <int>(self.__is_provider == 1 and # <<<<<<<<<<<<<<
|
|
* self.__is_delegated == 0)
|
|
* super(PositionalInjection, self).__init__()
|
|
*/
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___is_provider == 1);
|
|
if (__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_2;
|
|
goto __pyx_L3_bool_binop_done;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2084
|
|
* self.__is_delegated = <int>is_delegated(value)
|
|
* self.__call = <int>(self.__is_provider == 1 and
|
|
* self.__is_delegated == 0) # <<<<<<<<<<<<<<
|
|
* super(PositionalInjection, self).__init__()
|
|
*
|
|
*/
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___is_delegated == 0);
|
|
__pyx_t_1 = __pyx_t_2;
|
|
__pyx_L3_bool_binop_done:;
|
|
|
|
/* "dependency_injector/providers.pyx":2083
|
|
* self.__is_provider = <int>is_provider(value)
|
|
* self.__is_delegated = <int>is_delegated(value)
|
|
* self.__call = <int>(self.__is_provider == 1 and # <<<<<<<<<<<<<<
|
|
* self.__is_delegated == 0)
|
|
* super(PositionalInjection, self).__init__()
|
|
*/
|
|
__pyx_v_self->__pyx_base.__pyx___call = ((int)__pyx_t_1);
|
|
|
|
/* "dependency_injector/providers.pyx":2085
|
|
* self.__call = <int>(self.__is_provider == 1 and
|
|
* self.__is_delegated == 0)
|
|
* super(PositionalInjection, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2085, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2085, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2085, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2085, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2078
|
|
* """Positional injection class."""
|
|
*
|
|
* def __init__(self, value): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__value = value
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.PositionalInjection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2087
|
|
* super(PositionalInjection, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19PositionalInjection_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_19PositionalInjection_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19PositionalInjection_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19PositionalInjection_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_v_copied = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2089
|
|
* def __deepcopy__(self, memo):
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2089, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2089, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2089, __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":2090
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
* return self.__class__(deepcopy(self.__value, memo))
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_copied != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":2091
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
* return self.__class__(deepcopy(self.__value, memo))
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2090
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
* return self.__class__(deepcopy(self.__value, memo))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2092
|
|
* if copied is not None:
|
|
* return copied
|
|
* return self.__class__(deepcopy(self.__value, memo)) # <<<<<<<<<<<<<<
|
|
*
|
|
* def get_value(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2092, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __pyx_v_self->__pyx_base.__pyx___value;
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2092, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2092, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2092, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2087
|
|
* super(PositionalInjection, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.PositionalInjection.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_copied);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2094
|
|
* return self.__class__(deepcopy(self.__value, memo))
|
|
*
|
|
* def get_value(self): # <<<<<<<<<<<<<<
|
|
* """Return injection value."""
|
|
* return __get_value(self)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19PositionalInjection_5get_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_19PositionalInjection_4get_value[] = "Return injection value.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19PositionalInjection_5get_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("get_value (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19PositionalInjection_4get_value(((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection_4get_value(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("get_value", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2096
|
|
* def get_value(self):
|
|
* """Return injection value."""
|
|
* return __get_value(self) # <<<<<<<<<<<<<<
|
|
*
|
|
* def get_original_value(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2096, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2094
|
|
* return self.__class__(deepcopy(self.__value, memo))
|
|
*
|
|
* def get_value(self): # <<<<<<<<<<<<<<
|
|
* """Return injection value."""
|
|
* return __get_value(self)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.PositionalInjection.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2098
|
|
* return __get_value(self)
|
|
*
|
|
* def get_original_value(self): # <<<<<<<<<<<<<<
|
|
* """Return original value."""
|
|
* return self.__value
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19PositionalInjection_7get_original_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_19PositionalInjection_6get_original_value[] = "Return original value.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19PositionalInjection_7get_original_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("get_original_value (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19PositionalInjection_6get_original_value(((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection_6get_original_value(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("get_original_value", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2100
|
|
* def get_original_value(self):
|
|
* """Return original value."""
|
|
* return self.__value # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___value);
|
|
__pyx_r = __pyx_v_self->__pyx_base.__pyx___value;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2098
|
|
* return __get_value(self)
|
|
*
|
|
* def get_original_value(self): # <<<<<<<<<<<<<<
|
|
* """Return original value."""
|
|
* return self.__value
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19PositionalInjection_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19PositionalInjection_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19PositionalInjection_8__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection_8__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__value) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___call); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___is_delegated); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___value);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___value);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->__pyx_base.__pyx___value);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__value)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_v__dict = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__value)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_5 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
|
|
__pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__value is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__value)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__value is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_PositionalInjection, (type(self), 0x2e1d18f, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_6 = (__pyx_v_self->__pyx_base.__pyx___value != Py_None);
|
|
__pyx_v_use_setstate = __pyx_t_6;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__value is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_PositionalInjection, (type(self), 0x2e1d18f, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_6 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__value is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_PositionalInjection, (type(self), 0x2e1d18f, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_PositionalInjection, (type(self), 0x2e1d18f, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_PositionalInjecti); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_48353679);
|
|
__Pyx_GIVEREF(__pyx_int_48353679);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_48353679);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__value is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_PositionalInjection, (type(self), 0x2e1d18f, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_PositionalInjection, (type(self), 0x2e1d18f, None), state
|
|
* else:
|
|
* return __pyx_unpickle_PositionalInjection, (type(self), 0x2e1d18f, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_PositionalInjection__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_PositionalInjecti); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_48353679);
|
|
__Pyx_GIVEREF(__pyx_int_48353679);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_48353679);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
|
|
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.PositionalInjection.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_PositionalInjection, (type(self), 0x2e1d18f, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_PositionalInjection__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19PositionalInjection_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_19PositionalInjection_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19PositionalInjection_10__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection_10__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_PositionalInjection, (type(self), 0x2e1d18f, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_PositionalInjection__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_PositionalInjection__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_PositionalInjection, (type(self), 0x2e1d18f, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_PositionalInjection__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.PositionalInjection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2106
|
|
* """Keyword injection class."""
|
|
*
|
|
* def __init__(self, name, value): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__name = name
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static int __pyx_pw_19dependency_injector_9providers_14NamedInjection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_14NamedInjection___init__[] = "Initializer.";
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_14NamedInjection___init__;
|
|
#endif
|
|
static int __pyx_pw_19dependency_injector_9providers_14NamedInjection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_name = 0;
|
|
PyObject *__pyx_v_value = 0;
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_value,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 2106, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 2106, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_name = values[0];
|
|
__pyx_v_value = values[1];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2106, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.NamedInjection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_v_self), __pyx_v_name, __pyx_v_value);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
__Pyx_RefNannySetupContext("__init__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2108
|
|
* def __init__(self, name, value):
|
|
* """Initializer."""
|
|
* self.__name = name # <<<<<<<<<<<<<<
|
|
* self.__value = value
|
|
* self.__is_provider = <int>is_provider(value)
|
|
*/
|
|
__Pyx_INCREF(__pyx_v_name);
|
|
__Pyx_GIVEREF(__pyx_v_name);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx___name);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx___name);
|
|
__pyx_v_self->__pyx___name = __pyx_v_name;
|
|
|
|
/* "dependency_injector/providers.pyx":2109
|
|
* """Initializer."""
|
|
* self.__name = name
|
|
* self.__value = value # <<<<<<<<<<<<<<
|
|
* self.__is_provider = <int>is_provider(value)
|
|
* self.__is_delegated = <int>is_delegated(value)
|
|
*/
|
|
__Pyx_INCREF(__pyx_v_value);
|
|
__Pyx_GIVEREF(__pyx_v_value);
|
|
__Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx___value);
|
|
__Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___value);
|
|
__pyx_v_self->__pyx_base.__pyx___value = __pyx_v_value;
|
|
|
|
/* "dependency_injector/providers.pyx":2110
|
|
* self.__name = name
|
|
* self.__value = value
|
|
* self.__is_provider = <int>is_provider(value) # <<<<<<<<<<<<<<
|
|
* self.__is_delegated = <int>is_delegated(value)
|
|
* self.__call = <int>(self.__is_provider == 1 and
|
|
*/
|
|
__pyx_v_self->__pyx_base.__pyx___is_provider = ((int)__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_value, 0));
|
|
|
|
/* "dependency_injector/providers.pyx":2111
|
|
* self.__value = value
|
|
* self.__is_provider = <int>is_provider(value)
|
|
* self.__is_delegated = <int>is_delegated(value) # <<<<<<<<<<<<<<
|
|
* self.__call = <int>(self.__is_provider == 1 and
|
|
* self.__is_delegated == 0)
|
|
*/
|
|
__pyx_v_self->__pyx_base.__pyx___is_delegated = ((int)__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_value, 0));
|
|
|
|
/* "dependency_injector/providers.pyx":2112
|
|
* self.__is_provider = <int>is_provider(value)
|
|
* self.__is_delegated = <int>is_delegated(value)
|
|
* self.__call = <int>(self.__is_provider == 1 and # <<<<<<<<<<<<<<
|
|
* self.__is_delegated == 0)
|
|
* super(NamedInjection, self).__init__()
|
|
*/
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___is_provider == 1);
|
|
if (__pyx_t_2) {
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_2;
|
|
goto __pyx_L3_bool_binop_done;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2113
|
|
* self.__is_delegated = <int>is_delegated(value)
|
|
* self.__call = <int>(self.__is_provider == 1 and
|
|
* self.__is_delegated == 0) # <<<<<<<<<<<<<<
|
|
* super(NamedInjection, self).__init__()
|
|
*
|
|
*/
|
|
__pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx___is_delegated == 0);
|
|
__pyx_t_1 = __pyx_t_2;
|
|
__pyx_L3_bool_binop_done:;
|
|
|
|
/* "dependency_injector/providers.pyx":2112
|
|
* self.__is_provider = <int>is_provider(value)
|
|
* self.__is_delegated = <int>is_delegated(value)
|
|
* self.__call = <int>(self.__is_provider == 1 and # <<<<<<<<<<<<<<
|
|
* self.__is_delegated == 0)
|
|
* super(NamedInjection, self).__init__()
|
|
*/
|
|
__pyx_v_self->__pyx_base.__pyx___call = ((int)__pyx_t_1);
|
|
|
|
/* "dependency_injector/providers.pyx":2114
|
|
* self.__call = <int>(self.__is_provider == 1 and
|
|
* self.__is_delegated == 0)
|
|
* super(NamedInjection, self).__init__() # <<<<<<<<<<<<<<
|
|
*
|
|
* def __deepcopy__(self, memo):
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2114, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_self));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));
|
|
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2114, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2114, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2114, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2106
|
|
* """Keyword injection class."""
|
|
*
|
|
* def __init__(self, name, value): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__name = name
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.NamedInjection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = -1;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2116
|
|
* super(NamedInjection, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_14NamedInjection_2__deepcopy__[] = "Create and return full copy of provider.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_3__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_14NamedInjection_2__deepcopy__(((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_v_self), ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_v_copied = NULL;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_7;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
int __pyx_t_9;
|
|
PyObject *__pyx_t_10 = NULL;
|
|
__Pyx_RefNannySetupContext("__deepcopy__", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2118
|
|
* def __deepcopy__(self, memo):
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self)) # <<<<<<<<<<<<<<
|
|
* if copied is not None:
|
|
* return copied
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2118, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2118, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2118, __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":2119
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
* return self.__class__(deepcopy(self.__name, memo),
|
|
*/
|
|
__pyx_t_5 = (__pyx_v_copied != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":2120
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None:
|
|
* return copied # <<<<<<<<<<<<<<
|
|
* return self.__class__(deepcopy(self.__name, memo),
|
|
* deepcopy(self.__value, memo))
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_copied);
|
|
__pyx_r = __pyx_v_copied;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2119
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
* if copied is not None: # <<<<<<<<<<<<<<
|
|
* return copied
|
|
* return self.__class__(deepcopy(self.__name, memo),
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2121
|
|
* if copied is not None:
|
|
* return copied
|
|
* return self.__class__(deepcopy(self.__name, memo), # <<<<<<<<<<<<<<
|
|
* deepcopy(self.__value, memo))
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2121, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __pyx_v_self->__pyx___name;
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2121, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2121, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2122
|
|
* return copied
|
|
* return self.__class__(deepcopy(self.__name, memo),
|
|
* deepcopy(self.__value, memo)) # <<<<<<<<<<<<<<
|
|
*
|
|
* def get_name(self):
|
|
*/
|
|
__pyx_t_3 = __pyx_v_self->__pyx_base.__pyx___value;
|
|
__Pyx_INCREF(__pyx_t_3);
|
|
if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(1, 2122, __pyx_L1_error)
|
|
__pyx_t_7.__pyx_n = 1;
|
|
__pyx_t_7.memo = ((PyObject*)__pyx_v_memo);
|
|
__pyx_t_8 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_3, 0, &__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2122, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = NULL;
|
|
__pyx_t_9 = 0;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_3)) {
|
|
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_9 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_2)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_8};
|
|
__pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2121, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_8};
|
|
__pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2121, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2121, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_10);
|
|
if (__pyx_t_3) {
|
|
__Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
|
|
}
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_8);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2121, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2116
|
|
* super(NamedInjection, self).__init__()
|
|
*
|
|
* def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
|
|
* """Create and return full copy of provider."""
|
|
* copied = memo.get(id(self))
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_10);
|
|
__Pyx_AddTraceback("dependency_injector.providers.NamedInjection.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_copied);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2124
|
|
* deepcopy(self.__value, memo))
|
|
*
|
|
* def get_name(self): # <<<<<<<<<<<<<<
|
|
* """Return injection value."""
|
|
* return __get_name(self)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_5get_name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_14NamedInjection_4get_name[] = "Return injection value.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_5get_name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("get_name (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_14NamedInjection_4get_name(((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get_name(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("get_name", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2126
|
|
* def get_name(self):
|
|
* """Return injection value."""
|
|
* return __get_name(self) # <<<<<<<<<<<<<<
|
|
*
|
|
* def get_value(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2126, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2124
|
|
* deepcopy(self.__value, memo))
|
|
*
|
|
* def get_name(self): # <<<<<<<<<<<<<<
|
|
* """Return injection value."""
|
|
* return __get_name(self)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.NamedInjection.get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2128
|
|
* return __get_name(self)
|
|
*
|
|
* def get_value(self): # <<<<<<<<<<<<<<
|
|
* """Return injection value."""
|
|
* return __get_value(self)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_7get_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_14NamedInjection_6get_value[] = "Return injection value.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_7get_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("get_value (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_14NamedInjection_6get_value(((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get_value(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("get_value", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2130
|
|
* def get_value(self):
|
|
* """Return injection value."""
|
|
* return __get_value(self) # <<<<<<<<<<<<<<
|
|
*
|
|
* def get_original_value(self):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2130, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2128
|
|
* return __get_name(self)
|
|
*
|
|
* def get_value(self): # <<<<<<<<<<<<<<
|
|
* """Return injection value."""
|
|
* return __get_value(self)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.NamedInjection.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2132
|
|
* return __get_value(self)
|
|
*
|
|
* def get_original_value(self): # <<<<<<<<<<<<<<
|
|
* """Return original value."""
|
|
* return self.__value
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_9get_original_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_14NamedInjection_8get_original_value[] = "Return original value.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_9get_original_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("get_original_value (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_14NamedInjection_8get_original_value(((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_8get_original_value(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("get_original_value", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2134
|
|
* def get_original_value(self):
|
|
* """Return original value."""
|
|
* return self.__value # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___value);
|
|
__pyx_r = __pyx_v_self->__pyx_base.__pyx___value;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2132
|
|
* return __get_value(self)
|
|
*
|
|
* def get_original_value(self): # <<<<<<<<<<<<<<
|
|
* """Return original value."""
|
|
* return self.__value
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_14NamedInjection_10__reduce_cython__(((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_v_self));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_10__reduce_cython__(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self) {
|
|
PyObject *__pyx_v_state = 0;
|
|
PyObject *__pyx_v__dict = 0;
|
|
int __pyx_v_use_setstate;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
int __pyx_t_7;
|
|
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object _dict
|
|
* cdef bint use_setstate
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__name, self.__value) # <<<<<<<<<<<<<<
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___call); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___is_delegated); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base.__pyx___is_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___name);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx___name);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->__pyx___name);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx___value);
|
|
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx___value);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->__pyx_base.__pyx___value);
|
|
__pyx_t_1 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_v_state = ((PyObject*)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* cdef bint use_setstate
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__name, self.__value)
|
|
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_v__dict = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__name, self.__value)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
__pyx_t_5 = (__pyx_v__dict != Py_None);
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":8
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None:
|
|
* state += (_dict,) # <<<<<<<<<<<<<<
|
|
* use_setstate = True
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_v__dict);
|
|
__Pyx_GIVEREF(__pyx_v__dict);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
|
|
__pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":9
|
|
* if _dict is not None:
|
|
* state += (_dict,)
|
|
* use_setstate = True # <<<<<<<<<<<<<<
|
|
* else:
|
|
* use_setstate = self.__name is not None or self.__value is not None
|
|
*/
|
|
__pyx_v_use_setstate = 1;
|
|
|
|
/* "(tree fragment)":7
|
|
* state = (self.__call, self.__is_delegated, self.__is_provider, self.__name, self.__value)
|
|
* _dict = getattr(self, '__dict__', None)
|
|
* if _dict is not None: # <<<<<<<<<<<<<<
|
|
* state += (_dict,)
|
|
* use_setstate = True
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* use_setstate = True
|
|
* else:
|
|
* use_setstate = self.__name is not None or self.__value is not None # <<<<<<<<<<<<<<
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_NamedInjection, (type(self), 0x64f395f, None), state
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_5 = (__pyx_v_self->__pyx___name != Py_None);
|
|
__pyx_t_7 = (__pyx_t_5 != 0);
|
|
if (!__pyx_t_7) {
|
|
} else {
|
|
__pyx_t_6 = __pyx_t_7;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_7 = (__pyx_v_self->__pyx_base.__pyx___value != Py_None);
|
|
__pyx_t_5 = (__pyx_t_7 != 0);
|
|
__pyx_t_6 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
__pyx_v_use_setstate = __pyx_t_6;
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__name is not None or self.__value is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_NamedInjection, (type(self), 0x64f395f, None), state
|
|
* else:
|
|
*/
|
|
__pyx_t_6 = (__pyx_v_use_setstate != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":13
|
|
* use_setstate = self.__name is not None or self.__value is not None
|
|
* if use_setstate:
|
|
* return __pyx_unpickle_NamedInjection, (type(self), 0x64f395f, None), state # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return __pyx_unpickle_NamedInjection, (type(self), 0x64f395f, state)
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_NamedInjection); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_105855327);
|
|
__Pyx_GIVEREF(__pyx_int_105855327);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_105855327);
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":12
|
|
* else:
|
|
* use_setstate = self.__name is not None or self.__value is not None
|
|
* if use_setstate: # <<<<<<<<<<<<<<
|
|
* return __pyx_unpickle_NamedInjection, (type(self), 0x64f395f, None), state
|
|
* else:
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":15
|
|
* return __pyx_unpickle_NamedInjection, (type(self), 0x64f395f, None), state
|
|
* else:
|
|
* return __pyx_unpickle_NamedInjection, (type(self), 0x64f395f, state) # <<<<<<<<<<<<<<
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_NamedInjection__set_state(self, __pyx_state)
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_NamedInjection); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
|
|
__Pyx_INCREF(__pyx_int_105855327);
|
|
__Pyx_GIVEREF(__pyx_int_105855327);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_105855327);
|
|
__Pyx_INCREF(__pyx_v_state);
|
|
__Pyx_GIVEREF(__pyx_v_state);
|
|
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
|
|
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
* cdef tuple state
|
|
* cdef object _dict
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.NamedInjection.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_state);
|
|
__Pyx_XDECREF(__pyx_v__dict);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_NamedInjection, (type(self), 0x64f395f, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_NamedInjection__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_14NamedInjection_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_14NamedInjection_12__setstate_cython__(((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_12__setstate_cython__(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
|
|
|
|
/* "(tree fragment)":17
|
|
* return __pyx_unpickle_NamedInjection, (type(self), 0x64f395f, state)
|
|
* def __setstate_cython__(self, __pyx_state):
|
|
* __pyx_unpickle_NamedInjection__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_NamedInjection__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":16
|
|
* else:
|
|
* return __pyx_unpickle_NamedInjection, (type(self), 0x64f395f, state)
|
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_NamedInjection__set_state(self, __pyx_state)
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.NamedInjection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2139
|
|
* @cython.boundscheck(False)
|
|
* @cython.wraparound(False)
|
|
* cpdef tuple parse_positional_injections(tuple args): # <<<<<<<<<<<<<<
|
|
* """Parse positional injections."""
|
|
* cdef list injections = list()
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_1parse_positional_injections(PyObject *__pyx_self, PyObject *__pyx_v_args); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injections(PyObject *__pyx_v_args, CYTHON_UNUSED int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_v_injections = 0;
|
|
int __pyx_v_args_len;
|
|
int __pyx_v_index;
|
|
PyObject *__pyx_v_arg = 0;
|
|
struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_injection = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
Py_ssize_t __pyx_t_2;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("parse_positional_injections", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2141
|
|
* cpdef tuple parse_positional_injections(tuple args):
|
|
* """Parse positional injections."""
|
|
* cdef list injections = list() # <<<<<<<<<<<<<<
|
|
* cdef int args_len = len(args)
|
|
*
|
|
*/
|
|
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2141, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_injections = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2142
|
|
* """Parse positional injections."""
|
|
* cdef list injections = list()
|
|
* cdef int args_len = len(args) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int index
|
|
*/
|
|
if (unlikely(__pyx_v_args == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(1, 2142, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2142, __pyx_L1_error)
|
|
__pyx_v_args_len = __pyx_t_2;
|
|
|
|
/* "dependency_injector/providers.pyx":2148
|
|
* cdef PositionalInjection injection
|
|
*
|
|
* for index in range(args_len): # <<<<<<<<<<<<<<
|
|
* arg = args[index]
|
|
* injection = PositionalInjection(arg)
|
|
*/
|
|
__pyx_t_3 = __pyx_v_args_len;
|
|
__pyx_t_4 = __pyx_t_3;
|
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
__pyx_v_index = __pyx_t_5;
|
|
|
|
/* "dependency_injector/providers.pyx":2149
|
|
*
|
|
* for index in range(args_len):
|
|
* arg = args[index] # <<<<<<<<<<<<<<
|
|
* injection = PositionalInjection(arg)
|
|
* injections.append(injection)
|
|
*/
|
|
if (unlikely(__pyx_v_args == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(1, 2149, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_args, __pyx_v_index);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2150
|
|
* for index in range(args_len):
|
|
* arg = args[index]
|
|
* injection = PositionalInjection(arg) # <<<<<<<<<<<<<<
|
|
* injections.append(injection)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection), __pyx_v_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2150, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1));
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2151
|
|
* arg = args[index]
|
|
* injection = PositionalInjection(arg)
|
|
* injections.append(injection) # <<<<<<<<<<<<<<
|
|
*
|
|
* return tuple(injections)
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 2151, __pyx_L1_error)
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2153
|
|
* injections.append(injection)
|
|
*
|
|
* return tuple(injections) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2153, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2139
|
|
* @cython.boundscheck(False)
|
|
* @cython.wraparound(False)
|
|
* cpdef tuple parse_positional_injections(tuple args): # <<<<<<<<<<<<<<
|
|
* """Parse positional injections."""
|
|
* cdef list injections = list()
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.parse_positional_injections", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_injections);
|
|
__Pyx_XDECREF(__pyx_v_arg);
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_injection);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_1parse_positional_injections(PyObject *__pyx_self, PyObject *__pyx_v_args); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_parse_positional_injections[] = "Parse positional injections.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_1parse_positional_injections(PyObject *__pyx_self, PyObject *__pyx_v_args) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("parse_positional_injections (wrapper)", 0);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 2139, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_parse_positional_injections(__pyx_self, ((PyObject*)__pyx_v_args));
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_parse_positional_injections(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("parse_positional_injections", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2139, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.parse_positional_injections", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2158
|
|
* @cython.boundscheck(False)
|
|
* @cython.wraparound(False)
|
|
* cpdef tuple parse_named_injections(dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Parse named injections."""
|
|
* cdef list injections = list()
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_3parse_named_injections(PyObject *__pyx_self, PyObject *__pyx_v_kwargs); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections(PyObject *__pyx_v_kwargs, CYTHON_UNUSED int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_v_injections = 0;
|
|
PyObject *__pyx_v_name = 0;
|
|
PyObject *__pyx_v_arg = 0;
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_injection = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
Py_ssize_t __pyx_t_3;
|
|
PyObject *(*__pyx_t_4)(PyObject *);
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *(*__pyx_t_8)(PyObject *);
|
|
int __pyx_t_9;
|
|
__Pyx_RefNannySetupContext("parse_named_injections", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2160
|
|
* cpdef tuple parse_named_injections(dict kwargs):
|
|
* """Parse named injections."""
|
|
* cdef list injections = list() # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef object name
|
|
*/
|
|
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2160, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_v_injections = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2166
|
|
* cdef NamedInjection injection
|
|
*
|
|
* for name, arg in kwargs.items(): # <<<<<<<<<<<<<<
|
|
* injection = NamedInjection(name, arg)
|
|
* injections.append(injection)
|
|
*/
|
|
if (unlikely(__pyx_v_kwargs == Py_None)) {
|
|
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
|
|
__PYX_ERR(1, 2166, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
|
|
__pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
|
|
__pyx_t_4 = NULL;
|
|
} else {
|
|
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
}
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
for (;;) {
|
|
if (likely(!__pyx_t_4)) {
|
|
if (likely(PyList_CheckExact(__pyx_t_2))) {
|
|
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
} else {
|
|
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
#else
|
|
__pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
#endif
|
|
}
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_4(__pyx_t_2);
|
|
if (unlikely(!__pyx_t_1)) {
|
|
PyObject* exc_type = PyErr_Occurred();
|
|
if (exc_type) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
else __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
}
|
|
break;
|
|
}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
}
|
|
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
|
|
PyObject* sequence = __pyx_t_1;
|
|
Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
|
|
if (unlikely(size != 2)) {
|
|
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
__PYX_ERR(1, 2166, __pyx_L1_error)
|
|
}
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
|
|
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
|
|
} else {
|
|
__pyx_t_5 = PyList_GET_ITEM(sequence, 0);
|
|
__pyx_t_6 = PyList_GET_ITEM(sequence, 1);
|
|
}
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
#else
|
|
__pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
#endif
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
} else {
|
|
Py_ssize_t index = -1;
|
|
__pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
|
|
index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 2166, __pyx_L1_error)
|
|
__pyx_t_8 = NULL;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
goto __pyx_L6_unpacking_done;
|
|
__pyx_L5_unpacking_failed:;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__pyx_t_8 = NULL;
|
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
__PYX_ERR(1, 2166, __pyx_L1_error)
|
|
__pyx_L6_unpacking_done:;
|
|
}
|
|
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2167
|
|
*
|
|
* for name, arg in kwargs.items():
|
|
* injection = NamedInjection(name, arg) # <<<<<<<<<<<<<<
|
|
* injections.append(injection)
|
|
*
|
|
*/
|
|
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2167, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_v_name);
|
|
__Pyx_GIVEREF(__pyx_v_name);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name);
|
|
__Pyx_INCREF(__pyx_v_arg);
|
|
__Pyx_GIVEREF(__pyx_v_arg);
|
|
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_arg);
|
|
__pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2167, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2168
|
|
* for name, arg in kwargs.items():
|
|
* injection = NamedInjection(name, arg)
|
|
* injections.append(injection) # <<<<<<<<<<<<<<
|
|
*
|
|
* return tuple(injections)
|
|
*/
|
|
__pyx_t_9 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 2168, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":2166
|
|
* cdef NamedInjection injection
|
|
*
|
|
* for name, arg in kwargs.items(): # <<<<<<<<<<<<<<
|
|
* injection = NamedInjection(name, arg)
|
|
* injections.append(injection)
|
|
*/
|
|
}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2170
|
|
* injections.append(injection)
|
|
*
|
|
* return tuple(injections) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2170, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_r = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2158
|
|
* @cython.boundscheck(False)
|
|
* @cython.wraparound(False)
|
|
* cpdef tuple parse_named_injections(dict kwargs): # <<<<<<<<<<<<<<
|
|
* """Parse named injections."""
|
|
* cdef list injections = list()
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_AddTraceback("dependency_injector.providers.parse_named_injections", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_injections);
|
|
__Pyx_XDECREF(__pyx_v_name);
|
|
__Pyx_XDECREF(__pyx_v_arg);
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_injection);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_3parse_named_injections(PyObject *__pyx_self, PyObject *__pyx_v_kwargs); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_2parse_named_injections[] = "Parse named injections.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_3parse_named_injections(PyObject *__pyx_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("parse_named_injections (wrapper)", 0);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 2158, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_2parse_named_injections(__pyx_self, ((PyObject*)__pyx_v_kwargs));
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_2parse_named_injections(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("parse_named_injections", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2158, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.parse_named_injections", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2173
|
|
*
|
|
*
|
|
* cpdef bint is_provider(object instance): # <<<<<<<<<<<<<<
|
|
* """Check if instance is provider instance.
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_5is_provider(PyObject *__pyx_self, PyObject *__pyx_v_instance); /*proto*/
|
|
static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_v_instance, CYTHON_UNUSED int __pyx_skip_dispatch) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
__Pyx_RefNannySetupContext("is_provider", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2181
|
|
* :rtype: bool
|
|
* """
|
|
* return (not isinstance(instance, CLASS_TYPES) and # <<<<<<<<<<<<<<
|
|
* getattr(instance, '__IS_PROVIDER__', False) is True)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES;
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 2181, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_4;
|
|
goto __pyx_L3_bool_binop_done;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2182
|
|
* """
|
|
* return (not isinstance(instance, CLASS_TYPES) and
|
|
* getattr(instance, '__IS_PROVIDER__', False) is True) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_PROVIDER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2182, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = (__pyx_t_2 == Py_True);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_3 = (__pyx_t_4 != 0);
|
|
__pyx_t_1 = __pyx_t_3;
|
|
__pyx_L3_bool_binop_done:;
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2173
|
|
*
|
|
*
|
|
* cpdef bint is_provider(object instance): # <<<<<<<<<<<<<<
|
|
* """Check if instance is provider instance.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_WriteUnraisable("dependency_injector.providers.is_provider", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_5is_provider(PyObject *__pyx_self, PyObject *__pyx_v_instance); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_4is_provider[] = "Check if instance is provider instance.\n\n :param instance: Instance to be checked.\n :type instance: object\n\n :rtype: bool\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_5is_provider(PyObject *__pyx_self, PyObject *__pyx_v_instance) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("is_provider (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_4is_provider(__pyx_self, ((PyObject *)__pyx_v_instance));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_4is_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("is_provider", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2173, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.is_provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2185
|
|
*
|
|
*
|
|
* cpdef object ensure_is_provider(object instance): # <<<<<<<<<<<<<<
|
|
* """Check if instance is provider instance and return it.
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7ensure_is_provider(PyObject *__pyx_self, PyObject *__pyx_v_instance); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyObject *__pyx_v_instance, CYTHON_UNUSED int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
__Pyx_RefNannySetupContext("ensure_is_provider", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2196
|
|
* :rtype: :py:class:`dependency_injector.providers.Provider`
|
|
* """
|
|
* if not is_provider(instance): # <<<<<<<<<<<<<<
|
|
* raise Error('Expected provider instance, '
|
|
* 'got {0}'.format(str(instance)))
|
|
*/
|
|
__pyx_t_1 = ((!(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0) != 0)) != 0);
|
|
if (unlikely(__pyx_t_1)) {
|
|
|
|
/* "dependency_injector/providers.pyx":2197
|
|
* """
|
|
* if not is_provider(instance):
|
|
* raise Error('Expected provider instance, ' # <<<<<<<<<<<<<<
|
|
* 'got {0}'.format(str(instance)))
|
|
* return instance
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2197, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
|
|
/* "dependency_injector/providers.pyx":2198
|
|
* if not is_provider(instance):
|
|
* raise Error('Expected provider instance, '
|
|
* 'got {0}'.format(str(instance))) # <<<<<<<<<<<<<<
|
|
* return instance
|
|
*
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Expected_provider_instance_got_0, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2198, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_instance); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2198, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
|
|
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
|
|
if (likely(__pyx_t_7)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_7);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_5, function);
|
|
}
|
|
}
|
|
__pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2198, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2197, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__PYX_ERR(1, 2197, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pyx":2196
|
|
* :rtype: :py:class:`dependency_injector.providers.Provider`
|
|
* """
|
|
* if not is_provider(instance): # <<<<<<<<<<<<<<
|
|
* raise Error('Expected provider instance, '
|
|
* 'got {0}'.format(str(instance)))
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2199
|
|
* raise Error('Expected provider instance, '
|
|
* 'got {0}'.format(str(instance)))
|
|
* return instance # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_instance);
|
|
__pyx_r = __pyx_v_instance;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2185
|
|
*
|
|
*
|
|
* cpdef object ensure_is_provider(object instance): # <<<<<<<<<<<<<<
|
|
* """Check if instance is provider instance and return it.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ensure_is_provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7ensure_is_provider(PyObject *__pyx_self, PyObject *__pyx_v_instance); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_6ensure_is_provider[] = "Check if instance is provider instance and return it.\n\n :param instance: Instance to be checked.\n :type instance: object\n\n :raise: :py:exc:`dependency_injector.errors.Error` if provided instance is\n not provider.\n\n :rtype: :py:class:`dependency_injector.providers.Provider`\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_7ensure_is_provider(PyObject *__pyx_self, PyObject *__pyx_v_instance) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("ensure_is_provider (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_6ensure_is_provider(__pyx_self, ((PyObject *)__pyx_v_instance));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_6ensure_is_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("ensure_is_provider", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_ensure_is_provider(__pyx_v_instance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2185, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.ensure_is_provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2202
|
|
*
|
|
*
|
|
* cpdef bint is_delegated(object instance): # <<<<<<<<<<<<<<
|
|
* """Check if instance is delegated provider.
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9is_delegated(PyObject *__pyx_self, PyObject *__pyx_v_instance); /*proto*/
|
|
static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx_v_instance, CYTHON_UNUSED int __pyx_skip_dispatch) {
|
|
int __pyx_r;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
__Pyx_RefNannySetupContext("is_delegated", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2210
|
|
* :rtype: bool
|
|
* """
|
|
* return (not isinstance(instance, CLASS_TYPES) and # <<<<<<<<<<<<<<
|
|
* getattr(instance, '__IS_DELEGATED__', False) is True)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES;
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 2210, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_4;
|
|
goto __pyx_L3_bool_binop_done;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2211
|
|
* """
|
|
* return (not isinstance(instance, CLASS_TYPES) and
|
|
* getattr(instance, '__IS_DELEGATED__', False) is True) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_DELEGATED, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2211, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = (__pyx_t_2 == Py_True);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_3 = (__pyx_t_4 != 0);
|
|
__pyx_t_1 = __pyx_t_3;
|
|
__pyx_L3_bool_binop_done:;
|
|
__pyx_r = __pyx_t_1;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2202
|
|
*
|
|
*
|
|
* cpdef bint is_delegated(object instance): # <<<<<<<<<<<<<<
|
|
* """Check if instance is delegated provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_WriteUnraisable("dependency_injector.providers.is_delegated", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9is_delegated(PyObject *__pyx_self, PyObject *__pyx_v_instance); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_8is_delegated[] = "Check if instance is delegated provider.\n\n :param instance: Instance to be checked.\n :type instance: object\n\n :rtype: bool\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_9is_delegated(PyObject *__pyx_self, PyObject *__pyx_v_instance) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("is_delegated (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_8is_delegated(__pyx_self, ((PyObject *)__pyx_v_instance));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_8is_delegated(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("is_delegated", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2202, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.is_delegated", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2214
|
|
*
|
|
*
|
|
* cpdef str represent_provider(object provider, object provides): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_11represent_provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyObject *__pyx_v_provider, PyObject *__pyx_v_provides, CYTHON_UNUSED int __pyx_skip_dispatch) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("represent_provider", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2226
|
|
* :rtype: str
|
|
* """
|
|
* return '<{provider}({provides}) at {address}>'.format( # <<<<<<<<<<<<<<
|
|
* provider='.'.join((provider.__class__.__module__,
|
|
* provider.__class__.__name__)),
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_provider_provides_at_address, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2226, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
|
|
/* "dependency_injector/providers.pyx":2227
|
|
* """
|
|
* return '<{provider}({provides}) at {address}>'.format(
|
|
* provider='.'.join((provider.__class__.__module__, # <<<<<<<<<<<<<<
|
|
* provider.__class__.__name__)),
|
|
* provides=repr(provides) if provides is not None else '',
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2228
|
|
* return '<{provider}({provides}) at {address}>'.format(
|
|
* provider='.'.join((provider.__class__.__module__,
|
|
* provider.__class__.__name__)), # <<<<<<<<<<<<<<
|
|
* provides=repr(provides) if provides is not None else '',
|
|
* address=hex(id(provider)))
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2228, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2228, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2227
|
|
* """
|
|
* return '<{provider}({provides}) at {address}>'.format(
|
|
* provider='.'.join((provider.__class__.__module__, # <<<<<<<<<<<<<<
|
|
* provider.__class__.__name__)),
|
|
* provides=repr(provides) if provides is not None else '',
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provider, __pyx_t_5) < 0) __PYX_ERR(1, 2227, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2229
|
|
* provider='.'.join((provider.__class__.__module__,
|
|
* provider.__class__.__name__)),
|
|
* provides=repr(provides) if provides is not None else '', # <<<<<<<<<<<<<<
|
|
* address=hex(id(provider)))
|
|
*
|
|
*/
|
|
__pyx_t_6 = (__pyx_v_provides != Py_None);
|
|
if ((__pyx_t_6 != 0)) {
|
|
__pyx_t_3 = PyObject_Repr(__pyx_v_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2229, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
} else {
|
|
__Pyx_INCREF(__pyx_kp_s__6);
|
|
__pyx_t_5 = __pyx_kp_s__6;
|
|
}
|
|
if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provides, __pyx_t_5) < 0) __PYX_ERR(1, 2227, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2230
|
|
* provider.__class__.__name__)),
|
|
* provides=repr(provides) if provides is not None else '',
|
|
* address=hex(id(provider))) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_provider); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2230, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2230, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_address, __pyx_t_3) < 0) __PYX_ERR(1, 2227, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2226
|
|
* :rtype: str
|
|
* """
|
|
* return '<{provider}({provides}) at {address}>'.format( # <<<<<<<<<<<<<<
|
|
* provider='.'.join((provider.__class__.__module__,
|
|
* provider.__class__.__name__)),
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2226, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 2226, __pyx_L1_error)
|
|
__pyx_r = ((PyObject*)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2214
|
|
*
|
|
*
|
|
* cpdef str represent_provider(object provider, object provides): # <<<<<<<<<<<<<<
|
|
* """Return string representation of provider.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.represent_provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_11represent_provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_10represent_provider[] = "Return string representation of provider.\n\n :param provider: Provider object\n :type provider: :py:class:`dependency_injector.providers.Provider`\n\n :param provides: Object that provider provides\n :type provider: object\n\n :return: String representation of provider\n :rtype: str\n ";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_11represent_provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_provider = 0;
|
|
PyObject *__pyx_v_provides = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("represent_provider (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_provider,&__pyx_n_s_provides,0};
|
|
PyObject* values[2] = {0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, 1); __PYX_ERR(1, 2214, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "represent_provider") < 0)) __PYX_ERR(1, 2214, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
}
|
|
__pyx_v_provider = values[0];
|
|
__pyx_v_provides = values[1];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2214, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.represent_provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_10represent_provider(__pyx_self, __pyx_v_provider, __pyx_v_provides);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_10represent_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_provider, PyObject *__pyx_v_provides) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_RefNannySetupContext("represent_provider", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(__pyx_v_provider, __pyx_v_provides, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2214, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.represent_provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2233
|
|
*
|
|
*
|
|
* cpdef object deepcopy(object instance, dict memo=None): # <<<<<<<<<<<<<<
|
|
* """Return full copy of provider or container with providers."""
|
|
* if memo is None:
|
|
*/
|
|
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13deepcopy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__pyx_v_instance, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_19dependency_injector_9providers_deepcopy *__pyx_optional_args) {
|
|
PyObject *__pyx_v_memo = ((PyObject*)Py_None);
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
__Pyx_RefNannySetupContext("deepcopy", 0);
|
|
if (__pyx_optional_args) {
|
|
if (__pyx_optional_args->__pyx_n > 0) {
|
|
__pyx_v_memo = __pyx_optional_args->memo;
|
|
}
|
|
}
|
|
__Pyx_INCREF(__pyx_v_memo);
|
|
|
|
/* "dependency_injector/providers.pyx":2235
|
|
* cpdef object deepcopy(object instance, dict memo=None):
|
|
* """Return full copy of provider or container with providers."""
|
|
* if memo is None: # <<<<<<<<<<<<<<
|
|
* memo = dict()
|
|
*
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_memo == ((PyObject*)Py_None));
|
|
__pyx_t_2 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
/* "dependency_injector/providers.pyx":2236
|
|
* """Return full copy of provider or container with providers."""
|
|
* if memo is None:
|
|
* memo = dict() # <<<<<<<<<<<<<<
|
|
*
|
|
* __add_sys_streams(memo)
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2236, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF_SET(__pyx_v_memo, ((PyObject*)__pyx_t_3));
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2235
|
|
* cpdef object deepcopy(object instance, dict memo=None):
|
|
* """Return full copy of provider or container with providers."""
|
|
* if memo is None: # <<<<<<<<<<<<<<
|
|
* memo = dict()
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2238
|
|
* memo = dict()
|
|
*
|
|
* __add_sys_streams(memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* return copy.deepcopy(instance, memo)
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_add_sys_streams); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2238, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_4, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_memo) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_memo);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2238, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2240
|
|
* __add_sys_streams(memo)
|
|
*
|
|
* return copy.deepcopy(instance, memo) # <<<<<<<<<<<<<<
|
|
*
|
|
* def __add_sys_streams(memo):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2240, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2240, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_4 = NULL;
|
|
__pyx_t_6 = 0;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_5, function);
|
|
__pyx_t_6 = 1;
|
|
}
|
|
}
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(__pyx_t_5)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_instance, __pyx_v_memo};
|
|
__pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2240, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
} else
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
|
|
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_instance, __pyx_v_memo};
|
|
__pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2240, __pyx_L1_error)
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
} else
|
|
#endif
|
|
{
|
|
__pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2240, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
if (__pyx_t_4) {
|
|
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
|
|
}
|
|
__Pyx_INCREF(__pyx_v_instance);
|
|
__Pyx_GIVEREF(__pyx_v_instance);
|
|
PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_instance);
|
|
__Pyx_INCREF(__pyx_v_memo);
|
|
__Pyx_GIVEREF(__pyx_v_memo);
|
|
PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_memo);
|
|
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2240, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pyx":2233
|
|
*
|
|
*
|
|
* cpdef object deepcopy(object instance, dict memo=None): # <<<<<<<<<<<<<<
|
|
* """Return full copy of provider or container with providers."""
|
|
* if memo is None:
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_AddTraceback("dependency_injector.providers.deepcopy", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_memo);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13deepcopy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_12deepcopy[] = "Return full copy of provider or container with providers.";
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_13deepcopy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v_instance = 0;
|
|
PyObject *__pyx_v_memo = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("deepcopy (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_instance,&__pyx_n_s_memo,0};
|
|
PyObject* values[2] = {0,0};
|
|
values[1] = ((PyObject*)Py_None);
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo);
|
|
if (value) { values[1] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deepcopy") < 0)) __PYX_ERR(1, 2233, __pyx_L3_error)
|
|
}
|
|
} else {
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
__pyx_v_instance = values[0];
|
|
__pyx_v_memo = ((PyObject*)values[1]);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("deepcopy", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2233, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.deepcopy", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 2233, __pyx_L1_error)
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_12deepcopy(__pyx_self, __pyx_v_instance, __pyx_v_memo);
|
|
|
|
/* function exit code */
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_12deepcopy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_2;
|
|
__Pyx_RefNannySetupContext("deepcopy", 0);
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2.__pyx_n = 1;
|
|
__pyx_t_2.memo = __pyx_v_memo;
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_instance, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2233, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("dependency_injector.providers.deepcopy", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":2242
|
|
* return copy.deepcopy(instance, memo)
|
|
*
|
|
* def __add_sys_streams(memo): # <<<<<<<<<<<<<<
|
|
* """Add system streams to memo dictionary.
|
|
*
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15__add_sys_streams(PyObject *__pyx_self, PyObject *__pyx_v_memo); /*proto*/
|
|
static char __pyx_doc_19dependency_injector_9providers_14__add_sys_streams[] = "Add system streams to memo dictionary.\n\n This helps to avoid copying of system streams while making a deepcopy of\n objects graph.\n ";
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_15__add_sys_streams = {"__add_sys_streams", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15__add_sys_streams, METH_O, __pyx_doc_19dependency_injector_9providers_14__add_sys_streams};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_15__add_sys_streams(PyObject *__pyx_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__add_sys_streams (wrapper)", 0);
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_14__add_sys_streams(__pyx_self, ((PyObject *)__pyx_v_memo));
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_14__add_sys_streams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_memo) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
__Pyx_RefNannySetupContext("__add_sys_streams", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":2248
|
|
* objects graph.
|
|
* """
|
|
* memo[id(sys.stdin)] = sys.stdin # <<<<<<<<<<<<<<
|
|
* memo[id(sys.stdout)] = sys.stdout
|
|
* memo[id(sys.stderr)] = sys.stderr
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2248, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdin); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2248, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2248, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdin); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2248, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2248, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(1, 2248, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2249
|
|
* """
|
|
* memo[id(sys.stdin)] = sys.stdin
|
|
* memo[id(sys.stdout)] = sys.stdout # <<<<<<<<<<<<<<
|
|
* memo[id(sys.stderr)] = sys.stderr
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2249, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2249, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2249, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2249, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2249, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(1, 2249, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2250
|
|
* memo[id(sys.stdin)] = sys.stdin
|
|
* memo[id(sys.stdout)] = sys.stdout
|
|
* memo[id(sys.stderr)] = sys.stderr # <<<<<<<<<<<<<<
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2250, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(1, 2250, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":2242
|
|
* return copy.deepcopy(instance, memo)
|
|
*
|
|
* def __add_sys_streams(memo): # <<<<<<<<<<<<<<
|
|
* """Add system streams to memo dictionary.
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__add_sys_streams", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Provider(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18__pyx_unpickle_Provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_18__pyx_unpickle_Provider = {"__pyx_unpickle_Provider", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_18__pyx_unpickle_Provider, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_18__pyx_unpickle_Provider(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Provider (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Provider", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Provider", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Provider") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Provider", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_17__pyx_unpickle_Provider(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_17__pyx_unpickle_Provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Provider", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x0f5c5dd: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f5c5dd = (__last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0f5c5dd) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x0f5c5dd:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f5c5dd = (__last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Provider.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x0f5c5dd:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f5c5dd = (__last_overriding, __overridden))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = Provider.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x0f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x0f5c5dd: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f5c5dd = (__last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f5c5dd = (__last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Provider.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Provider__set_state(<Provider> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Provider), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f5c5dd = (__last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Provider.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Provider__set_state(<Provider> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = Provider.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Provider__set_state(<Provider> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Provider__set_state(Provider __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Provider__set_state(((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f5c5dd = (__last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Provider.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Provider__set_state(<Provider> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Provider__set_state(<Provider> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_Provider__set_state(Provider __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Provider(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Provider", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Provider__set_state(<Provider> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Provider__set_state(Provider __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Provider__set_state(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Provider__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Provider__set_state(Provider __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[2])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Provider__set_state(Provider __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[2])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 2) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Provider__set_state(Provider __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[2])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Provider__set_state(<Provider> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Provider__set_state(Provider __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Provider__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Object(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20__pyx_unpickle_Object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_20__pyx_unpickle_Object = {"__pyx_unpickle_Object", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_20__pyx_unpickle_Object, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_20__pyx_unpickle_Object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Object (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Object", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Object", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Object") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Object", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Object", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_19__pyx_unpickle_Object(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_19__pyx_unpickle_Object(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Object", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x3f4a3b6) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Object.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = Object.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x3f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Object.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Object__set_state(<Object> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Object), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Object.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Object__set_state(<Object> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = Object.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Object__set_state(<Object> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Object__set_state(Object __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Object__set_state(((struct __pyx_obj_19dependency_injector_9providers_Object *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Object.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Object__set_state(<Object> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Object__set_state(<Object> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_Object__set_state(Object __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Object(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Object", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Object__set_state(<Object> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Object__set_state(Object __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Object__set_state(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Object__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Object__set_state(Object __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Object__set_state(Object __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Object__set_state(Object __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Object__set_state(<Object> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Object__set_state(Object __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Object__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Delegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_22__pyx_unpickle_Delegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_22__pyx_unpickle_Delegate = {"__pyx_unpickle_Delegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_22__pyx_unpickle_Delegate, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_22__pyx_unpickle_Delegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Delegate (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Delegate", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Delegate", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Delegate") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Delegate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Delegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_21__pyx_unpickle_Delegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_21__pyx_unpickle_Delegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Delegate", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x3f4a3b6) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Delegate.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = Delegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x3f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Delegate.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Delegate__set_state(<Delegate> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Delegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Delegate__set_state(<Delegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = Delegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Delegate__set_state(<Delegate> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Delegate__set_state(Delegate __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegate__set_state(((struct __pyx_obj_19dependency_injector_9providers_Delegate *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Delegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Delegate__set_state(<Delegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Delegate__set_state(<Delegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_Delegate__set_state(Delegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Delegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Delegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Delegate__set_state(<Delegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Delegate__set_state(Delegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Delegate__set_state(struct __pyx_obj_19dependency_injector_9providers_Delegate *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Delegate__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Delegate__set_state(Delegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Delegate__set_state(Delegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Delegate__set_state(Delegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Delegate__set_state(<Delegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Delegate__set_state(Delegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Delegate__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Dependency(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_24__pyx_unpickle_Dependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_24__pyx_unpickle_Dependency = {"__pyx_unpickle_Dependency", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_24__pyx_unpickle_Dependency, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_24__pyx_unpickle_Dependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Dependency (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Dependency", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Dependency", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Dependency") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Dependency", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Dependency", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_23__pyx_unpickle_Dependency(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_23__pyx_unpickle_Dependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Dependency", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xf1f5217: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0xf1f5217) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xf1f5217:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Dependency.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0xf1f5217:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = Dependency.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xf1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xf1f5217: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Dependency.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Dependency__set_state(<Dependency> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Dependency), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Dependency.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Dependency__set_state(<Dependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = Dependency.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Dependency__set_state(<Dependency> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Dependency__set_state(Dependency __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Dependency__set_state(((struct __pyx_obj_19dependency_injector_9providers_Dependency *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Dependency.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Dependency__set_state(<Dependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Dependency__set_state(<Dependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_Dependency__set_state(Dependency __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Dependency(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Dependency", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Dependency__set_state(<Dependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Dependency__set_state(Dependency __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Dependency__set_state(struct __pyx_obj_19dependency_injector_9providers_Dependency *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Dependency__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Dependency__set_state(Dependency __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___instance_of);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx___instance_of));
|
|
__pyx_v___pyx_result->__pyx___instance_of = ((PyTypeObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Dependency__set_state(Dependency __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Dependency__set_state(Dependency __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Dependency__set_state(<Dependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Dependency__set_state(Dependency __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Dependency__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_ExternalDependency(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_26__pyx_unpickle_ExternalDependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_26__pyx_unpickle_ExternalDependency = {"__pyx_unpickle_ExternalDependency", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_26__pyx_unpickle_ExternalDependency, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_26__pyx_unpickle_ExternalDependency(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_ExternalDependency (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ExternalDependency", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ExternalDependency", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ExternalDependency") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ExternalDependency", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_ExternalDependency", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_25__pyx_unpickle_ExternalDependency(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_25__pyx_unpickle_ExternalDependency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_ExternalDependency", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xf1f5217: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0xf1f5217) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xf1f5217:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = ExternalDependency.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0xf1f5217:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = ExternalDependency.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xf1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xf1f5217: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = ExternalDependency.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_ExternalDependency__set_state(<ExternalDependency> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ExternalDependency), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = ExternalDependency.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ExternalDependency__set_state(<ExternalDependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = ExternalDependency.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_ExternalDependency__set_state(<ExternalDependency> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ExternalDependency__set_state(ExternalDependency __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_ExternalDependency__set_state(((struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xf1f5217 = (__instance_of, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = ExternalDependency.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ExternalDependency__set_state(<ExternalDependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_ExternalDependency__set_state(<ExternalDependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_ExternalDependency__set_state(ExternalDependency __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_ExternalDependency(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_ExternalDependency", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_ExternalDependency__set_state(<ExternalDependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ExternalDependency__set_state(ExternalDependency __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ExternalDependency__set_state(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_ExternalDependency__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ExternalDependency__set_state(ExternalDependency __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___instance_of);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___instance_of));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___instance_of = ((PyTypeObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_ExternalDependency__set_state(ExternalDependency __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_ExternalDependency__set_state(ExternalDependency __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_ExternalDependency__set_state(<ExternalDependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ExternalDependency__set_state(ExternalDependency __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_ExternalDependency__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DependenciesContainer(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_28__pyx_unpickle_DependenciesContainer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_28__pyx_unpickle_DependenciesContainer = {"__pyx_unpickle_DependenciesContainer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_28__pyx_unpickle_DependenciesContainer, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_28__pyx_unpickle_DependenciesContainer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DependenciesContainer (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DependenciesContainer", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DependenciesContainer", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DependenciesContainer") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DependenciesContainer", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DependenciesContainer", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_27__pyx_unpickle_DependenciesContainer(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_27__pyx_unpickle_DependenciesContainer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DependenciesContainer", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xd8553c7: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xd8553c7 = (__last_overriding, __overridden, __providers, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd8553c7) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xd8553c7:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xd8553c7 = (__last_overriding, __overridden, __providers, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DependenciesContainer.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0xd8553c7:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xd8553c7 = (__last_overriding, __overridden, __providers, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = DependenciesContainer.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd8, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xd8553c7: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xd8553c7 = (__last_overriding, __overridden, __providers, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xd8553c7 = (__last_overriding, __overridden, __providers, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DependenciesContainer.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DependenciesContainer__set_state(<DependenciesContainer> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DependenciesContainer), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xd8553c7 = (__last_overriding, __overridden, __providers, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DependenciesContainer.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DependenciesContainer__set_state(<DependenciesContainer> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = DependenciesContainer.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DependenciesContainer__set_state(<DependenciesContainer> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DependenciesContainer__set_state(DependenciesContainer __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DependenciesContainer__set_state(((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xd8553c7 = (__last_overriding, __overridden, __providers, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DependenciesContainer.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DependenciesContainer__set_state(<DependenciesContainer> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DependenciesContainer__set_state(<DependenciesContainer> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_DependenciesContainer__set_state(DependenciesContainer __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__providers = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DependenciesContainer(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DependenciesContainer", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DependenciesContainer__set_state(<DependenciesContainer> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DependenciesContainer__set_state(DependenciesContainer __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__providers = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DependenciesContainer__set_state(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DependenciesContainer__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DependenciesContainer__set_state(DependenciesContainer __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__providers = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___providers);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___providers);
|
|
__pyx_v___pyx_result->__pyx___providers = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DependenciesContainer__set_state(DependenciesContainer __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__providers = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 4) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__providers = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DependenciesContainer__set_state(DependenciesContainer __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__providers = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DependenciesContainer__set_state(<DependenciesContainer> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DependenciesContainer__set_state(DependenciesContainer __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__providers = __pyx_state[2]; __pyx_result.__provides = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DependenciesContainer__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_OverridingContext(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_30__pyx_unpickle_OverridingContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_30__pyx_unpickle_OverridingContext = {"__pyx_unpickle_OverridingContext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_30__pyx_unpickle_OverridingContext, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_30__pyx_unpickle_OverridingContext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_OverridingContext (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OverridingContext", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OverridingContext", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_OverridingContext") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_OverridingContext", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_OverridingContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_29__pyx_unpickle_OverridingContext(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_29__pyx_unpickle_OverridingContext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_OverridingContext", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x2071b6b: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2071b6b = (__overridden, __overriding))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x2071b6b) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x2071b6b:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2071b6b = (__overridden, __overriding))" % __pyx_checksum)
|
|
* __pyx_result = OverridingContext.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x2071b6b:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2071b6b = (__overridden, __overriding))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = OverridingContext.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x2071b6b: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2071b6b = (__overridden, __overriding))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2071b6b = (__overridden, __overriding))" % __pyx_checksum)
|
|
* __pyx_result = OverridingContext.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_OverridingContext__set_state(<OverridingContext> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_OverridingContext), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2071b6b = (__overridden, __overriding))" % __pyx_checksum)
|
|
* __pyx_result = OverridingContext.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_OverridingContext__set_state(<OverridingContext> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = OverridingContext.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_OverridingContext__set_state(<OverridingContext> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_OverridingContext__set_state(OverridingContext __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_OverridingContext__set_state(((struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2071b6b = (__overridden, __overriding))" % __pyx_checksum)
|
|
* __pyx_result = OverridingContext.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_OverridingContext__set_state(<OverridingContext> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_OverridingContext__set_state(<OverridingContext> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_OverridingContext__set_state(OverridingContext __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__overridden = __pyx_state[0]; __pyx_result.__overriding = __pyx_state[1]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_OverridingContext(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_OverridingContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_OverridingContext__set_state(<OverridingContext> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_OverridingContext__set_state(OverridingContext __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__overridden = __pyx_state[0]; __pyx_result.__overriding = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_OverridingContext__set_state(struct __pyx_obj_19dependency_injector_9providers_OverridingContext *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_OverridingContext__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_OverridingContext__set_state(OverridingContext __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__overridden = __pyx_state[0]; __pyx_result.__overriding = __pyx_state[1] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[2])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___overridden);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx___overridden));
|
|
__pyx_v___pyx_result->__pyx___overridden = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx___overriding));
|
|
__pyx_v___pyx_result->__pyx___overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_OverridingContext__set_state(OverridingContext __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__overridden = __pyx_state[0]; __pyx_result.__overriding = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[2])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 2) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__overridden = __pyx_state[0]; __pyx_result.__overriding = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_OverridingContext__set_state(OverridingContext __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__overridden = __pyx_state[0]; __pyx_result.__overriding = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[2])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_OverridingContext__set_state(<OverridingContext> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_OverridingContext__set_state(OverridingContext __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__overridden = __pyx_state[0]; __pyx_result.__overriding = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_OverridingContext__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Callable(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_32__pyx_unpickle_Callable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_32__pyx_unpickle_Callable = {"__pyx_unpickle_Callable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_32__pyx_unpickle_Callable, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_32__pyx_unpickle_Callable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Callable (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Callable", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Callable", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Callable") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Callable", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Callable", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_31__pyx_unpickle_Callable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_31__pyx_unpickle_Callable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Callable", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x03251dc) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Callable.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = Callable.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x03, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Callable.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Callable__set_state(<Callable> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Callable.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Callable__set_state(<Callable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = Callable.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Callable__set_state(<Callable> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Callable__set_state(Callable __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Callable__set_state(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Callable.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Callable__set_state(<Callable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Callable__set_state(<Callable> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_Callable__set_state(Callable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Callable(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Callable", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Callable__set_state(<Callable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Callable__set_state(Callable __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Callable__set_state(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Callable__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Callable__set_state(Callable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___args);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___args);
|
|
__pyx_v___pyx_result->__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx___args_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___kwargs);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___kwargs);
|
|
__pyx_v___pyx_result->__pyx___kwargs = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx___kwargs_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Callable__set_state(Callable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 7) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Callable__set_state(Callable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Callable__set_state(<Callable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Callable__set_state(Callable __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Callable__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedCallable(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_34__pyx_unpickle_DelegatedCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_34__pyx_unpickle_DelegatedCallable = {"__pyx_unpickle_DelegatedCallable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_34__pyx_unpickle_DelegatedCallable, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_34__pyx_unpickle_DelegatedCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedCallable (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedCallable", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedCallable", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DelegatedCallable") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedCallable", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedCallable", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_33__pyx_unpickle_DelegatedCallable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_33__pyx_unpickle_DelegatedCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedCallable", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x03251dc) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedCallable.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = DelegatedCallable.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x03, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedCallable.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedCallable__set_state(<DelegatedCallable> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedCallable), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedCallable.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedCallable__set_state(<DelegatedCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = DelegatedCallable.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedCallable__set_state(<DelegatedCallable> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedCallable__set_state(DelegatedCallable __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedCallable__set_state(((struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedCallable.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedCallable__set_state(<DelegatedCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedCallable__set_state(<DelegatedCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_DelegatedCallable__set_state(DelegatedCallable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedCallable(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedCallable", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedCallable__set_state(<DelegatedCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedCallable__set_state(DelegatedCallable __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedCallable__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedCallable__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedCallable__set_state(DelegatedCallable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___args);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___args);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___args_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___kwargs);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___kwargs);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___kwargs = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___kwargs_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedCallable__set_state(DelegatedCallable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 7) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedCallable__set_state(DelegatedCallable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedCallable__set_state(<DelegatedCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedCallable__set_state(DelegatedCallable __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedCallable__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_AbstractCallable(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_36__pyx_unpickle_AbstractCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_36__pyx_unpickle_AbstractCallable = {"__pyx_unpickle_AbstractCallable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_36__pyx_unpickle_AbstractCallable, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_36__pyx_unpickle_AbstractCallable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractCallable (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractCallable", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractCallable", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_AbstractCallable") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractCallable", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractCallable", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_35__pyx_unpickle_AbstractCallable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_35__pyx_unpickle_AbstractCallable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractCallable", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x03251dc) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = AbstractCallable.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = AbstractCallable.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x03, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = AbstractCallable.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractCallable__set_state(<AbstractCallable> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCallable), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = AbstractCallable.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractCallable__set_state(<AbstractCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = AbstractCallable.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractCallable__set_state(<AbstractCallable> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractCallable__set_state(AbstractCallable __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractCallable__set_state(((struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = AbstractCallable.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractCallable__set_state(<AbstractCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractCallable__set_state(<AbstractCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_AbstractCallable__set_state(AbstractCallable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_AbstractCallable(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractCallable", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_AbstractCallable__set_state(<AbstractCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractCallable__set_state(AbstractCallable __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractCallable__set_state(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractCallable__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractCallable__set_state(AbstractCallable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___args);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___args);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___args_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___kwargs);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___kwargs);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___kwargs = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___kwargs_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_AbstractCallable__set_state(AbstractCallable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 7) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_AbstractCallable__set_state(AbstractCallable __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_AbstractCallable__set_state(<AbstractCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractCallable__set_state(AbstractCallable __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractCallable__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_CallableDelegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_38__pyx_unpickle_CallableDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_38__pyx_unpickle_CallableDelegate = {"__pyx_unpickle_CallableDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_38__pyx_unpickle_CallableDelegate, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_38__pyx_unpickle_CallableDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_CallableDelegate (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CallableDelegate", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CallableDelegate", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CallableDelegate") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CallableDelegate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_CallableDelegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_37__pyx_unpickle_CallableDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_37__pyx_unpickle_CallableDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_CallableDelegate", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x3f4a3b6) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = CallableDelegate.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = CallableDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x3f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = CallableDelegate.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_CallableDelegate__set_state(<CallableDelegate> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_CallableDelegate), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = CallableDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_CallableDelegate__set_state(<CallableDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = CallableDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_CallableDelegate__set_state(<CallableDelegate> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_CallableDelegate__set_state(CallableDelegate __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_CallableDelegate__set_state(((struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = CallableDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_CallableDelegate__set_state(<CallableDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_CallableDelegate__set_state(<CallableDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_CallableDelegate__set_state(CallableDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_CallableDelegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_CallableDelegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_CallableDelegate__set_state(<CallableDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_CallableDelegate__set_state(CallableDelegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_CallableDelegate__set_state(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_CallableDelegate__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_CallableDelegate__set_state(CallableDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_CallableDelegate__set_state(CallableDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_CallableDelegate__set_state(CallableDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_CallableDelegate__set_state(<CallableDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_CallableDelegate__set_state(CallableDelegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_CallableDelegate__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Coroutine(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_40__pyx_unpickle_Coroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_40__pyx_unpickle_Coroutine = {"__pyx_unpickle_Coroutine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_40__pyx_unpickle_Coroutine, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_40__pyx_unpickle_Coroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Coroutine (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Coroutine", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Coroutine", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Coroutine") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Coroutine", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Coroutine", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_39__pyx_unpickle_Coroutine(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_39__pyx_unpickle_Coroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Coroutine", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x03251dc) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Coroutine.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = Coroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x03, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Coroutine.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Coroutine__set_state(<Coroutine> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Coroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Coroutine__set_state(<Coroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = Coroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Coroutine__set_state(<Coroutine> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Coroutine__set_state(Coroutine __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Coroutine__set_state(((struct __pyx_obj_19dependency_injector_9providers_Coroutine *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Coroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Coroutine__set_state(<Coroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Coroutine__set_state(<Coroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_Coroutine__set_state(Coroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Coroutine(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Coroutine", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Coroutine__set_state(<Coroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Coroutine__set_state(Coroutine __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Coroutine__set_state(struct __pyx_obj_19dependency_injector_9providers_Coroutine *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Coroutine__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Coroutine__set_state(Coroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___args);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___args);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___args_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___kwargs);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___kwargs);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___kwargs = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___kwargs_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Coroutine__set_state(Coroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 7) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Coroutine__set_state(Coroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Coroutine__set_state(<Coroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Coroutine__set_state(Coroutine __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Coroutine__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedCoroutine(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_42__pyx_unpickle_DelegatedCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_42__pyx_unpickle_DelegatedCoroutine = {"__pyx_unpickle_DelegatedCoroutine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_42__pyx_unpickle_DelegatedCoroutine, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_42__pyx_unpickle_DelegatedCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedCoroutine (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedCoroutine", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedCoroutine", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DelegatedCoroutine") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedCoroutine", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedCoroutine", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_41__pyx_unpickle_DelegatedCoroutine(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_41__pyx_unpickle_DelegatedCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedCoroutine", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x03251dc) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedCoroutine.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = DelegatedCoroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x03, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedCoroutine.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(<DelegatedCoroutine> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedCoroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(<DelegatedCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = DelegatedCoroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(<DelegatedCoroutine> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedCoroutine__set_state(DelegatedCoroutine __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedCoroutine__set_state(((struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedCoroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(<DelegatedCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(<DelegatedCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_DelegatedCoroutine__set_state(DelegatedCoroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedCoroutine(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedCoroutine", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(<DelegatedCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedCoroutine__set_state(DelegatedCoroutine __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedCoroutine__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedCoroutine__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedCoroutine__set_state(DelegatedCoroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___args);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___args);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___args_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___kwargs);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___kwargs);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___kwargs = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___kwargs_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedCoroutine__set_state(DelegatedCoroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 7) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedCoroutine__set_state(DelegatedCoroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(<DelegatedCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedCoroutine__set_state(DelegatedCoroutine __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedCoroutine__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_AbstractCoroutine(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_44__pyx_unpickle_AbstractCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_44__pyx_unpickle_AbstractCoroutine = {"__pyx_unpickle_AbstractCoroutine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_44__pyx_unpickle_AbstractCoroutine, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_44__pyx_unpickle_AbstractCoroutine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractCoroutine (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractCoroutine", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractCoroutine", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_AbstractCoroutine") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractCoroutine", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractCoroutine", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_43__pyx_unpickle_AbstractCoroutine(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_43__pyx_unpickle_AbstractCoroutine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractCoroutine", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x03251dc) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = AbstractCoroutine.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x03251dc:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = AbstractCoroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x03, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x03251dc: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = AbstractCoroutine.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(<AbstractCoroutine> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = AbstractCoroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(<AbstractCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = AbstractCoroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(<AbstractCoroutine> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractCoroutine__set_state(AbstractCoroutine __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractCoroutine__set_state(((struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x03251dc = (__args, __args_len, __kwargs, __kwargs_len, __last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = AbstractCoroutine.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(<AbstractCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(<AbstractCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_AbstractCoroutine__set_state(AbstractCoroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_AbstractCoroutine(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractCoroutine", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(<AbstractCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractCoroutine__set_state(AbstractCoroutine __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractCoroutine__set_state(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractCoroutine__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractCoroutine__set_state(AbstractCoroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___args);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___args);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___args_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___kwargs);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___kwargs);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___kwargs = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___kwargs_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_AbstractCoroutine__set_state(AbstractCoroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 7) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[7]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_AbstractCoroutine__set_state(AbstractCoroutine __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[7])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_AbstractCoroutine__set_state(<AbstractCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractCoroutine__set_state(AbstractCoroutine __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractCoroutine__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_CoroutineDelegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_46__pyx_unpickle_CoroutineDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_46__pyx_unpickle_CoroutineDelegate = {"__pyx_unpickle_CoroutineDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_46__pyx_unpickle_CoroutineDelegate, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_46__pyx_unpickle_CoroutineDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_CoroutineDelegate (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CoroutineDelegate", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CoroutineDelegate", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CoroutineDelegate") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CoroutineDelegate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_CoroutineDelegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_45__pyx_unpickle_CoroutineDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_45__pyx_unpickle_CoroutineDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_CoroutineDelegate", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x3f4a3b6) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = CoroutineDelegate.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = CoroutineDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x3f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = CoroutineDelegate.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(<CoroutineDelegate> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = CoroutineDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(<CoroutineDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = CoroutineDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(<CoroutineDelegate> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_CoroutineDelegate__set_state(CoroutineDelegate __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_CoroutineDelegate__set_state(((struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = CoroutineDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(<CoroutineDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(<CoroutineDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_CoroutineDelegate__set_state(CoroutineDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_CoroutineDelegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_CoroutineDelegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(<CoroutineDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_CoroutineDelegate__set_state(CoroutineDelegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_CoroutineDelegate__set_state(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_CoroutineDelegate__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_CoroutineDelegate__set_state(CoroutineDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_CoroutineDelegate__set_state(CoroutineDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_CoroutineDelegate__set_state(CoroutineDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(<CoroutineDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_CoroutineDelegate__set_state(CoroutineDelegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_CoroutineDelegate__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Configuration(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_48__pyx_unpickle_Configuration(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_48__pyx_unpickle_Configuration = {"__pyx_unpickle_Configuration", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_48__pyx_unpickle_Configuration, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_48__pyx_unpickle_Configuration(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Configuration (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Configuration", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Configuration", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Configuration") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Configuration", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Configuration", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_47__pyx_unpickle_Configuration(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_47__pyx_unpickle_Configuration(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Configuration", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa7663cf: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa7663cf = (__children, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa7663cf) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa7663cf:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa7663cf = (__children, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Configuration.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0xa7663cf:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa7663cf = (__children, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = Configuration.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa7, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa7663cf: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa7663cf = (__children, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa7663cf = (__children, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Configuration.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Configuration__set_state(<Configuration> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa7663cf = (__children, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Configuration.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Configuration__set_state(<Configuration> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = Configuration.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Configuration__set_state(<Configuration> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Configuration__set_state(Configuration __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Configuration__set_state(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa7663cf = (__children, __last_overriding, __name, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = Configuration.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Configuration__set_state(<Configuration> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Configuration__set_state(<Configuration> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_Configuration__set_state(Configuration __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__children = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Configuration(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Configuration", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Configuration__set_state(<Configuration> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Configuration__set_state(Configuration __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__children = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Configuration__set_state(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Configuration__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Configuration__set_state(Configuration __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__children = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___children);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___children);
|
|
__pyx_v___pyx_result->__pyx___children = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___name);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___name);
|
|
__pyx_v___pyx_result->__pyx___name = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Configuration__set_state(Configuration __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__children = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 5) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__children = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Configuration__set_state(Configuration __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__children = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Configuration__set_state(<Configuration> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Configuration__set_state(Configuration __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__children = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__name = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]; __pyx_result.__provides = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Configuration__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Factory(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_50__pyx_unpickle_Factory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_50__pyx_unpickle_Factory = {"__pyx_unpickle_Factory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_50__pyx_unpickle_Factory, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_50__pyx_unpickle_Factory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Factory (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Factory", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Factory", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Factory") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Factory", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Factory", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_49__pyx_unpickle_Factory(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_49__pyx_unpickle_Factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Factory", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa73b866: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa73b866) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa73b866:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Factory.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0xa73b866:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = Factory.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa7_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa73b866: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Factory.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Factory__set_state(<Factory> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Factory.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Factory__set_state(<Factory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = Factory.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Factory__set_state(<Factory> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Factory__set_state(Factory __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Factory__set_state(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = Factory.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Factory__set_state(<Factory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Factory__set_state(<Factory> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_Factory__set_state(Factory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Factory(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Factory", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Factory__set_state(<Factory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Factory__set_state(Factory __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Factory__set_state(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Factory__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Factory__set_state(Factory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___attributes);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___attributes);
|
|
__pyx_v___pyx_result->__pyx___attributes = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx___attributes_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Callable))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Factory__set_state(Factory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 5) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Factory__set_state(Factory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Factory__set_state(<Factory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Factory__set_state(Factory __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Factory__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedFactory(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_52__pyx_unpickle_DelegatedFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_52__pyx_unpickle_DelegatedFactory = {"__pyx_unpickle_DelegatedFactory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_52__pyx_unpickle_DelegatedFactory, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_52__pyx_unpickle_DelegatedFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedFactory (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedFactory", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedFactory", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DelegatedFactory") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedFactory", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedFactory", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_51__pyx_unpickle_DelegatedFactory(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_51__pyx_unpickle_DelegatedFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedFactory", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa73b866: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa73b866) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa73b866:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedFactory.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0xa73b866:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = DelegatedFactory.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa7_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa73b866: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedFactory.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedFactory__set_state(<DelegatedFactory> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedFactory), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedFactory.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedFactory__set_state(<DelegatedFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = DelegatedFactory.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedFactory__set_state(<DelegatedFactory> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedFactory__set_state(DelegatedFactory __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedFactory__set_state(((struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedFactory.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedFactory__set_state(<DelegatedFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedFactory__set_state(<DelegatedFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_DelegatedFactory__set_state(DelegatedFactory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedFactory(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedFactory", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedFactory__set_state(<DelegatedFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedFactory__set_state(DelegatedFactory __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedFactory__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedFactory__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedFactory__set_state(DelegatedFactory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___attributes);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___attributes);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___attributes = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___attributes_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Callable))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedFactory__set_state(DelegatedFactory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 5) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedFactory__set_state(DelegatedFactory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedFactory__set_state(<DelegatedFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedFactory__set_state(DelegatedFactory __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedFactory__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_AbstractFactory(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_54__pyx_unpickle_AbstractFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_54__pyx_unpickle_AbstractFactory = {"__pyx_unpickle_AbstractFactory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_54__pyx_unpickle_AbstractFactory, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_54__pyx_unpickle_AbstractFactory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractFactory (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractFactory", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractFactory", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_AbstractFactory") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractFactory", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractFactory", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_53__pyx_unpickle_AbstractFactory(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_53__pyx_unpickle_AbstractFactory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractFactory", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa73b866: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa73b866) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa73b866:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = AbstractFactory.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0xa73b866:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = AbstractFactory.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa7_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa73b866: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = AbstractFactory.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractFactory__set_state(<AbstractFactory> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractFactory), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = AbstractFactory.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractFactory__set_state(<AbstractFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = AbstractFactory.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractFactory__set_state(<AbstractFactory> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractFactory__set_state(AbstractFactory __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractFactory__set_state(((struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa73b866 = (__attributes, __attributes_len, __instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = AbstractFactory.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractFactory__set_state(<AbstractFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractFactory__set_state(<AbstractFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_AbstractFactory__set_state(AbstractFactory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_AbstractFactory(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractFactory", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_AbstractFactory__set_state(<AbstractFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractFactory__set_state(AbstractFactory __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractFactory__set_state(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractFactory__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractFactory__set_state(AbstractFactory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___attributes);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___attributes);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___attributes = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___attributes_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Callable))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_AbstractFactory__set_state(AbstractFactory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 5) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_AbstractFactory__set_state(AbstractFactory __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_AbstractFactory__set_state(<AbstractFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractFactory__set_state(AbstractFactory __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractFactory__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_FactoryDelegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_56__pyx_unpickle_FactoryDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_56__pyx_unpickle_FactoryDelegate = {"__pyx_unpickle_FactoryDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_56__pyx_unpickle_FactoryDelegate, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_56__pyx_unpickle_FactoryDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_FactoryDelegate (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FactoryDelegate", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FactoryDelegate", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_FactoryDelegate") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FactoryDelegate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_FactoryDelegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_55__pyx_unpickle_FactoryDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_55__pyx_unpickle_FactoryDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_FactoryDelegate", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x3f4a3b6) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = FactoryDelegate.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = FactoryDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x3f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = FactoryDelegate.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_FactoryDelegate__set_state(<FactoryDelegate> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryDelegate), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = FactoryDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_FactoryDelegate__set_state(<FactoryDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = FactoryDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_FactoryDelegate__set_state(<FactoryDelegate> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_FactoryDelegate__set_state(FactoryDelegate __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_FactoryDelegate__set_state(((struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = FactoryDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_FactoryDelegate__set_state(<FactoryDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_FactoryDelegate__set_state(<FactoryDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_FactoryDelegate__set_state(FactoryDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_FactoryDelegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_FactoryDelegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_FactoryDelegate__set_state(<FactoryDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_FactoryDelegate__set_state(FactoryDelegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_FactoryDelegate__set_state(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_FactoryDelegate__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_FactoryDelegate__set_state(FactoryDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_FactoryDelegate__set_state(FactoryDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_FactoryDelegate__set_state(FactoryDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_FactoryDelegate__set_state(<FactoryDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_FactoryDelegate__set_state(FactoryDelegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_FactoryDelegate__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_FactoryAggregate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_58__pyx_unpickle_FactoryAggregate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_58__pyx_unpickle_FactoryAggregate = {"__pyx_unpickle_FactoryAggregate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_58__pyx_unpickle_FactoryAggregate, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_58__pyx_unpickle_FactoryAggregate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_FactoryAggregate (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FactoryAggregate", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FactoryAggregate", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_FactoryAggregate") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FactoryAggregate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_FactoryAggregate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_57__pyx_unpickle_FactoryAggregate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_57__pyx_unpickle_FactoryAggregate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_FactoryAggregate", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa6696fd: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa6696fd = (__factories, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa6696fd) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa6696fd:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa6696fd = (__factories, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = FactoryAggregate.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0xa6696fd:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa6696fd = (__factories, __last_overriding, __overridden))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = FactoryAggregate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa6696fd: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa6696fd = (__factories, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa6696fd = (__factories, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = FactoryAggregate.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_FactoryAggregate__set_state(<FactoryAggregate> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa6696fd = (__factories, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = FactoryAggregate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_FactoryAggregate__set_state(<FactoryAggregate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = FactoryAggregate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_FactoryAggregate__set_state(<FactoryAggregate> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_FactoryAggregate__set_state(FactoryAggregate __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_FactoryAggregate__set_state(((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa6696fd = (__factories, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = FactoryAggregate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_FactoryAggregate__set_state(<FactoryAggregate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_FactoryAggregate__set_state(<FactoryAggregate> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_FactoryAggregate__set_state(FactoryAggregate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__factories = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_FactoryAggregate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_FactoryAggregate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_FactoryAggregate__set_state(<FactoryAggregate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_FactoryAggregate__set_state(FactoryAggregate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__factories = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_FactoryAggregate__set_state(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_FactoryAggregate__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_FactoryAggregate__set_state(FactoryAggregate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__factories = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___factories);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___factories);
|
|
__pyx_v___pyx_result->__pyx___factories = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_FactoryAggregate__set_state(FactoryAggregate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__factories = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__factories = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_FactoryAggregate__set_state(FactoryAggregate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__factories = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_FactoryAggregate__set_state(<FactoryAggregate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_FactoryAggregate__set_state(FactoryAggregate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__factories = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_FactoryAggregate__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_BaseSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_60__pyx_unpickle_BaseSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_60__pyx_unpickle_BaseSingleton = {"__pyx_unpickle_BaseSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_60__pyx_unpickle_BaseSingleton, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_60__pyx_unpickle_BaseSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_BaseSingleton (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseSingleton", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseSingleton", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BaseSingleton") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseSingleton", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_BaseSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_59__pyx_unpickle_BaseSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_59__pyx_unpickle_BaseSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_BaseSingleton", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x0c49df0: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0c49df0) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x0c49df0:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = BaseSingleton.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x0c49df0:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = BaseSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x0c, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x0c49df0: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = BaseSingleton.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_BaseSingleton__set_state(<BaseSingleton> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = BaseSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_BaseSingleton__set_state(<BaseSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = BaseSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_BaseSingleton__set_state(<BaseSingleton> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_BaseSingleton__set_state(BaseSingleton __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_BaseSingleton__set_state(((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = BaseSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_BaseSingleton__set_state(<BaseSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_BaseSingleton__set_state(<BaseSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_BaseSingleton__set_state(BaseSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_BaseSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_BaseSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_BaseSingleton__set_state(<BaseSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_BaseSingleton__set_state(BaseSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_BaseSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_BaseSingleton__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_BaseSingleton__set_state(BaseSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Factory))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_BaseSingleton__set_state(BaseSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_BaseSingleton__set_state(BaseSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_BaseSingleton__set_state(<BaseSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_BaseSingleton__set_state(BaseSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_BaseSingleton__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Singleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_62__pyx_unpickle_Singleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_62__pyx_unpickle_Singleton = {"__pyx_unpickle_Singleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_62__pyx_unpickle_Singleton, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_62__pyx_unpickle_Singleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Singleton (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Singleton", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Singleton", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Singleton") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Singleton", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Singleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_61__pyx_unpickle_Singleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_61__pyx_unpickle_Singleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Singleton", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x76eb8a2) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = Singleton.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x76eb8a2:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = Singleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x76, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = Singleton.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Singleton__set_state(<Singleton> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Singleton), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = Singleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Singleton__set_state(<Singleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = Singleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Singleton__set_state(<Singleton> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Singleton__set_state(Singleton __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Singleton__set_state(((struct __pyx_obj_19dependency_injector_9providers_Singleton *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = Singleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Singleton__set_state(<Singleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Singleton__set_state(<Singleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_Singleton__set_state(Singleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Singleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Singleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Singleton__set_state(<Singleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Singleton__set_state(Singleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Singleton__set_state(struct __pyx_obj_19dependency_injector_9providers_Singleton *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Singleton__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Singleton__set_state(Singleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Factory))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___storage);
|
|
__pyx_v___pyx_result->__pyx___storage = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Singleton__set_state(Singleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 4) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Singleton__set_state(Singleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Singleton__set_state(<Singleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Singleton__set_state(Singleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Singleton__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_64__pyx_unpickle_DelegatedSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_64__pyx_unpickle_DelegatedSingleton = {"__pyx_unpickle_DelegatedSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_64__pyx_unpickle_DelegatedSingleton, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_64__pyx_unpickle_DelegatedSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedSingleton (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedSingleton", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedSingleton", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DelegatedSingleton") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedSingleton", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_63__pyx_unpickle_DelegatedSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_63__pyx_unpickle_DelegatedSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedSingleton", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x76eb8a2) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedSingleton.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x76eb8a2:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = DelegatedSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x76, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedSingleton.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(<DelegatedSingleton> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(<DelegatedSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = DelegatedSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(<DelegatedSingleton> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedSingleton__set_state(DelegatedSingleton __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedSingleton__set_state(((struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(<DelegatedSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(<DelegatedSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_DelegatedSingleton__set_state(DelegatedSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(<DelegatedSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedSingleton__set_state(DelegatedSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedSingleton__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedSingleton__set_state(DelegatedSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Factory))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___storage);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___storage = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedSingleton__set_state(DelegatedSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 4) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedSingleton__set_state(DelegatedSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedSingleton__set_state(<DelegatedSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedSingleton__set_state(DelegatedSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedSingleton__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_ThreadSafeSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_66__pyx_unpickle_ThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_66__pyx_unpickle_ThreadSafeSingleton = {"__pyx_unpickle_ThreadSafeSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_66__pyx_unpickle_ThreadSafeSingleton, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_66__pyx_unpickle_ThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_ThreadSafeSingleton (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadSafeSingleton", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadSafeSingleton", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ThreadSafeSingleton") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadSafeSingleton", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_ThreadSafeSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_65__pyx_unpickle_ThreadSafeSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_65__pyx_unpickle_ThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_ThreadSafeSingleton", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa5833ef: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa5833ef) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa5833ef:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
* __pyx_result = ThreadSafeSingleton.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0xa5833ef:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = ThreadSafeSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa5833ef: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
* __pyx_result = ThreadSafeSingleton.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(<ThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
* __pyx_result = ThreadSafeSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(<ThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = ThreadSafeSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(<ThreadSafeSingleton> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ThreadSafeSingleton__set_state(ThreadSafeSingleton __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_ThreadSafeSingleton__set_state(((struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
* __pyx_result = ThreadSafeSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(<ThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(<ThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_ThreadSafeSingleton__set_state(ThreadSafeSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_ThreadSafeSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_ThreadSafeSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(<ThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ThreadSafeSingleton__set_state(ThreadSafeSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ThreadSafeSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_ThreadSafeSingleton__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ThreadSafeSingleton__set_state(ThreadSafeSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Factory))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___storage);
|
|
__pyx_v___pyx_result->__pyx___storage = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___storage_lock);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___storage_lock);
|
|
__pyx_v___pyx_result->__pyx___storage_lock = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_ThreadSafeSingleton__set_state(ThreadSafeSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 5) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_ThreadSafeSingleton__set_state(ThreadSafeSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(<ThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ThreadSafeSingleton__set_state(ThreadSafeSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_ThreadSafeSingleton__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedThreadSafeSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_68__pyx_unpickle_DelegatedThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_68__pyx_unpickle_DelegatedThreadSafeSingleton = {"__pyx_unpickle_DelegatedThreadSafeSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_68__pyx_unpickle_DelegatedThreadSafeSingleton, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_68__pyx_unpickle_DelegatedThreadSafeSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedThreadSafeSingleton (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedThreadSafeSingleton", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedThreadSafeSingleton", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DelegatedThreadSafeSingleton") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedThreadSafeSingleton", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedThreadSafeSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_67__pyx_unpickle_DelegatedThreadSafeSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_67__pyx_unpickle_DelegatedThreadSafeSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedThreadSafeSingleton", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa5833ef: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0xa5833ef) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa5833ef:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedThreadSafeSingleton.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0xa5833ef:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = DelegatedThreadSafeSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xa5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0xa5833ef: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedThreadSafeSingleton.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(<DelegatedThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedThreadSafeSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(<DelegatedThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = DelegatedThreadSafeSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(<DelegatedThreadSafeSingleton> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(DelegatedThreadSafeSingleton __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedThreadSafeSingleton__set_state(((struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0xa5833ef = (__instantiator, __last_overriding, __overridden, __storage, __storage_lock))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedThreadSafeSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(<DelegatedThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(<DelegatedThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(DelegatedThreadSafeSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedThreadSafeSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedThreadSafeSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(<DelegatedThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(DelegatedThreadSafeSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedThreadSafeSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedThreadSafeSingleton__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(DelegatedThreadSafeSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Factory))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___storage);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___storage = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___storage_lock);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___storage_lock);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___storage_lock = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(DelegatedThreadSafeSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 5) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(DelegatedThreadSafeSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(<DelegatedThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedThreadSafeSingleton__set_state(DelegatedThreadSafeSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedThreadSafeSingleton__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_ThreadLocalSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_70__pyx_unpickle_ThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_70__pyx_unpickle_ThreadLocalSingleton = {"__pyx_unpickle_ThreadLocalSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_70__pyx_unpickle_ThreadLocalSingleton, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_70__pyx_unpickle_ThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_ThreadLocalSingleton (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadLocalSingleton", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadLocalSingleton", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ThreadLocalSingleton") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ThreadLocalSingleton", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_ThreadLocalSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_69__pyx_unpickle_ThreadLocalSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_69__pyx_unpickle_ThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_ThreadLocalSingleton", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x76eb8a2) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = ThreadLocalSingleton.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x76eb8a2:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = ThreadLocalSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x76, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = ThreadLocalSingleton.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(<ThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = ThreadLocalSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(<ThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = ThreadLocalSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(<ThreadLocalSingleton> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ThreadLocalSingleton__set_state(ThreadLocalSingleton __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_ThreadLocalSingleton__set_state(((struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = ThreadLocalSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(<ThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(<ThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_ThreadLocalSingleton__set_state(ThreadLocalSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_ThreadLocalSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_ThreadLocalSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(<ThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ThreadLocalSingleton__set_state(ThreadLocalSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_ThreadLocalSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_ThreadLocalSingleton__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ThreadLocalSingleton__set_state(ThreadLocalSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Factory))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___storage);
|
|
__pyx_v___pyx_result->__pyx___storage = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_ThreadLocalSingleton__set_state(ThreadLocalSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 4) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_ThreadLocalSingleton__set_state(ThreadLocalSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(<ThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ThreadLocalSingleton__set_state(ThreadLocalSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_ThreadLocalSingleton__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedThreadLocalSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_72__pyx_unpickle_DelegatedThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_72__pyx_unpickle_DelegatedThreadLocalSingleton = {"__pyx_unpickle_DelegatedThreadLocalSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_72__pyx_unpickle_DelegatedThreadLocalSingleton, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_72__pyx_unpickle_DelegatedThreadLocalSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedThreadLocalSingleton (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedThreadLocalSingleton", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedThreadLocalSingleton", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DelegatedThreadLocalSingleton") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DelegatedThreadLocalSingleton", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedThreadLocalSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_71__pyx_unpickle_DelegatedThreadLocalSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_71__pyx_unpickle_DelegatedThreadLocalSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedThreadLocalSingleton", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x76eb8a2) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedThreadLocalSingleton.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x76eb8a2:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = DelegatedThreadLocalSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x76, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x76eb8a2: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedThreadLocalSingleton.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(<DelegatedThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedThreadLocalSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(<DelegatedThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = DelegatedThreadLocalSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(<DelegatedThreadLocalSingleton> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(DelegatedThreadLocalSingleton __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedThreadLocalSingleton__set_state(((struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x76eb8a2 = (__instantiator, __last_overriding, __overridden, __storage))" % __pyx_checksum)
|
|
* __pyx_result = DelegatedThreadLocalSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(<DelegatedThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(<DelegatedThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(DelegatedThreadLocalSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedThreadLocalSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedThreadLocalSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(<DelegatedThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(DelegatedThreadLocalSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_DelegatedThreadLocalSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_DelegatedThreadLocalSingleton__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(DelegatedThreadLocalSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Factory))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___storage);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___storage);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___storage = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(DelegatedThreadLocalSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 4) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(DelegatedThreadLocalSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(<DelegatedThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedThreadLocalSingleton__set_state(DelegatedThreadLocalSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_DelegatedThreadLocalSingleton__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_AbstractSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_74__pyx_unpickle_AbstractSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_74__pyx_unpickle_AbstractSingleton = {"__pyx_unpickle_AbstractSingleton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_74__pyx_unpickle_AbstractSingleton, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_74__pyx_unpickle_AbstractSingleton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractSingleton (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractSingleton", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractSingleton", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_AbstractSingleton") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractSingleton", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_73__pyx_unpickle_AbstractSingleton(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_73__pyx_unpickle_AbstractSingleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractSingleton", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x0c49df0: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0c49df0) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x0c49df0:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = AbstractSingleton.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x0c49df0:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = AbstractSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x0c, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x0c49df0: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = AbstractSingleton.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractSingleton__set_state(<AbstractSingleton> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = AbstractSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractSingleton__set_state(<AbstractSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = AbstractSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractSingleton__set_state(<AbstractSingleton> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractSingleton__set_state(AbstractSingleton __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractSingleton__set_state(((struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x0c49df0 = (__instantiator, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = AbstractSingleton.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_AbstractSingleton__set_state(<AbstractSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_AbstractSingleton__set_state(<AbstractSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_AbstractSingleton__set_state(AbstractSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_AbstractSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractSingleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_AbstractSingleton__set_state(<AbstractSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractSingleton__set_state(AbstractSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_AbstractSingleton__set_state(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_AbstractSingleton__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractSingleton__set_state(AbstractSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Factory))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___instantiator);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___instantiator));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_AbstractSingleton__set_state(AbstractSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_AbstractSingleton__set_state(AbstractSingleton __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_AbstractSingleton__set_state(<AbstractSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractSingleton__set_state(AbstractSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_AbstractSingleton__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_SingletonDelegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_76__pyx_unpickle_SingletonDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_76__pyx_unpickle_SingletonDelegate = {"__pyx_unpickle_SingletonDelegate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_76__pyx_unpickle_SingletonDelegate, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_76__pyx_unpickle_SingletonDelegate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_SingletonDelegate (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SingletonDelegate", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SingletonDelegate", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SingletonDelegate") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SingletonDelegate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_SingletonDelegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_75__pyx_unpickle_SingletonDelegate(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_75__pyx_unpickle_SingletonDelegate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_SingletonDelegate", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x3f4a3b6) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = SingletonDelegate.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x3f4a3b6:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = SingletonDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x3f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x3f4a3b6: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = SingletonDelegate.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_SingletonDelegate__set_state(<SingletonDelegate> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_SingletonDelegate), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = SingletonDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_SingletonDelegate__set_state(<SingletonDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = SingletonDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_SingletonDelegate__set_state(<SingletonDelegate> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_SingletonDelegate__set_state(SingletonDelegate __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_SingletonDelegate__set_state(((struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x3f4a3b6 = (__last_overriding, __overridden, __provides))" % __pyx_checksum)
|
|
* __pyx_result = SingletonDelegate.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_SingletonDelegate__set_state(<SingletonDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_SingletonDelegate__set_state(<SingletonDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_SingletonDelegate__set_state(SingletonDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_SingletonDelegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_SingletonDelegate", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_SingletonDelegate__set_state(<SingletonDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_SingletonDelegate__set_state(SingletonDelegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_SingletonDelegate__set_state(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
Py_ssize_t __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_SingletonDelegate__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_SingletonDelegate__set_state(SingletonDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___provides);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___provides = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_SingletonDelegate__set_state(SingletonDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_4 = ((__pyx_t_3 > 3) != 0);
|
|
if (__pyx_t_4) {
|
|
} else {
|
|
__pyx_t_2 = __pyx_t_4;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = (__pyx_t_4 != 0);
|
|
__pyx_t_2 = __pyx_t_5;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_2) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
|
|
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
|
|
if (likely(__pyx_t_8)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
|
|
__Pyx_INCREF(__pyx_t_8);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_7, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_SingletonDelegate__set_state(SingletonDelegate __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[3])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_SingletonDelegate__set_state(<SingletonDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_SingletonDelegate__set_state(SingletonDelegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_SingletonDelegate__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_List(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_78__pyx_unpickle_List(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_78__pyx_unpickle_List = {"__pyx_unpickle_List", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_78__pyx_unpickle_List, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_78__pyx_unpickle_List(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_List (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_List", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_List", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_List") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_List", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_List", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_77__pyx_unpickle_List(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_77__pyx_unpickle_List(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_List", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x631cff7: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x631cff7 = (__args, __args_len, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x631cff7) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x631cff7:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x631cff7 = (__args, __args_len, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = List.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x631cff7:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x631cff7 = (__args, __args_len, __last_overriding, __overridden))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = List.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x63, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x631cff7: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x631cff7 = (__args, __args_len, __last_overriding, __overridden))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x631cff7 = (__args, __args_len, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = List.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_List__set_state(<List> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_List), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x631cff7 = (__args, __args_len, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = List.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_List__set_state(<List> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = List.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_List__set_state(<List> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_List__set_state(List __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_List__set_state(((struct __pyx_obj_19dependency_injector_9providers_List *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x631cff7 = (__args, __args_len, __last_overriding, __overridden))" % __pyx_checksum)
|
|
* __pyx_result = List.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_List__set_state(<List> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_List__set_state(<List> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_List__set_state(List __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_List(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_List", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_List__set_state(<List> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_List__set_state(List __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_List__set_state(struct __pyx_obj_19dependency_injector_9providers_List *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_List__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_List__set_state(List __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___args);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___args);
|
|
__pyx_v___pyx_result->__pyx___args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx___args_len = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding));
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___overridden);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___overridden = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_List__set_state(List __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 4) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_List__set_state(List __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_List__set_state(<List> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_List__set_state(List __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_List__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Injection(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_80__pyx_unpickle_Injection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_80__pyx_unpickle_Injection = {"__pyx_unpickle_Injection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_80__pyx_unpickle_Injection, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_80__pyx_unpickle_Injection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Injection (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Injection", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Injection", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Injection") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Injection", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Injection", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_79__pyx_unpickle_Injection(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_79__pyx_unpickle_Injection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Injection", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x2e1d18f: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x2e1d18f) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x2e1d18f:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
* __pyx_result = Injection.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x2e1d18f:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = Injection.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x2e, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x2e1d18f: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
* __pyx_result = Injection.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Injection__set_state(<Injection> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Injection), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
* __pyx_result = Injection.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Injection__set_state(<Injection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = Injection.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Injection__set_state(<Injection> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Injection__set_state(Injection __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_Injection__set_state(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
* __pyx_result = Injection.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_Injection__set_state(<Injection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_Injection__set_state(<Injection> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_Injection__set_state(Injection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Injection(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Injection", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Injection__set_state(<Injection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Injection__set_state(Injection __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Injection__set_state(struct __pyx_obj_19dependency_injector_9providers_Injection *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_Injection__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Injection__set_state(Injection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx___call = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx___is_delegated = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx___is_provider = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___value);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___value);
|
|
__pyx_v___pyx_result->__pyx___value = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Injection__set_state(Injection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 4) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_Injection__set_state(Injection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Injection__set_state(<Injection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Injection__set_state(Injection __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_Injection__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_PositionalInjection(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_82__pyx_unpickle_PositionalInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_82__pyx_unpickle_PositionalInjection = {"__pyx_unpickle_PositionalInjection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_82__pyx_unpickle_PositionalInjection, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_82__pyx_unpickle_PositionalInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_PositionalInjection (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PositionalInjection", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PositionalInjection", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PositionalInjection") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PositionalInjection", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_PositionalInjection", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_81__pyx_unpickle_PositionalInjection(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_81__pyx_unpickle_PositionalInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_PositionalInjection", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x2e1d18f: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x2e1d18f) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x2e1d18f:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
* __pyx_result = PositionalInjection.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x2e1d18f:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = PositionalInjection.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x2e, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x2e1d18f: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
* __pyx_result = PositionalInjection.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_PositionalInjection__set_state(<PositionalInjection> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
* __pyx_result = PositionalInjection.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_PositionalInjection__set_state(<PositionalInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = PositionalInjection.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_PositionalInjection__set_state(<PositionalInjection> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_PositionalInjection__set_state(PositionalInjection __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_PositionalInjection__set_state(((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x2e1d18f = (__call, __is_delegated, __is_provider, __value))" % __pyx_checksum)
|
|
* __pyx_result = PositionalInjection.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_PositionalInjection__set_state(<PositionalInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_PositionalInjection__set_state(<PositionalInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_PositionalInjection__set_state(PositionalInjection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_PositionalInjection(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_PositionalInjection", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_PositionalInjection__set_state(<PositionalInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_PositionalInjection__set_state(PositionalInjection __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_PositionalInjection__set_state(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_PositionalInjection__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_PositionalInjection__set_state(PositionalInjection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___call = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___is_delegated = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___is_provider = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___value);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___value);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___value = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_PositionalInjection__set_state(PositionalInjection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 4) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_PositionalInjection__set_state(PositionalInjection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[4])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_PositionalInjection__set_state(<PositionalInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_PositionalInjection__set_state(PositionalInjection __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_PositionalInjection__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_NamedInjection(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* Python wrapper */
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_84__pyx_unpickle_NamedInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyMethodDef __pyx_mdef_19dependency_injector_9providers_84__pyx_unpickle_NamedInjection = {"__pyx_unpickle_NamedInjection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_84__pyx_unpickle_NamedInjection, METH_VARARGS|METH_KEYWORDS, 0};
|
|
static PyObject *__pyx_pw_19dependency_injector_9providers_84__pyx_unpickle_NamedInjection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyObject *__pyx_v___pyx_type = 0;
|
|
long __pyx_v___pyx_checksum;
|
|
PyObject *__pyx_v___pyx_state = 0;
|
|
PyObject *__pyx_r = 0;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_NamedInjection (wrapper)", 0);
|
|
{
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
|
|
PyObject* values[3] = {0,0,0};
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args;
|
|
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
|
switch (pos_args) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
CYTHON_FALLTHROUGH;
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
CYTHON_FALLTHROUGH;
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
CYTHON_FALLTHROUGH;
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
kw_args = PyDict_Size(__pyx_kwds);
|
|
switch (pos_args) {
|
|
case 0:
|
|
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
CYTHON_FALLTHROUGH;
|
|
case 1:
|
|
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NamedInjection", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
CYTHON_FALLTHROUGH;
|
|
case 2:
|
|
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NamedInjection", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_NamedInjection") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
__pyx_v___pyx_type = values[0];
|
|
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_v___pyx_state = values[2];
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_NamedInjection", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_NamedInjection", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__Pyx_RefNannyFinishContext();
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_r = __pyx_pf_19dependency_injector_9providers_83__pyx_unpickle_NamedInjection(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
|
|
|
|
/* function exit code */
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static PyObject *__pyx_pf_19dependency_injector_9providers_83__pyx_unpickle_NamedInjection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_v___pyx_PickleError = 0;
|
|
PyObject *__pyx_v___pyx_result = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_NamedInjection", 0);
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x64f395f: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x64f395f = (__call, __is_delegated, __is_provider, __name, __value))" % __pyx_checksum)
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x64f395f) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "(tree fragment)":5
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x64f395f:
|
|
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x64f395f = (__call, __is_delegated, __is_provider, __name, __value))" % __pyx_checksum)
|
|
* __pyx_result = NamedInjection.__new__(__pyx_type)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_n_s_PickleError);
|
|
__Pyx_GIVEREF(__pyx_n_s_PickleError);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
|
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__pyx_v___pyx_PickleError = __pyx_t_2;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":6
|
|
* if __pyx_checksum != 0x64f395f:
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x64f395f = (__call, __is_delegated, __is_provider, __name, __value))" % __pyx_checksum) # <<<<<<<<<<<<<<
|
|
* __pyx_result = NamedInjection.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x64, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_INCREF(__pyx_v___pyx_PickleError);
|
|
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_5)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_5);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__PYX_ERR(2, 6, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":4
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
* if __pyx_checksum != 0x64f395f: # <<<<<<<<<<<<<<
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x64f395f = (__call, __is_delegated, __is_provider, __name, __value))" % __pyx_checksum)
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":7
|
|
* from pickle import PickleError as __pyx_PickleError
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x64f395f = (__call, __is_delegated, __is_provider, __name, __value))" % __pyx_checksum)
|
|
* __pyx_result = NamedInjection.__new__(__pyx_type) # <<<<<<<<<<<<<<
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_NamedInjection__set_state(<NamedInjection> __pyx_result, __pyx_state)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
}
|
|
}
|
|
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v___pyx_result = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x64f395f = (__call, __is_delegated, __is_provider, __name, __value))" % __pyx_checksum)
|
|
* __pyx_result = NamedInjection.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_NamedInjection__set_state(<NamedInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
|
|
__pyx_t_6 = (__pyx_t_1 != 0);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "(tree fragment)":9
|
|
* __pyx_result = NamedInjection.__new__(__pyx_type)
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_NamedInjection__set_state(<NamedInjection> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_NamedInjection__set_state(NamedInjection __pyx_result, tuple __pyx_state):
|
|
*/
|
|
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__pyx_t_3 = __pyx_f_19dependency_injector_9providers___pyx_unpickle_NamedInjection__set_state(((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "(tree fragment)":8
|
|
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x64f395f = (__call, __is_delegated, __is_provider, __name, __value))" % __pyx_checksum)
|
|
* __pyx_result = NamedInjection.__new__(__pyx_type)
|
|
* if __pyx_state is not None: # <<<<<<<<<<<<<<
|
|
* __pyx_unpickle_NamedInjection__set_state(<NamedInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":10
|
|
* if __pyx_state is not None:
|
|
* __pyx_unpickle_NamedInjection__set_state(<NamedInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result # <<<<<<<<<<<<<<
|
|
* cdef __pyx_unpickle_NamedInjection__set_state(NamedInjection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__name = __pyx_state[3]; __pyx_result.__value = __pyx_state[4]
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v___pyx_result);
|
|
__pyx_r = __pyx_v___pyx_result;
|
|
goto __pyx_L0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_NamedInjection(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_NamedInjection", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
|
|
__Pyx_XDECREF(__pyx_v___pyx_result);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_NamedInjection__set_state(<NamedInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_NamedInjection__set_state(NamedInjection __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__name = __pyx_state[3]; __pyx_result.__value = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_NamedInjection__set_state(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannySetupContext("__pyx_unpickle_NamedInjection__set_state", 0);
|
|
|
|
/* "(tree fragment)":12
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_NamedInjection__set_state(NamedInjection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__name = __pyx_state[3]; __pyx_result.__value = __pyx_state[4] # <<<<<<<<<<<<<<
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___call = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___is_delegated = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___is_provider = __pyx_t_2;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx___name);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx___name);
|
|
__pyx_v___pyx_result->__pyx___name = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 12, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx___value);
|
|
__Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.__pyx___value);
|
|
__pyx_v___pyx_result->__pyx_base.__pyx___value = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_NamedInjection__set_state(NamedInjection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__name = __pyx_state[3]; __pyx_result.__value = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(2, 13, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_5 = ((__pyx_t_4 > 5) != 0);
|
|
if (__pyx_t_5) {
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_5;
|
|
goto __pyx_L4_bool_binop_done;
|
|
}
|
|
__pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
|
|
__pyx_t_6 = (__pyx_t_5 != 0);
|
|
__pyx_t_3 = __pyx_t_6;
|
|
__pyx_L4_bool_binop_done:;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "(tree fragment)":14
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__name = __pyx_state[3]; __pyx_result.__value = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
* __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<<
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(__pyx_v___pyx_state == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(2, 14, __pyx_L1_error)
|
|
}
|
|
__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_8, function);
|
|
}
|
|
}
|
|
__pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "(tree fragment)":13
|
|
* cdef __pyx_unpickle_NamedInjection__set_state(NamedInjection __pyx_result, tuple __pyx_state):
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__name = __pyx_state[3]; __pyx_result.__value = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__dict__.update(__pyx_state[5])
|
|
*/
|
|
}
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_NamedInjection__set_state(<NamedInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_NamedInjection__set_state(NamedInjection __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__name = __pyx_state[3]; __pyx_result.__value = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__pyx_unpickle_NamedInjection__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":220
|
|
*
|
|
* # Inline helper functions
|
|
* cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<<
|
|
* return self.__name
|
|
*
|
|
*/
|
|
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_name(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__get_name", 0);
|
|
|
|
/* "dependency_injector/providers.pxd":221
|
|
* # Inline helper functions
|
|
* cdef inline object __get_name(NamedInjection self):
|
|
* return self.__name # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___name);
|
|
__pyx_r = __pyx_v_self->__pyx___name;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pxd":220
|
|
*
|
|
* # Inline helper functions
|
|
* cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<<
|
|
* return self.__name
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":224
|
|
*
|
|
*
|
|
* cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<<
|
|
* if self.__call == 0:
|
|
* return self.__value
|
|
*/
|
|
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_value(struct __pyx_obj_19dependency_injector_9providers_Injection *__pyx_v_self) {
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
__Pyx_RefNannySetupContext("__get_value", 0);
|
|
|
|
/* "dependency_injector/providers.pxd":225
|
|
*
|
|
* cdef inline object __get_value(Injection self):
|
|
* if self.__call == 0: # <<<<<<<<<<<<<<
|
|
* return self.__value
|
|
* return self.__value()
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v_self->__pyx___call == 0) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "dependency_injector/providers.pxd":226
|
|
* cdef inline object __get_value(Injection self):
|
|
* if self.__call == 0:
|
|
* return self.__value # <<<<<<<<<<<<<<
|
|
* return self.__value()
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___value);
|
|
__pyx_r = __pyx_v_self->__pyx___value;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pxd":225
|
|
*
|
|
* cdef inline object __get_value(Injection self):
|
|
* if self.__call == 0: # <<<<<<<<<<<<<<
|
|
* return self.__value
|
|
* return self.__value()
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":227
|
|
* if self.__call == 0:
|
|
* return self.__value
|
|
* return self.__value() # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_self->__pyx___value);
|
|
__pyx_t_3 = __pyx_v_self->__pyx___value; __pyx_t_4 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
|
|
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
|
|
if (likely(__pyx_t_4)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_3, function);
|
|
}
|
|
}
|
|
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pxd":224
|
|
*
|
|
*
|
|
* cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<<
|
|
* if self.__call == 0:
|
|
* return self.__value
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":232
|
|
* @cython.boundscheck(False)
|
|
* @cython.wraparound(False)
|
|
* cdef inline tuple __provide_positional_args(tuple args, # <<<<<<<<<<<<<<
|
|
* tuple inj_args,
|
|
* int inj_args_len):
|
|
*/
|
|
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provide_positional_args(PyObject *__pyx_v_args, PyObject *__pyx_v_inj_args, int __pyx_v_inj_args_len) {
|
|
int __pyx_v_index;
|
|
PyObject *__pyx_v_positional_args = 0;
|
|
struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_injection = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__provide_positional_args", 0);
|
|
|
|
/* "dependency_injector/providers.pxd":239
|
|
* cdef PositionalInjection injection
|
|
*
|
|
* if inj_args_len == 0: # <<<<<<<<<<<<<<
|
|
* return args
|
|
*
|
|
*/
|
|
__pyx_t_1 = ((__pyx_v_inj_args_len == 0) != 0);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "dependency_injector/providers.pxd":240
|
|
*
|
|
* if inj_args_len == 0:
|
|
* return args # <<<<<<<<<<<<<<
|
|
*
|
|
* positional_args = list()
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_args);
|
|
__pyx_r = __pyx_v_args;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pxd":239
|
|
* cdef PositionalInjection injection
|
|
*
|
|
* if inj_args_len == 0: # <<<<<<<<<<<<<<
|
|
* return args
|
|
*
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":242
|
|
* return args
|
|
*
|
|
* positional_args = list() # <<<<<<<<<<<<<<
|
|
* for index in range(inj_args_len):
|
|
* injection = <PositionalInjection>inj_args[index]
|
|
*/
|
|
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_v_positional_args = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":243
|
|
*
|
|
* positional_args = list()
|
|
* for index in range(inj_args_len): # <<<<<<<<<<<<<<
|
|
* injection = <PositionalInjection>inj_args[index]
|
|
* positional_args.append(__get_value(injection))
|
|
*/
|
|
__pyx_t_3 = __pyx_v_inj_args_len;
|
|
__pyx_t_4 = __pyx_t_3;
|
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
__pyx_v_index = __pyx_t_5;
|
|
|
|
/* "dependency_injector/providers.pxd":244
|
|
* positional_args = list()
|
|
* for index in range(inj_args_len):
|
|
* injection = <PositionalInjection>inj_args[index] # <<<<<<<<<<<<<<
|
|
* positional_args.append(__get_value(injection))
|
|
* positional_args.extend(args)
|
|
*/
|
|
if (unlikely(__pyx_v_inj_args == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(0, 244, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_v_inj_args, __pyx_v_index);
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
__Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":245
|
|
* for index in range(inj_args_len):
|
|
* injection = <PositionalInjection>inj_args[index]
|
|
* positional_args.append(__get_value(injection)) # <<<<<<<<<<<<<<
|
|
* positional_args.extend(args)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_injection)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = __Pyx_PyList_Append(__pyx_v_positional_args, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 245, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":246
|
|
* injection = <PositionalInjection>inj_args[index]
|
|
* positional_args.append(__get_value(injection))
|
|
* positional_args.extend(args) # <<<<<<<<<<<<<<
|
|
*
|
|
* return tuple(positional_args)
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_positional_args, __pyx_v_args); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 246, __pyx_L1_error)
|
|
|
|
/* "dependency_injector/providers.pxd":248
|
|
* positional_args.extend(args)
|
|
*
|
|
* return tuple(positional_args) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2 = PyList_AsTuple(__pyx_v_positional_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_r = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pxd":232
|
|
* @cython.boundscheck(False)
|
|
* @cython.wraparound(False)
|
|
* cdef inline tuple __provide_positional_args(tuple args, # <<<<<<<<<<<<<<
|
|
* tuple inj_args,
|
|
* int inj_args_len):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__provide_positional_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_positional_args);
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_injection);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":253
|
|
* @cython.boundscheck(False)
|
|
* @cython.wraparound(False)
|
|
* cdef inline dict __provide_keyword_args(dict kwargs, # <<<<<<<<<<<<<<
|
|
* tuple inj_kwargs,
|
|
* int inj_kwargs_len):
|
|
*/
|
|
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provide_keyword_args(PyObject *__pyx_v_kwargs, PyObject *__pyx_v_inj_kwargs, int __pyx_v_inj_kwargs_len) {
|
|
int __pyx_v_index;
|
|
PyObject *__pyx_v_name = 0;
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_kw_injection = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
Py_ssize_t __pyx_t_1;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
int __pyx_t_7;
|
|
__Pyx_RefNannySetupContext("__provide_keyword_args", 0);
|
|
|
|
/* "dependency_injector/providers.pxd":260
|
|
* cdef NamedInjection kw_injection
|
|
*
|
|
* if len(kwargs) == 0: # <<<<<<<<<<<<<<
|
|
* for index in range(inj_kwargs_len):
|
|
* kw_injection = <NamedInjection>inj_kwargs[index]
|
|
*/
|
|
if (unlikely(__pyx_v_kwargs == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
__PYX_ERR(0, 260, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 260, __pyx_L1_error)
|
|
__pyx_t_2 = ((__pyx_t_1 == 0) != 0);
|
|
if (__pyx_t_2) {
|
|
|
|
/* "dependency_injector/providers.pxd":261
|
|
*
|
|
* if len(kwargs) == 0:
|
|
* for index in range(inj_kwargs_len): # <<<<<<<<<<<<<<
|
|
* kw_injection = <NamedInjection>inj_kwargs[index]
|
|
* name = __get_name(kw_injection)
|
|
*/
|
|
__pyx_t_3 = __pyx_v_inj_kwargs_len;
|
|
__pyx_t_4 = __pyx_t_3;
|
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
__pyx_v_index = __pyx_t_5;
|
|
|
|
/* "dependency_injector/providers.pxd":262
|
|
* if len(kwargs) == 0:
|
|
* for index in range(inj_kwargs_len):
|
|
* kw_injection = <NamedInjection>inj_kwargs[index] # <<<<<<<<<<<<<<
|
|
* name = __get_name(kw_injection)
|
|
* kwargs[name] = __get_value(kw_injection)
|
|
*/
|
|
if (unlikely(__pyx_v_inj_kwargs == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(0, 262, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":263
|
|
* for index in range(inj_kwargs_len):
|
|
* kw_injection = <NamedInjection>inj_kwargs[index]
|
|
* name = __get_name(kw_injection) # <<<<<<<<<<<<<<
|
|
* kwargs[name] = __get_value(kw_injection)
|
|
* else:
|
|
*/
|
|
__pyx_t_6 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 263, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":264
|
|
* kw_injection = <NamedInjection>inj_kwargs[index]
|
|
* name = __get_name(kw_injection)
|
|
* kwargs[name] = __get_value(kw_injection) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* for index in range(inj_kwargs_len):
|
|
*/
|
|
__pyx_t_6 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 264, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (unlikely(__pyx_v_kwargs == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(0, 264, __pyx_L1_error)
|
|
}
|
|
if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_6) < 0)) __PYX_ERR(0, 264, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":260
|
|
* cdef NamedInjection kw_injection
|
|
*
|
|
* if len(kwargs) == 0: # <<<<<<<<<<<<<<
|
|
* for index in range(inj_kwargs_len):
|
|
* kw_injection = <NamedInjection>inj_kwargs[index]
|
|
*/
|
|
goto __pyx_L3;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":266
|
|
* kwargs[name] = __get_value(kw_injection)
|
|
* else:
|
|
* for index in range(inj_kwargs_len): # <<<<<<<<<<<<<<
|
|
* kw_injection = <NamedInjection>inj_kwargs[index]
|
|
* name = __get_name(kw_injection)
|
|
*/
|
|
/*else*/ {
|
|
__pyx_t_3 = __pyx_v_inj_kwargs_len;
|
|
__pyx_t_4 = __pyx_t_3;
|
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
__pyx_v_index = __pyx_t_5;
|
|
|
|
/* "dependency_injector/providers.pxd":267
|
|
* else:
|
|
* for index in range(inj_kwargs_len):
|
|
* kw_injection = <NamedInjection>inj_kwargs[index] # <<<<<<<<<<<<<<
|
|
* name = __get_name(kw_injection)
|
|
* if name not in kwargs:
|
|
*/
|
|
if (unlikely(__pyx_v_inj_kwargs == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(0, 267, __pyx_L1_error)
|
|
}
|
|
__pyx_t_6 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index);
|
|
__Pyx_INCREF(__pyx_t_6);
|
|
__Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":268
|
|
* for index in range(inj_kwargs_len):
|
|
* kw_injection = <NamedInjection>inj_kwargs[index]
|
|
* name = __get_name(kw_injection) # <<<<<<<<<<<<<<
|
|
* if name not in kwargs:
|
|
* kwargs[name] = __get_value(kw_injection)
|
|
*/
|
|
__pyx_t_6 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 268, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":269
|
|
* kw_injection = <NamedInjection>inj_kwargs[index]
|
|
* name = __get_name(kw_injection)
|
|
* if name not in kwargs: # <<<<<<<<<<<<<<
|
|
* kwargs[name] = __get_value(kw_injection)
|
|
*
|
|
*/
|
|
if (unlikely(__pyx_v_kwargs == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
__PYX_ERR(0, 269, __pyx_L1_error)
|
|
}
|
|
__pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 269, __pyx_L1_error)
|
|
__pyx_t_7 = (__pyx_t_2 != 0);
|
|
if (__pyx_t_7) {
|
|
|
|
/* "dependency_injector/providers.pxd":270
|
|
* name = __get_name(kw_injection)
|
|
* if name not in kwargs:
|
|
* kwargs[name] = __get_value(kw_injection) # <<<<<<<<<<<<<<
|
|
*
|
|
* return kwargs
|
|
*/
|
|
__pyx_t_6 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 270, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
if (unlikely(__pyx_v_kwargs == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(0, 270, __pyx_L1_error)
|
|
}
|
|
if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_6) < 0)) __PYX_ERR(0, 270, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":269
|
|
* kw_injection = <NamedInjection>inj_kwargs[index]
|
|
* name = __get_name(kw_injection)
|
|
* if name not in kwargs: # <<<<<<<<<<<<<<
|
|
* kwargs[name] = __get_value(kw_injection)
|
|
*
|
|
*/
|
|
}
|
|
}
|
|
}
|
|
__pyx_L3:;
|
|
|
|
/* "dependency_injector/providers.pxd":272
|
|
* kwargs[name] = __get_value(kw_injection)
|
|
*
|
|
* return kwargs # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_kwargs);
|
|
__pyx_r = __pyx_v_kwargs;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pxd":253
|
|
* @cython.boundscheck(False)
|
|
* @cython.wraparound(False)
|
|
* cdef inline dict __provide_keyword_args(dict kwargs, # <<<<<<<<<<<<<<
|
|
* tuple inj_kwargs,
|
|
* int inj_kwargs_len):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__provide_keyword_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_name);
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_kw_injection);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":277
|
|
* @cython.boundscheck(False)
|
|
* @cython.wraparound(False)
|
|
* cdef inline object __inject_attributes(object instance, # <<<<<<<<<<<<<<
|
|
* tuple attributes,
|
|
* int attributes_len):
|
|
*/
|
|
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___inject_attributes(PyObject *__pyx_v_instance, PyObject *__pyx_v_attributes, int __pyx_v_attributes_len) {
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_attr_injection = 0;
|
|
int __pyx_v_index;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
int __pyx_t_1;
|
|
int __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
__Pyx_RefNannySetupContext("__inject_attributes", 0);
|
|
|
|
/* "dependency_injector/providers.pxd":281
|
|
* int attributes_len):
|
|
* cdef NamedInjection attr_injection
|
|
* for index in range(attributes_len): # <<<<<<<<<<<<<<
|
|
* attr_injection = <NamedInjection>attributes[index]
|
|
* setattr(instance,
|
|
*/
|
|
__pyx_t_1 = __pyx_v_attributes_len;
|
|
__pyx_t_2 = __pyx_t_1;
|
|
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
|
|
__pyx_v_index = __pyx_t_3;
|
|
|
|
/* "dependency_injector/providers.pxd":282
|
|
* cdef NamedInjection attr_injection
|
|
* for index in range(attributes_len):
|
|
* attr_injection = <NamedInjection>attributes[index] # <<<<<<<<<<<<<<
|
|
* setattr(instance,
|
|
* __get_name(attr_injection),
|
|
*/
|
|
if (unlikely(__pyx_v_attributes == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
__PYX_ERR(0, 282, __pyx_L1_error)
|
|
}
|
|
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_attributes, __pyx_v_index);
|
|
__Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_XDECREF_SET(__pyx_v_attr_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_4));
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":284
|
|
* attr_injection = <NamedInjection>attributes[index]
|
|
* setattr(instance,
|
|
* __get_name(attr_injection), # <<<<<<<<<<<<<<
|
|
* __get_value(attr_injection))
|
|
*
|
|
*/
|
|
__pyx_t_4 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_attr_injection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
|
|
/* "dependency_injector/providers.pxd":285
|
|
* setattr(instance,
|
|
* __get_name(attr_injection),
|
|
* __get_value(attr_injection)) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_attr_injection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
|
|
/* "dependency_injector/providers.pxd":283
|
|
* for index in range(attributes_len):
|
|
* attr_injection = <NamedInjection>attributes[index]
|
|
* setattr(instance, # <<<<<<<<<<<<<<
|
|
* __get_name(attr_injection),
|
|
* __get_value(attr_injection))
|
|
*/
|
|
__pyx_t_6 = PyObject_SetAttr(__pyx_v_instance, __pyx_t_4, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 283, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":277
|
|
* @cython.boundscheck(False)
|
|
* @cython.wraparound(False)
|
|
* cdef inline object __inject_attributes(object instance, # <<<<<<<<<<<<<<
|
|
* tuple attributes,
|
|
* int attributes_len):
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__inject_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_attr_injection);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":288
|
|
*
|
|
*
|
|
* cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* cdef tuple positional_args
|
|
* cdef dict keyword_args
|
|
*/
|
|
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callable_call(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_v_positional_args = 0;
|
|
PyObject *__pyx_v_keyword_args = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
__Pyx_RefNannySetupContext("__callable_call", 0);
|
|
|
|
/* "dependency_injector/providers.pxd":293
|
|
*
|
|
* positional_args = __provide_positional_args(args,
|
|
* self.__args, # <<<<<<<<<<<<<<
|
|
* self.__args_len)
|
|
* keyword_args = __provide_keyword_args(kwargs,
|
|
*/
|
|
__pyx_t_1 = __pyx_v_self->__pyx___args;
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
|
|
/* "dependency_injector/providers.pxd":292
|
|
* cdef dict keyword_args
|
|
*
|
|
* positional_args = __provide_positional_args(args, # <<<<<<<<<<<<<<
|
|
* self.__args,
|
|
* self.__args_len)
|
|
*/
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_args, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v_positional_args = ((PyObject*)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":296
|
|
* self.__args_len)
|
|
* keyword_args = __provide_keyword_args(kwargs,
|
|
* self.__kwargs, # <<<<<<<<<<<<<<
|
|
* self.__kwargs_len)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___kwargs;
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
|
|
/* "dependency_injector/providers.pxd":295
|
|
* self.__args,
|
|
* self.__args_len)
|
|
* keyword_args = __provide_keyword_args(kwargs, # <<<<<<<<<<<<<<
|
|
* self.__kwargs,
|
|
* self.__kwargs_len)
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_keyword_args = ((PyObject*)__pyx_t_1);
|
|
__pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":299
|
|
* self.__kwargs_len)
|
|
*
|
|
* return self.__provides(*positional_args, **keyword_args) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
if (unlikely(__pyx_v_positional_args == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
__PYX_ERR(0, 299, __pyx_L1_error)
|
|
}
|
|
if (unlikely(__pyx_v_keyword_args == Py_None)) {
|
|
PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
|
|
__PYX_ERR(0, 299, __pyx_L1_error)
|
|
}
|
|
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___provides, __pyx_v_positional_args, __pyx_v_keyword_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pxd":288
|
|
*
|
|
*
|
|
* cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* cdef tuple positional_args
|
|
* cdef dict keyword_args
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__callable_call", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_positional_args);
|
|
__Pyx_XDECREF(__pyx_v_keyword_args);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":302
|
|
*
|
|
*
|
|
* cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* cdef object instance
|
|
*
|
|
*/
|
|
|
|
static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factory_call(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
PyObject *__pyx_v_instance = 0;
|
|
PyObject *__pyx_r = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
__Pyx_RefNannySetupContext("__factory_call", 0);
|
|
|
|
/* "dependency_injector/providers.pxd":305
|
|
* cdef object instance
|
|
*
|
|
* instance = __callable_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<<
|
|
*
|
|
* if self.__attributes_len > 0:
|
|
*/
|
|
__pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx___instantiator);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__pyx_t_2 = __pyx_f_19dependency_injector_9providers___callable_call(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_v_instance = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":307
|
|
* instance = __callable_call(self.__instantiator, args, kwargs)
|
|
*
|
|
* if self.__attributes_len > 0: # <<<<<<<<<<<<<<
|
|
* __inject_attributes(instance,
|
|
* self.__attributes,
|
|
*/
|
|
__pyx_t_3 = ((__pyx_v_self->__pyx___attributes_len > 0) != 0);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "dependency_injector/providers.pxd":309
|
|
* if self.__attributes_len > 0:
|
|
* __inject_attributes(instance,
|
|
* self.__attributes, # <<<<<<<<<<<<<<
|
|
* self.__attributes_len)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __pyx_v_self->__pyx___attributes;
|
|
__Pyx_INCREF(__pyx_t_2);
|
|
|
|
/* "dependency_injector/providers.pxd":308
|
|
*
|
|
* if self.__attributes_len > 0:
|
|
* __inject_attributes(instance, # <<<<<<<<<<<<<<
|
|
* self.__attributes,
|
|
* self.__attributes_len)
|
|
*/
|
|
__pyx_t_1 = __pyx_f_19dependency_injector_9providers___inject_attributes(__pyx_v_instance, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":307
|
|
* instance = __callable_call(self.__instantiator, args, kwargs)
|
|
*
|
|
* if self.__attributes_len > 0: # <<<<<<<<<<<<<<
|
|
* __inject_attributes(instance,
|
|
* self.__attributes,
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pxd":312
|
|
* self.__attributes_len)
|
|
*
|
|
* return instance # <<<<<<<<<<<<<<
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_instance);
|
|
__pyx_r = __pyx_v_instance;
|
|
goto __pyx_L0;
|
|
|
|
/* "dependency_injector/providers.pxd":302
|
|
*
|
|
*
|
|
* cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* cdef object instance
|
|
*
|
|
*/
|
|
|
|
/* function exit code */
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("dependency_injector.providers.__factory_call", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF(__pyx_v_instance);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_RefNannyFinishContext();
|
|
return __pyx_r;
|
|
}
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_vtable_19dependency_injector_9providers_Provider;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Provider(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider *p;
|
|
PyObject *o;
|
|
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
|
|
o = (*t->tp_alloc)(t, 0);
|
|
} else {
|
|
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
|
|
}
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)o);
|
|
p->__pyx_vtab = __pyx_vtabptr_19dependency_injector_9providers_Provider;
|
|
p->__pyx___overridden = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
p->__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_Provider(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider *p = (struct __pyx_obj_19dependency_injector_9providers_Provider *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___overridden);
|
|
Py_CLEAR(p->__pyx___last_overriding);
|
|
(*Py_TYPE(o)->tp_free)(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_Provider(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider *p = (struct __pyx_obj_19dependency_injector_9providers_Provider *)o;
|
|
if (p->__pyx___overridden) {
|
|
e = (*v)(p->__pyx___overridden, a); if (e) return e;
|
|
}
|
|
if (p->__pyx___last_overriding) {
|
|
e = (*v)(((PyObject *)p->__pyx___last_overriding), a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_Provider(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_Provider *p = (struct __pyx_obj_19dependency_injector_9providers_Provider *)o;
|
|
tmp = ((PyObject*)p->__pyx___overridden);
|
|
p->__pyx___overridden = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
tmp = ((PyObject*)p->__pyx___last_overriding);
|
|
p->__pyx___last_overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_8Provider_overridden(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_8Provider_10overridden_1__get__(o);
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_8Provider_last_overriding(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_8Provider_15last_overriding_1__get__(o);
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_8Provider_provider(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_8Provider_8provider_1__get__(o);
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_Provider[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Provider_5__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_8Provider_4__deepcopy__},
|
|
{"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Provider_11override, METH_O, __pyx_doc_19dependency_injector_9providers_8Provider_10override},
|
|
{"reset_last_overriding", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Provider_13reset_last_overriding, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Provider_12reset_last_overriding},
|
|
{"reset_override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Provider_15reset_override, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Provider_14reset_override},
|
|
{"delegate", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Provider_17delegate, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Provider_16delegate},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Provider_19_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Provider_18_provide},
|
|
{"_copy_overridings", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Provider_21_copy_overridings, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Provider_20_copy_overridings},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Provider_23__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Provider_25__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Provider[] = {
|
|
{(char *)"overridden", __pyx_getprop_19dependency_injector_9providers_8Provider_overridden, 0, (char *)"Return tuple of overriding providers.", 0},
|
|
{(char *)"last_overriding", __pyx_getprop_19dependency_injector_9providers_8Provider_last_overriding, 0, (char *)"Return last overriding provider.\n\n If provider is not overridden, then None is returned.\n ", 0},
|
|
{(char *)"provider", __pyx_getprop_19dependency_injector_9providers_8Provider_provider, 0, (char *)"Return provider's delegate.\n\n :rtype: :py:class:`Delegate`\n ", 0},
|
|
{0, 0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_Provider = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.Provider", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_Provider), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Provider, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_7__str__, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Base provider class.\n\n :py:class:`Provider` is callable (implements ``__call__`` method). Every\n call to provider object returns provided result, according to the providing\n strategy of particular provider. This ``callable`` functionality is a\n regular part of providers API and it should be the same for all provider's\n subclasses.\n\n Implementation of particular providing strategy should be done in\n :py:meth:`Provider._provide` of :py:class:`Provider` subclass. Current\n method is called every time when not overridden provider is called.\n\n :py:class:`Provider` implements provider overriding logic that should be\n also common for all providers:\n\n .. code-block:: python\n\n provider1 = Factory(SomeClass)\n provider2 = Factory(ChildSomeClass)\n\n provider1.override(provider2)\n\n some_instance = provider1()\n assert isinstance(some_instance, ChildSomeClass)\n\n Also :py:class:`Provider` implements helper function for creating its\n delegates:\n\n .. code-block:: python\n\n provider = Factory(object)\n delegate = provider.delegate()\n\n delegated = delegate()\n\n assert provider is delegated\n\n All providers should extend this class.\n\n .. py:attribute:: overridden\n\n Tuple of overriding providers, if any.\n\n :type: tuple[:py:class:`Provider`] | None\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Provider, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Provider, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_Provider, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
__pyx_getsets_19dependency_injector_9providers_Provider, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_Provider, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Object __pyx_vtable_19dependency_injector_9providers_Object;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Object(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Object *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Provider(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_Object *)o);
|
|
p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_Object;
|
|
p->__pyx___provides = Py_None; Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_Object(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Object *p = (struct __pyx_obj_19dependency_injector_9providers_Object *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___provides);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Provider(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_Object(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_Object *p = (struct __pyx_obj_19dependency_injector_9providers_Object *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e;
|
|
if (p->__pyx___provides) {
|
|
e = (*v)(p->__pyx___provides, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_Object(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_Object *p = (struct __pyx_obj_19dependency_injector_9providers_Object *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Provider(o);
|
|
tmp = ((PyObject*)p->__pyx___provides);
|
|
p->__pyx___provides = Py_None; Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_Object[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_6Object_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_6Object_2__deepcopy__},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_6Object_9_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_6Object_8_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_6Object_11__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_6Object_13__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_Object = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.Object", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_Object), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Object, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_6Object_7__repr__, /*tp_repr*/
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_6Object_5__str__, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Object provider returns provided instance \"as is\".\n\n .. py:attribute:: provides\n\n Value that have to be provided.\n\n :type: object\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Object, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Object, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_Object, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_6Object_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_Object, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate __pyx_vtable_19dependency_injector_9providers_Delegate;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Delegate(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Delegate *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Provider(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_Delegate *)o);
|
|
p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_Delegate;
|
|
p->__pyx___provides = Py_None; Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_Delegate(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Delegate *p = (struct __pyx_obj_19dependency_injector_9providers_Delegate *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___provides);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Provider(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_Delegate(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_Delegate *p = (struct __pyx_obj_19dependency_injector_9providers_Delegate *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e;
|
|
if (p->__pyx___provides) {
|
|
e = (*v)(p->__pyx___provides, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_Delegate(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_Delegate *p = (struct __pyx_obj_19dependency_injector_9providers_Delegate *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Provider(o);
|
|
tmp = ((PyObject*)p->__pyx___provides);
|
|
p->__pyx___provides = Py_None; Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_Delegate[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Delegate_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_8Delegate_2__deepcopy__},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Delegate_9_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Delegate_8_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Delegate_11__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Delegate_13__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_Delegate = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.Delegate", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_Delegate), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Delegate, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_7__repr__, /*tp_repr*/
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_5__str__, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Delegate provider returns provider \"as is\".\n\n .. py:attribute:: provides\n\n Value that have to be provided.\n\n :type: object\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Delegate, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Delegate, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_Delegate, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_Delegate, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency __pyx_vtable_19dependency_injector_9providers_Dependency;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Dependency(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Dependency *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Provider(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_Dependency *)o);
|
|
p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_Dependency;
|
|
p->__pyx___instance_of = ((PyTypeObject*)Py_None); Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_Dependency(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Dependency *p = (struct __pyx_obj_19dependency_injector_9providers_Dependency *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___instance_of);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Provider(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_Dependency(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_Dependency *p = (struct __pyx_obj_19dependency_injector_9providers_Dependency *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e;
|
|
if (p->__pyx___instance_of) {
|
|
e = (*v)(((PyObject *)p->__pyx___instance_of), a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_Dependency(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_Dependency *p = (struct __pyx_obj_19dependency_injector_9providers_Dependency *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Provider(o);
|
|
tmp = ((PyObject*)p->__pyx___instance_of);
|
|
p->__pyx___instance_of = ((PyTypeObject*)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_10Dependency_instance_of(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_10Dependency_11instance_of_1__get__(o);
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_Dependency[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_10Dependency_2__deepcopy__},
|
|
{"provided_by", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_11provided_by, METH_O, __pyx_doc_19dependency_injector_9providers_10Dependency_10provided_by},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_13__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_10Dependency_15__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Dependency[] = {
|
|
{(char *)"instance_of", __pyx_getprop_19dependency_injector_9providers_10Dependency_instance_of, 0, (char *)"Return class of required dependency.", 0},
|
|
{0, 0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_Dependency = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.Dependency", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_Dependency), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Dependency, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_10Dependency_9__repr__, /*tp_repr*/
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
__pyx_pw_19dependency_injector_9providers_10Dependency_5__call__, /*tp_call*/
|
|
__pyx_pw_19dependency_injector_9providers_10Dependency_7__str__, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
":py:class:`Dependency` provider describes dependency interface.\n\n This provider is used for description of dependency interface. That might\n be useful when dependency could be provided in the client's code only,\n but it's interface is known. Such situations could happen when required\n dependency has non-deterministic list of dependencies itself.\n\n .. code-block:: python\n\n database_provider = Dependency(sqlite3.dbapi2.Connection)\n database_provider.override(Factory(sqlite3.connect, ':memory:'))\n\n database = database_provider()\n\n .. py:attribute:: instance_of\n\n Class of required dependency.\n\n :type: type\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Dependency, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Dependency, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_Dependency, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
__pyx_getsets_19dependency_injector_9providers_Dependency, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_10Dependency_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_Dependency, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency __pyx_vtable_19dependency_injector_9providers_ExternalDependency;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_ExternalDependency(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Dependency(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_ExternalDependency *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_ExternalDependency;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_ExternalDependency[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_18ExternalDependency_1__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_18ExternalDependency_3__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_ExternalDependency = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.ExternalDependency", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Dependency, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_10Dependency_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_10Dependency_5__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_10Dependency_7__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
":py:class:`ExternalDependency` provider describes dependency interface.\n\n This provider is used for description of dependency interface. That might\n be useful when dependency could be provided in the client's code only,\n but it's interface is known. Such situations could happen when required\n dependency has non-deterministic list of dependencies itself.\n\n .. code-block:: python\n\n database_provider = ExternalDependency(sqlite3.dbapi2.Connection)\n database_provider.override(Factory(sqlite3.connect, ':memory:'))\n\n database = database_provider()\n\n .. deprecated:: 3.9\n\n Use :py:class:`Dependency` instead.\n\n .. py:attribute:: instance_of\n\n Class of required dependency.\n\n :type: type\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Dependency, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Dependency, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_ExternalDependency, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_10Dependency_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_ExternalDependency, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer __pyx_vtable_19dependency_injector_9providers_DependenciesContainer;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DependenciesContainer(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Object(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer;
|
|
p->__pyx___providers = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_DependenciesContainer(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *p = (struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___providers);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Object(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_DependenciesContainer(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *p = (struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Object(o, v, a); if (e) return e;
|
|
if (p->__pyx___providers) {
|
|
e = (*v)(p->__pyx___providers, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_DependenciesContainer(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *p = (struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Object(o);
|
|
tmp = ((PyObject*)p->__pyx___providers);
|
|
p->__pyx___providers = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyObject *__pyx_tp_getattro_19dependency_injector_9providers_DependenciesContainer(PyObject *o, PyObject *n) {
|
|
PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
|
|
if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
|
|
PyErr_Clear();
|
|
v = __pyx_pw_19dependency_injector_9providers_21DependenciesContainer_5__getattr__(o, n);
|
|
}
|
|
return v;
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_21DependenciesContainer_providers(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_21DependenciesContainer_9providers_1__get__(o);
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_DependenciesContainer[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_2__deepcopy__},
|
|
{"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_5__getattr__, METH_O|METH_COEXIST, __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_4__getattr__},
|
|
{"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_7override, METH_O, __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_6override},
|
|
{"reset_last_overriding", (PyCFunction)__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_9reset_last_overriding, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_8reset_last_overriding},
|
|
{"reset_override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_11reset_override, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_10reset_override},
|
|
{"_override_providers", (PyCFunction)__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_13_override_providers, METH_O, __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_12_override_providers},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_15__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_17__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_DependenciesContainer[] = {
|
|
{(char *)"providers", __pyx_getprop_19dependency_injector_9providers_21DependenciesContainer_providers, 0, (char *)"Read-only dictionary of dependency providers.", 0},
|
|
{0, 0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_DependenciesContainer = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.DependenciesContainer", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_DependenciesContainer, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_6Object_7__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_6Object_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
__pyx_tp_getattro_19dependency_injector_9providers_DependenciesContainer, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
":py:class:`DependenciesContainer` provider provides set of dependencies.\n\n\n Dependencies container provider is used to implement late static binding\n for a set of providers of a particular container.\n\n Example code:\n\n .. code-block:: python\n\n class Adapters(containers.DeclarativeContainer):\n email_sender = providers.Singleton(SmtpEmailSender)\n\n class TestAdapters(containers.DeclarativeContainer):\n email_sender = providers.Singleton(EchoEmailSender)\n\n class UseCases(containers.DeclarativeContainer):\n adapters = providers.DependenciesContainer()\n\n signup = providers.Factory(SignupUseCase,\n email_sender=adapters.email_sender)\n\n use_cases = UseCases(adapters=Adapters)\n # or\n use_cases = UseCases(adapters=TestAdapters)\n\n # Another file\n from .containers import use_cases\n\n use_case = use_cases.signup()\n use_case.execute()\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_DependenciesContainer, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_DependenciesContainer, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_DependenciesContainer, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
__pyx_getsets_19dependency_injector_9providers_DependenciesContainer, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_21DependenciesContainer_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_DependenciesContainer, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_OverridingContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_OverridingContext *p;
|
|
PyObject *o;
|
|
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
|
|
o = (*t->tp_alloc)(t, 0);
|
|
} else {
|
|
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
|
|
}
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)o);
|
|
p->__pyx___overridden = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None);
|
|
p->__pyx___overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_OverridingContext(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_OverridingContext *p = (struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___overridden);
|
|
Py_CLEAR(p->__pyx___overriding);
|
|
(*Py_TYPE(o)->tp_free)(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_OverridingContext(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_OverridingContext *p = (struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)o;
|
|
if (p->__pyx___overridden) {
|
|
e = (*v)(((PyObject *)p->__pyx___overridden), a); if (e) return e;
|
|
}
|
|
if (p->__pyx___overriding) {
|
|
e = (*v)(((PyObject *)p->__pyx___overriding), a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_OverridingContext(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_OverridingContext *p = (struct __pyx_obj_19dependency_injector_9providers_OverridingContext *)o;
|
|
tmp = ((PyObject*)p->__pyx___overridden);
|
|
p->__pyx___overridden = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
tmp = ((PyObject*)p->__pyx___overriding);
|
|
p->__pyx___overriding = ((struct __pyx_obj_19dependency_injector_9providers_Provider *)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_OverridingContext[] = {
|
|
{"__enter__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17OverridingContext_3__enter__, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_17OverridingContext_2__enter__},
|
|
{"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_17OverridingContext_5__exit__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_17OverridingContext_4__exit__},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17OverridingContext_7__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17OverridingContext_9__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_OverridingContext = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.OverridingContext", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_OverridingContext), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_OverridingContext, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
0, /*tp_repr*/
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
0, /*tp_call*/
|
|
0, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Provider overriding context.\n\n :py:class:`OverridingContext` is used by :py:meth:`Provider.override` for\n implementing ``with`` contexts. When :py:class:`OverridingContext` is\n closed, overriding that was created in this context is dropped also.\n\n .. code-block:: python\n\n with provider.override(another_provider):\n assert provider.overridden\n assert not provider.overridden\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_OverridingContext, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_OverridingContext, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_OverridingContext, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_17OverridingContext_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_OverridingContext, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Callable __pyx_vtable_19dependency_injector_9providers_Callable;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Callable(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Callable *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Provider(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_Callable *)o);
|
|
p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_Callable;
|
|
p->__pyx___provides = Py_None; Py_INCREF(Py_None);
|
|
p->__pyx___args = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
p->__pyx___kwargs = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_Callable(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Callable *p = (struct __pyx_obj_19dependency_injector_9providers_Callable *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___provides);
|
|
Py_CLEAR(p->__pyx___args);
|
|
Py_CLEAR(p->__pyx___kwargs);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Provider(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_Callable(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_Callable *p = (struct __pyx_obj_19dependency_injector_9providers_Callable *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e;
|
|
if (p->__pyx___provides) {
|
|
e = (*v)(p->__pyx___provides, a); if (e) return e;
|
|
}
|
|
if (p->__pyx___args) {
|
|
e = (*v)(p->__pyx___args, a); if (e) return e;
|
|
}
|
|
if (p->__pyx___kwargs) {
|
|
e = (*v)(p->__pyx___kwargs, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_Callable(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_Callable *p = (struct __pyx_obj_19dependency_injector_9providers_Callable *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Provider(o);
|
|
tmp = ((PyObject*)p->__pyx___provides);
|
|
p->__pyx___provides = Py_None; Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
tmp = ((PyObject*)p->__pyx___args);
|
|
p->__pyx___args = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
tmp = ((PyObject*)p->__pyx___kwargs);
|
|
p->__pyx___kwargs = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_8Callable_provides(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_8Callable_8provides_1__get__(o);
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_8Callable_args(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_8Callable_4args_1__get__(o);
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_8Callable_kwargs(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_8Callable_6kwargs_1__get__(o);
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_Callable[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_8Callable_2__deepcopy__},
|
|
{"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_7add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_6add_args},
|
|
{"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_9set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_8set_args},
|
|
{"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_11clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Callable_10clear_args},
|
|
{"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_13add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_12add_kwargs},
|
|
{"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_15set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_14set_kwargs},
|
|
{"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_17clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_8Callable_16clear_kwargs},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_8Callable_19_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_8Callable_18_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_21__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_8Callable_23__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Callable[] = {
|
|
{(char *)"provides", __pyx_getprop_19dependency_injector_9providers_8Callable_provides, 0, (char *)"Return wrapped callable.", 0},
|
|
{(char *)"args", __pyx_getprop_19dependency_injector_9providers_8Callable_args, 0, (char *)"Return positional argument injections.", 0},
|
|
{(char *)"kwargs", __pyx_getprop_19dependency_injector_9providers_8Callable_kwargs, 0, (char *)"Return keyword argument injections.", 0},
|
|
{0, 0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_Callable = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.Callable", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_Callable), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Callable, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_8Callable_5__str__, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Callable provider calls wrapped callable on every call.\n\n Callable supports positional and keyword argument injections:\n\n .. code-block:: python\n\n some_function = Callable(some_function,\n 'positional_arg1', 'positional_arg2',\n keyword_argument1=3, keyword_argument=4)\n\n # or\n\n some_function = Callable(some_function) \\\n .add_args('positional_arg1', 'positional_arg2') \\\n .add_kwargs(keyword_argument1=3, keyword_argument=4)\n\n # or\n\n some_function = Callable(some_function)\n some_function.add_args('positional_arg1', 'positional_arg2')\n some_function.add_kwargs(keyword_argument1=3, keyword_argument=4)\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Callable, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Callable, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_Callable, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
__pyx_getsets_19dependency_injector_9providers_Callable, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_8Callable_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_Callable, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable __pyx_vtable_19dependency_injector_9providers_DelegatedCallable;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedCallable(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Callable(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_DelegatedCallable[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17DelegatedCallable_1__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17DelegatedCallable_3__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_DelegatedCallable = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.DelegatedCallable", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Callable, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Callable_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Callable that is injected \"as is\".\n\n DelegatedCallable is a :py:class:`Callable`, that is injected \"as is\".\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Callable, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Callable, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_DelegatedCallable, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Callable_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_DelegatedCallable, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable __pyx_vtable_19dependency_injector_9providers_AbstractCallable;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_AbstractCallable(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Callable(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_AbstractCallable;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_AbstractCallable[] = {
|
|
{"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16AbstractCallable_3override, METH_O, __pyx_doc_19dependency_injector_9providers_16AbstractCallable_2override},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_16AbstractCallable_5_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_16AbstractCallable_4_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16AbstractCallable_7__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16AbstractCallable_9__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_AbstractCallable = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.AbstractCallable", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Callable, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
__pyx_pw_19dependency_injector_9providers_16AbstractCallable_1__call__, /*tp_call*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Callable_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Abstract callable provider.\n\n :py:class:`AbstractCallable` is a :py:class:`Callable` provider that must\n be explicitly overridden before calling.\n\n Overriding of :py:class:`AbstractCallable` is possible only by another\n :py:class:`Callable` provider.\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Callable, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Callable, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_AbstractCallable, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Callable_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_AbstractCallable, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate __pyx_vtable_19dependency_injector_9providers_CallableDelegate;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_CallableDelegate(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Delegate(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_CallableDelegate *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_CallableDelegate;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_CallableDelegate[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16CallableDelegate_3__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16CallableDelegate_5__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_CallableDelegate = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.CallableDelegate", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Delegate, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_7__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Callable delegate injects delegating callable \"as is\".\n\n .. py:attribute:: provides\n\n Value that have to be provided.\n\n :type: object\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Delegate, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Delegate, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_CallableDelegate, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_16CallableDelegate_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_CallableDelegate, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine __pyx_vtable_19dependency_injector_9providers_Coroutine;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Coroutine(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Coroutine *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Callable(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_Coroutine *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_Coroutine;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_Coroutine[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9Coroutine_3__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9Coroutine_5__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_Coroutine = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.Coroutine", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_Coroutine), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Callable, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Callable_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Coroutine provider creates wrapped coroutine on every call.\n\n Coroutine supports positional and keyword argument injections:\n\n .. code-block:: python\n\n some_coroutine = Coroutine(some_coroutine,\n 'positional_arg1', 'positional_arg2',\n keyword_argument1=3, keyword_argument=4)\n\n # or\n\n some_coroutine = Coroutine(some_coroutine) \\\n .add_args('positional_arg1', 'positional_arg2') \\\n .add_kwargs(keyword_argument1=3, keyword_argument=4)\n\n # or\n\n some_coroutine = Coroutine(some_coroutine)\n some_coroutine.add_args('positional_arg1', 'positional_arg2')\n some_coroutine.add_kwargs(keyword_argument1=3, keyword_argument=4)\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Callable, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Callable, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_Coroutine, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_9Coroutine_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_Coroutine, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine __pyx_vtable_19dependency_injector_9providers_DelegatedCoroutine;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedCoroutine(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Coroutine(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_DelegatedCoroutine[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_18DelegatedCoroutine_1__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_18DelegatedCoroutine_3__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_DelegatedCoroutine = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.DelegatedCoroutine", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Callable, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Callable_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Coroutine provider that is injected \"as is\".\n\n DelegatedCoroutine is a :py:class:`Coroutine`, that is injected \"as is\".\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Callable, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Callable, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_DelegatedCoroutine, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_9Coroutine_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_DelegatedCoroutine, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine __pyx_vtable_19dependency_injector_9providers_AbstractCoroutine;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_AbstractCoroutine(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Coroutine(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_AbstractCoroutine[] = {
|
|
{"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_3override, METH_O, __pyx_doc_19dependency_injector_9providers_17AbstractCoroutine_2override},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_5_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_17AbstractCoroutine_4_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_7__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_9__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_AbstractCoroutine = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.AbstractCoroutine", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Callable, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
__pyx_pw_19dependency_injector_9providers_17AbstractCoroutine_1__call__, /*tp_call*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Callable_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Abstract coroutine provider.\n\n :py:class:`AbstractCoroutine` is a :py:class:`Coroutine` provider that must\n be explicitly overridden before calling.\n\n Overriding of :py:class:`AbstractCoroutine` is possible only by another\n :py:class:`Coroutine` provider.\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Callable, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Callable, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_AbstractCoroutine, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_9Coroutine_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_AbstractCoroutine, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate __pyx_vtable_19dependency_injector_9providers_CoroutineDelegate;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_CoroutineDelegate(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Delegate(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_CoroutineDelegate[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_3__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_5__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_CoroutineDelegate = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.CoroutineDelegate", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Delegate, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_7__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Coroutine delegate injects delegating coroutine \"as is\".\n\n .. py:attribute:: provides\n\n Value that have to be provided.\n\n :type: object\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Delegate, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Delegate, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_CoroutineDelegate, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_17CoroutineDelegate_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_CoroutineDelegate, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration __pyx_vtable_19dependency_injector_9providers_Configuration;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Configuration(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Configuration *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Object(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_Configuration *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_Configuration;
|
|
p->__pyx___name = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
p->__pyx___children = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_Configuration(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Configuration *p = (struct __pyx_obj_19dependency_injector_9providers_Configuration *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___name);
|
|
Py_CLEAR(p->__pyx___children);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Object(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_Configuration(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_Configuration *p = (struct __pyx_obj_19dependency_injector_9providers_Configuration *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Object(o, v, a); if (e) return e;
|
|
if (p->__pyx___children) {
|
|
e = (*v)(p->__pyx___children, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_Configuration(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_Configuration *p = (struct __pyx_obj_19dependency_injector_9providers_Configuration *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Object(o);
|
|
tmp = ((PyObject*)p->__pyx___children);
|
|
p->__pyx___children = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyObject *__pyx_tp_getattro_19dependency_injector_9providers_Configuration(PyObject *o, PyObject *n) {
|
|
PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
|
|
if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
|
|
PyErr_Clear();
|
|
v = __pyx_pw_19dependency_injector_9providers_13Configuration_7__getattr__(o, n);
|
|
}
|
|
return v;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_Configuration[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_2__deepcopy__},
|
|
{"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_7__getattr__, METH_O|METH_COEXIST, __pyx_doc_19dependency_injector_9providers_13Configuration_6__getattr__},
|
|
{"get_name", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_9get_name, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_8get_name},
|
|
{"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_11override, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_10override},
|
|
{"reset_last_overriding", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_13reset_last_overriding, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_12reset_last_overriding},
|
|
{"reset_override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_15reset_override, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13Configuration_14reset_override},
|
|
{"update", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_17update, METH_O, __pyx_doc_19dependency_injector_9providers_13Configuration_16update},
|
|
{"_create_children", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_19_create_children, METH_O, 0},
|
|
{"_get_child_full_name", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_21_get_child_full_name, METH_O, 0},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_23__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13Configuration_25__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_Configuration = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.Configuration", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_Configuration), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Configuration, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_6Object_7__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_13Configuration_5__str__, /*tp_str*/
|
|
__pyx_tp_getattro_19dependency_injector_9providers_Configuration, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Configuration provider.\n\n Configuration provider helps with implementing late static binding of\n configuration options - use first, define later.\n\n .. code-block:: python\n\n config = Configuration('config')\n\n print(config.section1.option1()) # None\n print(config.section1.option2()) # None\n\n config.override({'section1': {'option1': 1,\n 'option2': 2}})\n\n print(config.section1.option1()) # 1\n print(config.section1.option2()) # 2\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Configuration, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Configuration, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_Configuration, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_13Configuration_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_Configuration, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Factory __pyx_vtable_19dependency_injector_9providers_Factory;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Factory(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Provider(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)o);
|
|
p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_Factory;
|
|
p->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Callable *)Py_None); Py_INCREF(Py_None);
|
|
p->__pyx___attributes = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_Factory(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory *p = (struct __pyx_obj_19dependency_injector_9providers_Factory *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___instantiator);
|
|
Py_CLEAR(p->__pyx___attributes);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Provider(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_Factory(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory *p = (struct __pyx_obj_19dependency_injector_9providers_Factory *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e;
|
|
if (p->__pyx___instantiator) {
|
|
e = (*v)(((PyObject *)p->__pyx___instantiator), a); if (e) return e;
|
|
}
|
|
if (p->__pyx___attributes) {
|
|
e = (*v)(p->__pyx___attributes, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_Factory(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_Factory *p = (struct __pyx_obj_19dependency_injector_9providers_Factory *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Provider(o);
|
|
tmp = ((PyObject*)p->__pyx___instantiator);
|
|
p->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Callable *)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
tmp = ((PyObject*)p->__pyx___attributes);
|
|
p->__pyx___attributes = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_7Factory_cls(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_7Factory_3cls_1__get__(o);
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_7Factory_args(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_7Factory_4args_1__get__(o);
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_7Factory_kwargs(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_7Factory_6kwargs_1__get__(o);
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_7Factory_attributes(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_7Factory_10attributes_1__get__(o);
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_Factory[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_7Factory_2__deepcopy__},
|
|
{"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_7add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_6add_args},
|
|
{"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_9set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_8set_args},
|
|
{"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_11clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_7Factory_10clear_args},
|
|
{"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_13add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_12add_kwargs},
|
|
{"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_15set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_14set_kwargs},
|
|
{"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_17clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_7Factory_16clear_kwargs},
|
|
{"add_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_19add_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_18add_attributes},
|
|
{"set_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_21set_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_20set_attributes},
|
|
{"clear_attributes", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_23clear_attributes, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_7Factory_22clear_attributes},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_7Factory_25_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_7Factory_24_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_27__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7Factory_29__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_Factory[] = {
|
|
{(char *)"cls", __pyx_getprop_19dependency_injector_9providers_7Factory_cls, 0, (char *)"Return provided type.", 0},
|
|
{(char *)"args", __pyx_getprop_19dependency_injector_9providers_7Factory_args, 0, (char *)"Return positional argument injections.", 0},
|
|
{(char *)"kwargs", __pyx_getprop_19dependency_injector_9providers_7Factory_kwargs, 0, (char *)"Return keyword argument injections.", 0},
|
|
{(char *)"attributes", __pyx_getprop_19dependency_injector_9providers_7Factory_attributes, 0, (char *)"Return attribute injections.", 0},
|
|
{0, 0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_Factory = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.Factory", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_Factory), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Factory, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_7Factory_5__str__, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Factory provider creates new instance on every call.\n\n :py:class:`Factory` supports positional & keyword argument injections,\n as well as attribute injections.\n\n Positional and keyword argument injections could be defined like this:\n\n .. code-block:: python\n\n factory = Factory(SomeClass,\n 'positional_arg1', 'positional_arg2',\n keyword_argument1=3, keyword_argument=4)\n\n # or\n\n factory = Factory(SomeClass) \\\n .add_args('positional_arg1', 'positional_arg2') \\\n .add_kwargs(keyword_argument1=3, keyword_argument=4)\n\n # or\n\n factory = Factory(SomeClass)\n factory.add_args('positional_arg1', 'positional_arg2')\n factory.add_kwargs(keyword_argument1=3, keyword_argument=4)\n\n\n Attribute injections are defined by using\n :py:meth:`Factory.add_attributes`:\n\n .. code-block:: python\n\n factory = Factory(SomeClass) \\\n .add_attributes(attribute1=1, attribute2=2)\n\n Retrieving of provided instance can be performed via calling\n :py:class:`Factory` object:\n\n .. code-block:: python\n\n factory = Factory(SomeClass)\n some_object = factory()\n\n .. py:attribute:: provided_type\n\n If provided type is defined, provider checks that providing class is\n its subclass.\n\n :type: type | None\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Factory, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Factory, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_Factory, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
__pyx_getsets_19dependency_injector_9providers_Factory, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_7Factory_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_Factory, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory __pyx_vtable_19dependency_injector_9providers_DelegatedFactory;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedFactory(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Factory(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_DelegatedFactory[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16DelegatedFactory_1__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16DelegatedFactory_3__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_DelegatedFactory = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.DelegatedFactory", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Factory, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_7Factory_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Factory that is injected \"as is\".\n\n .. py:attribute:: provided_type\n\n If provided type is defined, provider checks that providing class is\n its subclass.\n\n :type: type | None\n\n .. py:attribute:: cls\n\n Class that provides object.\n Alias for :py:attr:`provides`.\n\n :type: type\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Factory, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Factory, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_DelegatedFactory, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_7Factory_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_DelegatedFactory, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory __pyx_vtable_19dependency_injector_9providers_AbstractFactory;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_AbstractFactory(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Factory(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_AbstractFactory[] = {
|
|
{"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AbstractFactory_3override, METH_O, __pyx_doc_19dependency_injector_9providers_15AbstractFactory_2override},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_15AbstractFactory_5_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_15AbstractFactory_4_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AbstractFactory_7__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15AbstractFactory_9__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_AbstractFactory = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.AbstractFactory", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Factory, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
__pyx_pw_19dependency_injector_9providers_15AbstractFactory_1__call__, /*tp_call*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_7Factory_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Abstract factory provider.\n\n :py:class:`AbstractFactory` is a :py:class:`Factory` provider that must\n be explicitly overridden before calling.\n\n Overriding of :py:class:`AbstractFactory` is possible only by another\n :py:class:`Factory` provider.\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Factory, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Factory, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_AbstractFactory, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_7Factory_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_AbstractFactory, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate __pyx_vtable_19dependency_injector_9providers_FactoryDelegate;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_FactoryDelegate(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Delegate(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_FactoryDelegate[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15FactoryDelegate_3__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_15FactoryDelegate_5__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_FactoryDelegate = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.FactoryDelegate", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Delegate, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_7__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Factory delegate injects delegating factory \"as is\".\n\n .. py:attribute:: provides\n\n Value that have to be provided.\n\n :type: object\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Delegate, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Delegate, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_FactoryDelegate, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_15FactoryDelegate_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_FactoryDelegate, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate __pyx_vtable_19dependency_injector_9providers_FactoryAggregate;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_FactoryAggregate(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Provider(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)o);
|
|
p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate;
|
|
p->__pyx___factories = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_FactoryAggregate(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *p = (struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___factories);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Provider(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_FactoryAggregate(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *p = (struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e;
|
|
if (p->__pyx___factories) {
|
|
e = (*v)(p->__pyx___factories, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_FactoryAggregate(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *p = (struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Provider(o);
|
|
tmp = ((PyObject*)p->__pyx___factories);
|
|
p->__pyx___factories = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyObject *__pyx_tp_getattro_19dependency_injector_9providers_FactoryAggregate(PyObject *o, PyObject *n) {
|
|
PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
|
|
if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
|
|
PyErr_Clear();
|
|
v = __pyx_pw_19dependency_injector_9providers_16FactoryAggregate_7__getattr__(o, n);
|
|
}
|
|
return v;
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_16FactoryAggregate_factories(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9factories_1__get__(o);
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_FactoryAggregate[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_2__deepcopy__},
|
|
{"__getattr__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_7__getattr__, METH_O|METH_COEXIST, __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_6__getattr__},
|
|
{"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_11override, METH_O, __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_10override},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_13__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_15__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_FactoryAggregate[] = {
|
|
{(char *)"factories", __pyx_getprop_19dependency_injector_9providers_16FactoryAggregate_factories, 0, (char *)"Return dictionary of factories, read-only.", 0},
|
|
{0, 0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_FactoryAggregate = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.FactoryAggregate", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_FactoryAggregate, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_5__call__, /*tp_call*/
|
|
__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_9__str__, /*tp_str*/
|
|
__pyx_tp_getattro_19dependency_injector_9providers_FactoryAggregate, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Factory providers aggregate.\n\n :py:class:`FactoryAggregate` is an aggregate of :py:class:`Factory`\n providers.\n\n :py:class:`FactoryAggregate` is a delegated provider, meaning that it is\n injected \"as is\".\n\n All aggregated factories could be retrieved as a read-only\n dictionary :py:attr:`FactoryAggregate.factories` or just as an attribute of\n :py:class:`FactoryAggregate`.\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_FactoryAggregate, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_FactoryAggregate, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_FactoryAggregate, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
__pyx_getsets_19dependency_injector_9providers_FactoryAggregate, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_16FactoryAggregate_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_FactoryAggregate, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_vtable_19dependency_injector_9providers_BaseSingleton;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_BaseSingleton(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Provider(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)o);
|
|
p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton;
|
|
p->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)Py_None); Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_BaseSingleton(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *p = (struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___instantiator);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Provider(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_BaseSingleton(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *p = (struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e;
|
|
if (p->__pyx___instantiator) {
|
|
e = (*v)(((PyObject *)p->__pyx___instantiator), a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_BaseSingleton(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *p = (struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Provider(o);
|
|
tmp = ((PyObject*)p->__pyx___instantiator);
|
|
p->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_13BaseSingleton_cls(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_13BaseSingleton_3cls_1__get__(o);
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_13BaseSingleton_args(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_13BaseSingleton_4args_1__get__(o);
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_13BaseSingleton_kwargs(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_13BaseSingleton_6kwargs_1__get__(o);
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_13BaseSingleton_attributes(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_13BaseSingleton_10attributes_1__get__(o);
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_BaseSingleton[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_5__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_4__deepcopy__},
|
|
{"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_7add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_6add_args},
|
|
{"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_9set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_8set_args},
|
|
{"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_11clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_10clear_args},
|
|
{"add_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_13add_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_12add_kwargs},
|
|
{"set_kwargs", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_15set_kwargs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_14set_kwargs},
|
|
{"clear_kwargs", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_17clear_kwargs, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_16clear_kwargs},
|
|
{"add_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_19add_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_18add_attributes},
|
|
{"set_attributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_21set_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_20set_attributes},
|
|
{"clear_attributes", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_23clear_attributes, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_22clear_attributes},
|
|
{"reset", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_25reset, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_13BaseSingleton_24reset},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_27__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_13BaseSingleton_29__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_BaseSingleton[] = {
|
|
{(char *)"cls", __pyx_getprop_19dependency_injector_9providers_13BaseSingleton_cls, 0, (char *)"Return provided type.", 0},
|
|
{(char *)"args", __pyx_getprop_19dependency_injector_9providers_13BaseSingleton_args, 0, (char *)"Return positional argument injections.", 0},
|
|
{(char *)"kwargs", __pyx_getprop_19dependency_injector_9providers_13BaseSingleton_kwargs, 0, (char *)"Return keyword argument injections.", 0},
|
|
{(char *)"attributes", __pyx_getprop_19dependency_injector_9providers_13BaseSingleton_attributes, 0, (char *)"Return attribute injections.", 0},
|
|
{0, 0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_BaseSingleton = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.BaseSingleton", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_BaseSingleton, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3__str__, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Base class of singleton providers.", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_BaseSingleton, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_BaseSingleton, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_BaseSingleton, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
__pyx_getsets_19dependency_injector_9providers_BaseSingleton, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_BaseSingleton, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton __pyx_vtable_19dependency_injector_9providers_Singleton;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Singleton(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Singleton *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_BaseSingleton(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_Singleton *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_Singleton;
|
|
p->__pyx___storage = Py_None; Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_Singleton(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Singleton *p = (struct __pyx_obj_19dependency_injector_9providers_Singleton *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___storage);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_BaseSingleton(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_Singleton(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_Singleton *p = (struct __pyx_obj_19dependency_injector_9providers_Singleton *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_BaseSingleton(o, v, a); if (e) return e;
|
|
if (p->__pyx___storage) {
|
|
e = (*v)(p->__pyx___storage, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_Singleton(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_Singleton *p = (struct __pyx_obj_19dependency_injector_9providers_Singleton *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_BaseSingleton(o);
|
|
tmp = ((PyObject*)p->__pyx___storage);
|
|
p->__pyx___storage = Py_None; Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_Singleton[] = {
|
|
{"reset", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9Singleton_3reset, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_9Singleton_2reset},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_9Singleton_4_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9Singleton_7__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9Singleton_9__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_Singleton = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.Singleton", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_Singleton), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Singleton, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Singleton provider returns same instance on every call.\n\n :py:class:`Singleton` provider creates instance once and returns it on\n every call. :py:class:`Singleton` extends :py:class:`Factory`, so, please\n follow :py:class:`Factory` documentation for getting familiar with\n injections syntax.\n\n Retrieving of provided instance can be performed via calling\n :py:class:`Singleton` object:\n\n .. code-block:: python\n\n singleton = Singleton(SomeClass)\n some_object = singleton()\n\n .. py:attribute:: provided_type\n\n If provided type is defined, provider checks that providing class is\n its subclass.\n\n :type: type | None\n\n .. py:attribute:: cls\n\n Class that provides object.\n Alias for :py:attr:`provides`.\n\n :type: type\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Singleton, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Singleton, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_Singleton, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_9Singleton_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_Singleton, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton __pyx_vtable_19dependency_injector_9providers_DelegatedSingleton;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedSingleton(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Singleton(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_DelegatedSingleton[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_18DelegatedSingleton_1__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_18DelegatedSingleton_3__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_DelegatedSingleton = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.DelegatedSingleton", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Singleton, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Delegated singleton is injected \"as is\".\n\n .. py:attribute:: provided_type\n\n If provided type is defined, provider checks that providing class is\n its subclass.\n\n :type: type | None\n\n .. py:attribute:: cls\n\n Class that provides object.\n Alias for :py:attr:`provides`.\n\n :type: type\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Singleton, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Singleton, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_DelegatedSingleton, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_9Singleton_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_DelegatedSingleton, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton __pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_ThreadSafeSingleton(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_BaseSingleton(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton;
|
|
p->__pyx___storage = Py_None; Py_INCREF(Py_None);
|
|
p->__pyx___storage_lock = Py_None; Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_ThreadSafeSingleton(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *p = (struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___storage);
|
|
Py_CLEAR(p->__pyx___storage_lock);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_BaseSingleton(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_ThreadSafeSingleton(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *p = (struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_BaseSingleton(o, v, a); if (e) return e;
|
|
if (p->__pyx___storage) {
|
|
e = (*v)(p->__pyx___storage, a); if (e) return e;
|
|
}
|
|
if (p->__pyx___storage_lock) {
|
|
e = (*v)(p->__pyx___storage_lock, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_ThreadSafeSingleton(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *p = (struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_BaseSingleton(o);
|
|
tmp = ((PyObject*)p->__pyx___storage);
|
|
p->__pyx___storage = Py_None; Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
tmp = ((PyObject*)p->__pyx___storage_lock);
|
|
p->__pyx___storage_lock = Py_None; Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_ThreadSafeSingleton[] = {
|
|
{"reset", (PyCFunction)__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_3reset, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_19ThreadSafeSingleton_2reset},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_5_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_19ThreadSafeSingleton_4_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_7__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_9__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_ThreadSafeSingleton = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.ThreadSafeSingleton", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_ThreadSafeSingleton, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Thread-safe singleton provider.", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_ThreadSafeSingleton, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_ThreadSafeSingleton, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_ThreadSafeSingleton, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_ThreadSafeSingleton, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton __pyx_vtable_19dependency_injector_9providers_DelegatedThreadSafeSingleton;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedThreadSafeSingleton(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_ThreadSafeSingleton(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_DelegatedThreadSafeSingleton[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_28DelegatedThreadSafeSingleton_1__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_28DelegatedThreadSafeSingleton_3__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.DelegatedThreadSafeSingleton", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_ThreadSafeSingleton, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Delegated thread-safe singleton is injected \"as is\".\n\n .. py:attribute:: provided_type\n\n If provided type is defined, provider checks that providing class is\n its subclass.\n\n :type: type | None\n\n .. py:attribute:: cls\n\n Class that provides object.\n Alias for :py:attr:`provides`.\n\n :type: type\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_ThreadSafeSingleton, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_ThreadSafeSingleton, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_DelegatedThreadSafeSingleton, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_DelegatedThreadSafeSingleton, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton __pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_ThreadLocalSingleton(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_BaseSingleton(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton;
|
|
p->__pyx___storage = Py_None; Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_ThreadLocalSingleton(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *p = (struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___storage);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_BaseSingleton(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_ThreadLocalSingleton(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *p = (struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_BaseSingleton(o, v, a); if (e) return e;
|
|
if (p->__pyx___storage) {
|
|
e = (*v)(p->__pyx___storage, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_ThreadLocalSingleton(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *p = (struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_BaseSingleton(o);
|
|
tmp = ((PyObject*)p->__pyx___storage);
|
|
p->__pyx___storage = Py_None; Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_ThreadLocalSingleton[] = {
|
|
{"reset", (PyCFunction)__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_3reset, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_20ThreadLocalSingleton_2reset},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_5_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_20ThreadLocalSingleton_4_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_7__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_9__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_ThreadLocalSingleton = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.ThreadLocalSingleton", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_ThreadLocalSingleton, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Thread-local singleton provides single objects in scope of thread.\n\n .. py:attribute:: provided_type\n\n If provided type is defined, provider checks that providing class is\n its subclass.\n\n :type: type | None\n\n .. py:attribute:: cls\n\n Class that provides object.\n Alias for :py:attr:`provides`.\n\n :type: type\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_ThreadLocalSingleton, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_ThreadLocalSingleton, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_ThreadLocalSingleton, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_ThreadLocalSingleton, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton __pyx_vtable_19dependency_injector_9providers_DelegatedThreadLocalSingleton;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedThreadLocalSingleton(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_ThreadLocalSingleton(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_DelegatedThreadLocalSingleton[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_29DelegatedThreadLocalSingleton_1__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_29DelegatedThreadLocalSingleton_3__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.DelegatedThreadLocalSingleton", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_ThreadLocalSingleton, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Delegated thread-local singleton is injected \"as is\".\n\n .. py:attribute:: provided_type\n\n If provided type is defined, provider checks that providing class is\n its subclass.\n\n :type: type | None\n\n .. py:attribute:: cls\n\n Class that provides object.\n Alias for :py:attr:`provides`.\n\n :type: type\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_ThreadLocalSingleton, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_ThreadLocalSingleton, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_DelegatedThreadLocalSingleton, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_DelegatedThreadLocalSingleton, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton __pyx_vtable_19dependency_injector_9providers_AbstractSingleton;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_AbstractSingleton(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_BaseSingleton(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_AbstractSingleton[] = {
|
|
{"override", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_3override, METH_O, __pyx_doc_19dependency_injector_9providers_17AbstractSingleton_2override},
|
|
{"reset", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_5reset, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_17AbstractSingleton_4reset},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_7__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_9__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_AbstractSingleton = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.AbstractSingleton", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_BaseSingleton, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
__pyx_pw_19dependency_injector_9providers_17AbstractSingleton_1__call__, /*tp_call*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_13BaseSingleton_3__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Abstract singleton provider.\n\n :py:class:`AbstractSingleton` is a :py:class:`Singleton` provider that must\n be explicitly overridden before calling.\n\n Overriding of :py:class:`AbstractSingleton` is possible only by another\n :py:class:`BaseSingleton` provider.\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_BaseSingleton, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_BaseSingleton, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_AbstractSingleton, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__, /*tp_init*/
|
|
#else
|
|
0, /*tp_init*/
|
|
#endif
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_AbstractSingleton, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate __pyx_vtable_19dependency_injector_9providers_SingletonDelegate;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_SingletonDelegate(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Delegate(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate *)o);
|
|
p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_SingletonDelegate[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17SingletonDelegate_3__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_17SingletonDelegate_5__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_SingletonDelegate = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.SingletonDelegate", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Delegate, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_7__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Delegate_5__str__, /*tp_str*/
|
|
#else
|
|
0, /*tp_str*/
|
|
#endif
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Singleton delegate injects delegating singleton \"as is\".\n\n .. py:attribute:: provides\n\n Value that have to be provided.\n\n :type: object\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Delegate, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Delegate, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_SingletonDelegate, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_17SingletonDelegate_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_SingletonDelegate, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
static struct __pyx_vtabstruct_19dependency_injector_9providers_List __pyx_vtable_19dependency_injector_9providers_List;
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_List(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_List *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Provider(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_List *)o);
|
|
p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_List;
|
|
p->__pyx___args = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_List(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_List *p = (struct __pyx_obj_19dependency_injector_9providers_List *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___args);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Provider(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_List(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_List *p = (struct __pyx_obj_19dependency_injector_9providers_List *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Provider(o, v, a); if (e) return e;
|
|
if (p->__pyx___args) {
|
|
e = (*v)(p->__pyx___args, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_List(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_List *p = (struct __pyx_obj_19dependency_injector_9providers_List *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Provider(o);
|
|
tmp = ((PyObject*)p->__pyx___args);
|
|
p->__pyx___args = ((PyObject*)Py_None); Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyObject *__pyx_getprop_19dependency_injector_9providers_4List_args(PyObject *o, CYTHON_UNUSED void *x) {
|
|
return __pyx_pw_19dependency_injector_9providers_4List_4args_1__get__(o);
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_List[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_4List_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_4List_2__deepcopy__},
|
|
{"add_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_4List_7add_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_4List_6add_args},
|
|
{"set_args", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_4List_9set_args, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_4List_8set_args},
|
|
{"clear_args", (PyCFunction)__pyx_pw_19dependency_injector_9providers_4List_11clear_args, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_4List_10clear_args},
|
|
{"_provide", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_4List_13_provide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_4List_12_provide},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_4List_15__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_4List_17__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static struct PyGetSetDef __pyx_getsets_19dependency_injector_9providers_List[] = {
|
|
{(char *)"args", __pyx_getprop_19dependency_injector_9providers_4List_args, 0, (char *)"Return positional argument injections.", 0},
|
|
{0, 0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_List = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.List", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_List), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_List, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_9__repr__, /*tp_repr*/
|
|
#else
|
|
0, /*tp_repr*/
|
|
#endif
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
__pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/
|
|
#else
|
|
0, /*tp_call*/
|
|
#endif
|
|
__pyx_pw_19dependency_injector_9providers_4List_5__str__, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"List provider provides a list of values.\n\n :py:class:`List` provider is needed for injecting a list of dependencies. It handles\n positional argument injections the same way as :py:class:`Factory` provider.\n\n Keyword argument injections are not supported.\n\n .. code-block:: python\n\n dispatcher_factory = Factory(\n Dispatcher,\n modules=List(\n Factory(ModuleA, dependency_a),\n Factory(ModuleB, dependency_b),\n ),\n )\n\n dispatcher = dispatcher_factory()\n\n # is equivalent to:\n\n dispatcher = Dispatcher(\n modules=[\n ModuleA(dependency_a),\n ModuleB(dependency_b),\n ],\n )\n ", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_List, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_List, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_List, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
__pyx_getsets_19dependency_injector_9providers_List, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_4List_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_List, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_Injection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Injection *p;
|
|
PyObject *o;
|
|
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
|
|
o = (*t->tp_alloc)(t, 0);
|
|
} else {
|
|
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
|
|
}
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_Injection *)o);
|
|
p->__pyx___value = Py_None; Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_Injection(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_Injection *p = (struct __pyx_obj_19dependency_injector_9providers_Injection *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___value);
|
|
(*Py_TYPE(o)->tp_free)(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_Injection(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_Injection *p = (struct __pyx_obj_19dependency_injector_9providers_Injection *)o;
|
|
if (p->__pyx___value) {
|
|
e = (*v)(p->__pyx___value, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_Injection(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_Injection *p = (struct __pyx_obj_19dependency_injector_9providers_Injection *)o;
|
|
tmp = ((PyObject*)p->__pyx___value);
|
|
p->__pyx___value = Py_None; Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_Injection[] = {
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9Injection_1__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9Injection_3__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_Injection = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.Injection", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_Injection), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Injection, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
0, /*tp_repr*/
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
0, /*tp_call*/
|
|
0, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Abstract injection class.", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Injection, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Injection, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_Injection, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
0, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_Injection, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_PositionalInjection(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Injection(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
return o;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_PositionalInjection[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_19PositionalInjection_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_19PositionalInjection_2__deepcopy__},
|
|
{"get_value", (PyCFunction)__pyx_pw_19dependency_injector_9providers_19PositionalInjection_5get_value, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_19PositionalInjection_4get_value},
|
|
{"get_original_value", (PyCFunction)__pyx_pw_19dependency_injector_9providers_19PositionalInjection_7get_original_value, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_19PositionalInjection_6get_original_value},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_19PositionalInjection_9__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_19PositionalInjection_11__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_PositionalInjection = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.PositionalInjection", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Injection, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
0, /*tp_repr*/
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
0, /*tp_call*/
|
|
0, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Positional injection class.", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_Injection, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_Injection, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_PositionalInjection, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_19PositionalInjection_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_PositionalInjection, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
|
|
static PyObject *__pyx_tp_new_19dependency_injector_9providers_NamedInjection(PyTypeObject *t, PyObject *a, PyObject *k) {
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection *p;
|
|
PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Injection(t, a, k);
|
|
if (unlikely(!o)) return 0;
|
|
p = ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)o);
|
|
p->__pyx___name = Py_None; Py_INCREF(Py_None);
|
|
return o;
|
|
}
|
|
|
|
static void __pyx_tp_dealloc_19dependency_injector_9providers_NamedInjection(PyObject *o) {
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection *p = (struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)o;
|
|
#if CYTHON_USE_TP_FINALIZE
|
|
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
|
|
if (PyObject_CallFinalizerFromDealloc(o)) return;
|
|
}
|
|
#endif
|
|
PyObject_GC_UnTrack(o);
|
|
Py_CLEAR(p->__pyx___name);
|
|
PyObject_GC_Track(o);
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_Injection(o);
|
|
}
|
|
|
|
static int __pyx_tp_traverse_19dependency_injector_9providers_NamedInjection(PyObject *o, visitproc v, void *a) {
|
|
int e;
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection *p = (struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)o;
|
|
e = __pyx_tp_traverse_19dependency_injector_9providers_Injection(o, v, a); if (e) return e;
|
|
if (p->__pyx___name) {
|
|
e = (*v)(p->__pyx___name, a); if (e) return e;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int __pyx_tp_clear_19dependency_injector_9providers_NamedInjection(PyObject *o) {
|
|
PyObject* tmp;
|
|
struct __pyx_obj_19dependency_injector_9providers_NamedInjection *p = (struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)o;
|
|
__pyx_tp_clear_19dependency_injector_9providers_Injection(o);
|
|
tmp = ((PyObject*)p->__pyx___name);
|
|
p->__pyx___name = Py_None; Py_INCREF(Py_None);
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
|
|
static PyMethodDef __pyx_methods_19dependency_injector_9providers_NamedInjection[] = {
|
|
{"__deepcopy__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_14NamedInjection_3__deepcopy__, METH_O, __pyx_doc_19dependency_injector_9providers_14NamedInjection_2__deepcopy__},
|
|
{"get_name", (PyCFunction)__pyx_pw_19dependency_injector_9providers_14NamedInjection_5get_name, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_14NamedInjection_4get_name},
|
|
{"get_value", (PyCFunction)__pyx_pw_19dependency_injector_9providers_14NamedInjection_7get_value, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_14NamedInjection_6get_value},
|
|
{"get_original_value", (PyCFunction)__pyx_pw_19dependency_injector_9providers_14NamedInjection_9get_original_value, METH_NOARGS, __pyx_doc_19dependency_injector_9providers_14NamedInjection_8get_original_value},
|
|
{"__reduce_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_14NamedInjection_11__reduce_cython__, METH_NOARGS, 0},
|
|
{"__setstate_cython__", (PyCFunction)__pyx_pw_19dependency_injector_9providers_14NamedInjection_13__setstate_cython__, METH_O, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static PyTypeObject __pyx_type_19dependency_injector_9providers_NamedInjection = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"dependency_injector.providers.NamedInjection", /*tp_name*/
|
|
sizeof(struct __pyx_obj_19dependency_injector_9providers_NamedInjection), /*tp_basicsize*/
|
|
0, /*tp_itemsize*/
|
|
__pyx_tp_dealloc_19dependency_injector_9providers_NamedInjection, /*tp_dealloc*/
|
|
#if PY_VERSION_HEX < 0x030800b4
|
|
0, /*tp_print*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4
|
|
0, /*tp_vectorcall_offset*/
|
|
#endif
|
|
0, /*tp_getattr*/
|
|
0, /*tp_setattr*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
0, /*tp_compare*/
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*tp_as_async*/
|
|
#endif
|
|
0, /*tp_repr*/
|
|
0, /*tp_as_number*/
|
|
0, /*tp_as_sequence*/
|
|
0, /*tp_as_mapping*/
|
|
0, /*tp_hash*/
|
|
0, /*tp_call*/
|
|
0, /*tp_str*/
|
|
0, /*tp_getattro*/
|
|
0, /*tp_setattro*/
|
|
0, /*tp_as_buffer*/
|
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
|
"Keyword injection class.", /*tp_doc*/
|
|
__pyx_tp_traverse_19dependency_injector_9providers_NamedInjection, /*tp_traverse*/
|
|
__pyx_tp_clear_19dependency_injector_9providers_NamedInjection, /*tp_clear*/
|
|
0, /*tp_richcompare*/
|
|
0, /*tp_weaklistoffset*/
|
|
0, /*tp_iter*/
|
|
0, /*tp_iternext*/
|
|
__pyx_methods_19dependency_injector_9providers_NamedInjection, /*tp_methods*/
|
|
0, /*tp_members*/
|
|
0, /*tp_getset*/
|
|
0, /*tp_base*/
|
|
0, /*tp_dict*/
|
|
0, /*tp_descr_get*/
|
|
0, /*tp_descr_set*/
|
|
0, /*tp_dictoffset*/
|
|
__pyx_pw_19dependency_injector_9providers_14NamedInjection_1__init__, /*tp_init*/
|
|
0, /*tp_alloc*/
|
|
__pyx_tp_new_19dependency_injector_9providers_NamedInjection, /*tp_new*/
|
|
0, /*tp_free*/
|
|
0, /*tp_is_gc*/
|
|
0, /*tp_bases*/
|
|
0, /*tp_mro*/
|
|
0, /*tp_cache*/
|
|
0, /*tp_subclasses*/
|
|
0, /*tp_weaklist*/
|
|
0, /*tp_del*/
|
|
0, /*tp_version_tag*/
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0, /*tp_finalize*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0, /*tp_vectorcall*/
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0, /*tp_print*/
|
|
#endif
|
|
};
|
|
|
|
static PyMethodDef __pyx_methods[] = {
|
|
{"parse_positional_injections", (PyCFunction)__pyx_pw_19dependency_injector_9providers_1parse_positional_injections, METH_O, __pyx_doc_19dependency_injector_9providers_parse_positional_injections},
|
|
{"parse_named_injections", (PyCFunction)__pyx_pw_19dependency_injector_9providers_3parse_named_injections, METH_O, __pyx_doc_19dependency_injector_9providers_2parse_named_injections},
|
|
{"is_provider", (PyCFunction)__pyx_pw_19dependency_injector_9providers_5is_provider, METH_O, __pyx_doc_19dependency_injector_9providers_4is_provider},
|
|
{"ensure_is_provider", (PyCFunction)__pyx_pw_19dependency_injector_9providers_7ensure_is_provider, METH_O, __pyx_doc_19dependency_injector_9providers_6ensure_is_provider},
|
|
{"is_delegated", (PyCFunction)__pyx_pw_19dependency_injector_9providers_9is_delegated, METH_O, __pyx_doc_19dependency_injector_9providers_8is_delegated},
|
|
{"represent_provider", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_11represent_provider, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_10represent_provider},
|
|
{"deepcopy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_9providers_13deepcopy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19dependency_injector_9providers_12deepcopy},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#if CYTHON_PEP489_MULTI_PHASE_INIT
|
|
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
|
|
static int __pyx_pymod_exec_providers(PyObject* module); /*proto*/
|
|
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
|
|
{Py_mod_create, (void*)__pyx_pymod_create},
|
|
{Py_mod_exec, (void*)__pyx_pymod_exec_providers},
|
|
{0, NULL}
|
|
};
|
|
#endif
|
|
|
|
static struct PyModuleDef __pyx_moduledef = {
|
|
PyModuleDef_HEAD_INIT,
|
|
"providers",
|
|
__pyx_k_Dependency_injector_providers_Po, /* m_doc */
|
|
#if CYTHON_PEP489_MULTI_PHASE_INIT
|
|
0, /* m_size */
|
|
#else
|
|
-1, /* m_size */
|
|
#endif
|
|
__pyx_methods /* m_methods */,
|
|
#if CYTHON_PEP489_MULTI_PHASE_INIT
|
|
__pyx_moduledef_slots, /* m_slots */
|
|
#else
|
|
NULL, /* m_reload */
|
|
#endif
|
|
NULL, /* m_traverse */
|
|
NULL, /* m_clear */
|
|
NULL /* m_free */
|
|
};
|
|
#endif
|
|
#ifndef CYTHON_SMALL_CODE
|
|
#if defined(__clang__)
|
|
#define CYTHON_SMALL_CODE
|
|
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
|
#define CYTHON_SMALL_CODE __attribute__((cold))
|
|
#else
|
|
#define CYTHON_SMALL_CODE
|
|
#endif
|
|
#endif
|
|
|
|
static __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|
{&__pyx_kp_s_0_can_aggregate_only_instances, __pyx_k_0_can_aggregate_only_instances, sizeof(__pyx_k_0_can_aggregate_only_instances), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_0_can_provide_only_1_instances, __pyx_k_0_can_provide_only_1_instances, sizeof(__pyx_k_0_can_provide_only_1_instances), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_k_0_can_wrap_only_1_providers, sizeof(__pyx_k_0_can_wrap_only_1_providers), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_0_does_not_contain_factory_with, __pyx_k_0_does_not_contain_factory_with, sizeof(__pyx_k_0_does_not_contain_factory_with), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_0_is_not_an, __pyx_k_0_is_not_an, sizeof(__pyx_k_0_is_not_an), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_k_0_must_be_overridden_before_cal, sizeof(__pyx_k_0_must_be_overridden_before_cal), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_k_0_must_be_overridden_only_by_1, sizeof(__pyx_k_0_must_be_overridden_only_by_1), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_0_providers_could_not_be_overri, __pyx_k_0_providers_could_not_be_overri, sizeof(__pyx_k_0_providers_could_not_be_overri), 0, 0, 1, 0},
|
|
{&__pyx_n_s_AbstractCallable, __pyx_k_AbstractCallable, sizeof(__pyx_k_AbstractCallable), 0, 0, 1, 1},
|
|
{&__pyx_n_s_AbstractCoroutine, __pyx_k_AbstractCoroutine, sizeof(__pyx_k_AbstractCoroutine), 0, 0, 1, 1},
|
|
{&__pyx_n_s_AbstractFactory, __pyx_k_AbstractFactory, sizeof(__pyx_k_AbstractFactory), 0, 0, 1, 1},
|
|
{&__pyx_n_s_AbstractSingleton, __pyx_k_AbstractSingleton, sizeof(__pyx_k_AbstractSingleton), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_Abstract_provider_forward_provid, __pyx_k_Abstract_provider_forward_provid, sizeof(__pyx_k_Abstract_provider_forward_provid), 0, 0, 1, 0},
|
|
{&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
|
|
{&__pyx_n_s_BaseSingleton, __pyx_k_BaseSingleton, sizeof(__pyx_k_BaseSingleton), 0, 0, 1, 1},
|
|
{&__pyx_n_s_CLASS_TYPES, __pyx_k_CLASS_TYPES, sizeof(__pyx_k_CLASS_TYPES), 0, 0, 1, 1},
|
|
{&__pyx_n_s_Callable, __pyx_k_Callable, sizeof(__pyx_k_Callable), 0, 0, 1, 1},
|
|
{&__pyx_n_s_CallableDelegate, __pyx_k_CallableDelegate, sizeof(__pyx_k_CallableDelegate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_ClassType, __pyx_k_ClassType, sizeof(__pyx_k_ClassType), 0, 0, 1, 1},
|
|
{&__pyx_n_s_Configuration, __pyx_k_Configuration, sizeof(__pyx_k_Configuration), 0, 0, 1, 1},
|
|
{&__pyx_n_s_Coroutine, __pyx_k_Coroutine, sizeof(__pyx_k_Coroutine), 0, 0, 1, 1},
|
|
{&__pyx_n_s_CoroutineDelegate, __pyx_k_CoroutineDelegate, sizeof(__pyx_k_CoroutineDelegate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_Delegate, __pyx_k_Delegate, sizeof(__pyx_k_Delegate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_DelegatedCallable, __pyx_k_DelegatedCallable, sizeof(__pyx_k_DelegatedCallable), 0, 0, 1, 1},
|
|
{&__pyx_n_s_DelegatedCoroutine, __pyx_k_DelegatedCoroutine, sizeof(__pyx_k_DelegatedCoroutine), 0, 0, 1, 1},
|
|
{&__pyx_n_s_DelegatedFactory, __pyx_k_DelegatedFactory, sizeof(__pyx_k_DelegatedFactory), 0, 0, 1, 1},
|
|
{&__pyx_n_s_DelegatedSingleton, __pyx_k_DelegatedSingleton, sizeof(__pyx_k_DelegatedSingleton), 0, 0, 1, 1},
|
|
{&__pyx_n_s_DelegatedThreadLocalSingleton, __pyx_k_DelegatedThreadLocalSingleton, sizeof(__pyx_k_DelegatedThreadLocalSingleton), 0, 0, 1, 1},
|
|
{&__pyx_n_s_DelegatedThreadSafeSingleton, __pyx_k_DelegatedThreadSafeSingleton, sizeof(__pyx_k_DelegatedThreadSafeSingleton), 0, 0, 1, 1},
|
|
{&__pyx_n_s_DependenciesContainer, __pyx_k_DependenciesContainer, sizeof(__pyx_k_DependenciesContainer), 0, 0, 1, 1},
|
|
{&__pyx_n_s_Dependency, __pyx_k_Dependency, sizeof(__pyx_k_Dependency), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_Dependency_is_not_defined, __pyx_k_Dependency_is_not_defined, sizeof(__pyx_k_Dependency_is_not_defined), 0, 0, 1, 0},
|
|
{&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_Expected_provider_instance_got_0, __pyx_k_Expected_provider_instance_got_0, sizeof(__pyx_k_Expected_provider_instance_got_0), 0, 0, 1, 0},
|
|
{&__pyx_n_s_ExternalDependency, __pyx_k_ExternalDependency, sizeof(__pyx_k_ExternalDependency), 0, 0, 1, 1},
|
|
{&__pyx_n_s_Factory, __pyx_k_Factory, sizeof(__pyx_k_Factory), 0, 0, 1, 1},
|
|
{&__pyx_n_s_FactoryAggregate, __pyx_k_FactoryAggregate, sizeof(__pyx_k_FactoryAggregate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_FactoryDelegate, __pyx_k_FactoryDelegate, sizeof(__pyx_k_FactoryDelegate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_IS_DELEGATED, __pyx_k_IS_DELEGATED, sizeof(__pyx_k_IS_DELEGATED), 0, 0, 1, 1},
|
|
{&__pyx_n_s_IS_PROVIDER, __pyx_k_IS_PROVIDER, sizeof(__pyx_k_IS_PROVIDER), 0, 0, 1, 1},
|
|
{&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0x03, __pyx_k_Incompatible_checksums_s_vs_0x03, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x03), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0x0c, __pyx_k_Incompatible_checksums_s_vs_0x0c, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x0c), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0x0f, __pyx_k_Incompatible_checksums_s_vs_0x0f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x0f), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0x20, __pyx_k_Incompatible_checksums_s_vs_0x20, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x20), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0x2e, __pyx_k_Incompatible_checksums_s_vs_0x2e, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x2e), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0x3f, __pyx_k_Incompatible_checksums_s_vs_0x3f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x3f), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0x63, __pyx_k_Incompatible_checksums_s_vs_0x63, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x63), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0x64, __pyx_k_Incompatible_checksums_s_vs_0x64, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x64), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0x76, __pyx_k_Incompatible_checksums_s_vs_0x76, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x76), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0xa5, __pyx_k_Incompatible_checksums_s_vs_0xa5, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xa5), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0xa6, __pyx_k_Incompatible_checksums_s_vs_0xa6, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xa6), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0xa7, __pyx_k_Incompatible_checksums_s_vs_0xa7, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xa7), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0xa7_2, __pyx_k_Incompatible_checksums_s_vs_0xa7_2, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xa7_2), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0xd8, __pyx_k_Incompatible_checksums_s_vs_0xd8, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd8), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Incompatible_checksums_s_vs_0xf1, __pyx_k_Incompatible_checksums_s_vs_0xf1, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xf1), 0, 0, 1, 0},
|
|
{&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
|
|
{&__pyx_n_s_Injection, __pyx_k_Injection, sizeof(__pyx_k_Injection), 0, 0, 1, 1},
|
|
{&__pyx_n_s_List, __pyx_k_List, sizeof(__pyx_k_List), 0, 0, 1, 1},
|
|
{&__pyx_n_s_MethodType, __pyx_k_MethodType, sizeof(__pyx_k_MethodType), 0, 0, 1, 1},
|
|
{&__pyx_n_s_NamedInjection, __pyx_k_NamedInjection, sizeof(__pyx_k_NamedInjection), 0, 0, 1, 1},
|
|
{&__pyx_n_s_NoSuchProviderError, __pyx_k_NoSuchProviderError, sizeof(__pyx_k_NoSuchProviderError), 0, 0, 1, 1},
|
|
{&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
|
|
{&__pyx_n_s_Object, __pyx_k_Object, sizeof(__pyx_k_Object), 0, 0, 1, 1},
|
|
{&__pyx_n_s_OverridingContext, __pyx_k_OverridingContext, sizeof(__pyx_k_OverridingContext), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_Package_asyncio_is_not_available, __pyx_k_Package_asyncio_is_not_available, sizeof(__pyx_k_Package_asyncio_is_not_available), 0, 0, 1, 0},
|
|
{&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
|
|
{&__pyx_n_s_PositionalInjection, __pyx_k_PositionalInjection, sizeof(__pyx_k_PositionalInjection), 0, 0, 1, 1},
|
|
{&__pyx_n_s_Provider, __pyx_k_Provider, sizeof(__pyx_k_Provider), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_Provider_0_could_not_be_overridd, __pyx_k_Provider_0_could_not_be_overridd, sizeof(__pyx_k_Provider_0_could_not_be_overridd), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Provider_0_expected_to_get_calla, __pyx_k_Provider_0_expected_to_get_calla, sizeof(__pyx_k_Provider_0_expected_to_get_calla), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Provider_0_expected_to_get_corou, __pyx_k_Provider_0_expected_to_get_corou, sizeof(__pyx_k_Provider_0_expected_to_get_corou), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_Provider_0_is_not_overridden, __pyx_k_Provider_0_is_not_overridden, sizeof(__pyx_k_Provider_0_is_not_overridden), 0, 0, 1, 0},
|
|
{&__pyx_n_s_RLock, __pyx_k_RLock, sizeof(__pyx_k_RLock), 0, 0, 1, 1},
|
|
{&__pyx_n_s_Singleton, __pyx_k_Singleton, sizeof(__pyx_k_Singleton), 0, 0, 1, 1},
|
|
{&__pyx_n_s_SingletonDelegate, __pyx_k_SingletonDelegate, sizeof(__pyx_k_SingletonDelegate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_ThreadLocalSingleton, __pyx_k_ThreadLocalSingleton, sizeof(__pyx_k_ThreadLocalSingleton), 0, 0, 1, 1},
|
|
{&__pyx_n_s_ThreadSafeSingleton, __pyx_k_ThreadSafeSingleton, sizeof(__pyx_k_ThreadSafeSingleton), 0, 0, 1, 1},
|
|
{&__pyx_n_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1},
|
|
{&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
|
|
{&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
|
|
{&__pyx_n_s_add_args, __pyx_k_add_args, sizeof(__pyx_k_add_args), 0, 0, 1, 1},
|
|
{&__pyx_n_s_add_attributes, __pyx_k_add_attributes, sizeof(__pyx_k_add_attributes), 0, 0, 1, 1},
|
|
{&__pyx_n_s_add_kwargs, __pyx_k_add_kwargs, sizeof(__pyx_k_add_kwargs), 0, 0, 1, 1},
|
|
{&__pyx_n_s_add_sys_streams, __pyx_k_add_sys_streams, sizeof(__pyx_k_add_sys_streams), 0, 0, 1, 1},
|
|
{&__pyx_n_s_address, __pyx_k_address, sizeof(__pyx_k_address), 0, 0, 1, 1},
|
|
{&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
|
|
{&__pyx_n_s_asyncio, __pyx_k_asyncio, sizeof(__pyx_k_asyncio), 0, 0, 1, 1},
|
|
{&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
|
|
{&__pyx_n_s_asyncio_tasks, __pyx_k_asyncio_tasks, sizeof(__pyx_k_asyncio_tasks), 0, 0, 1, 1},
|
|
{&__pyx_n_s_attribute_name, __pyx_k_attribute_name, sizeof(__pyx_k_attribute_name), 0, 0, 1, 1},
|
|
{&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
|
|
{&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
|
|
{&__pyx_n_s_callable, __pyx_k_callable, sizeof(__pyx_k_callable), 0, 0, 1, 1},
|
|
{&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
|
|
{&__pyx_n_s_clear_args, __pyx_k_clear_args, sizeof(__pyx_k_clear_args), 0, 0, 1, 1},
|
|
{&__pyx_n_s_clear_attributes, __pyx_k_clear_attributes, sizeof(__pyx_k_clear_attributes), 0, 0, 1, 1},
|
|
{&__pyx_n_s_clear_kwargs, __pyx_k_clear_kwargs, sizeof(__pyx_k_clear_kwargs), 0, 0, 1, 1},
|
|
{&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
|
|
{&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_k_cls_object_has_no_attribute_att, sizeof(__pyx_k_cls_object_has_no_attribute_att), 0, 0, 1, 0},
|
|
{&__pyx_n_s_copied, __pyx_k_copied, sizeof(__pyx_k_copied), 0, 0, 1, 1},
|
|
{&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
|
|
{&__pyx_n_s_copy_overridings, __pyx_k_copy_overridings, sizeof(__pyx_k_copy_overridings), 0, 0, 1, 1},
|
|
{&__pyx_n_s_coroutine, __pyx_k_coroutine, sizeof(__pyx_k_coroutine), 0, 0, 1, 1},
|
|
{&__pyx_n_s_coroutines, __pyx_k_coroutines, sizeof(__pyx_k_coroutines), 0, 0, 1, 1},
|
|
{&__pyx_n_s_create_children, __pyx_k_create_children, sizeof(__pyx_k_create_children), 0, 0, 1, 1},
|
|
{&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1},
|
|
{&__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_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_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
|
|
{&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
|
|
{&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
|
|
{&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
|
|
{&__pyx_n_s_factories, __pyx_k_factories, sizeof(__pyx_k_factories), 0, 0, 1, 1},
|
|
{&__pyx_n_s_factory, __pyx_k_factory, sizeof(__pyx_k_factory), 0, 0, 1, 1},
|
|
{&__pyx_n_s_factory_name, __pyx_k_factory_name, sizeof(__pyx_k_factory_name), 0, 0, 1, 1},
|
|
{&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
|
|
{&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
|
|
{&__pyx_n_s_get_child_full_name, __pyx_k_get_child_full_name, sizeof(__pyx_k_get_child_full_name), 0, 0, 1, 1},
|
|
{&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1},
|
|
{&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
|
|
{&__pyx_n_s_im_class, __pyx_k_im_class, sizeof(__pyx_k_im_class), 0, 0, 1, 1},
|
|
{&__pyx_n_s_im_func, __pyx_k_im_func, sizeof(__pyx_k_im_func), 0, 0, 1, 1},
|
|
{&__pyx_n_s_im_self, __pyx_k_im_self, sizeof(__pyx_k_im_self), 0, 0, 1, 1},
|
|
{&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
|
|
{&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
|
|
{&__pyx_n_s_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 0, 0, 1, 1},
|
|
{&__pyx_n_s_instance, __pyx_k_instance, sizeof(__pyx_k_instance), 0, 0, 1, 1},
|
|
{&__pyx_n_s_instance_of, __pyx_k_instance_of, sizeof(__pyx_k_instance_of), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_instance_of_0, __pyx_k_instance_of_0, sizeof(__pyx_k_instance_of_0), 0, 0, 1, 0},
|
|
{&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
|
|
{&__pyx_n_s_is_coroutine_marker, __pyx_k_is_coroutine_marker, sizeof(__pyx_k_is_coroutine_marker), 0, 0, 1, 1},
|
|
{&__pyx_n_s_iscoroutinefunction, __pyx_k_iscoroutinefunction, sizeof(__pyx_k_iscoroutinefunction), 0, 0, 1, 1},
|
|
{&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
|
|
{&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
|
|
{&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
|
|
{&__pyx_n_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 1},
|
|
{&__pyx_n_s_last_overriding, __pyx_k_last_overriding, sizeof(__pyx_k_last_overriding), 0, 0, 1, 1},
|
|
{&__pyx_n_s_local, __pyx_k_local, sizeof(__pyx_k_local), 0, 0, 1, 1},
|
|
{&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
|
|
{&__pyx_n_s_memo, __pyx_k_memo, sizeof(__pyx_k_memo), 0, 0, 1, 1},
|
|
{&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
|
|
{&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
|
|
{&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
|
|
{&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
|
|
{&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
|
|
{&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
|
|
{&__pyx_n_s_overridden, __pyx_k_overridden, sizeof(__pyx_k_overridden), 0, 0, 1, 1},
|
|
{&__pyx_n_s_override, __pyx_k_override, sizeof(__pyx_k_override), 0, 0, 1, 1},
|
|
{&__pyx_n_s_override_providers, __pyx_k_override_providers, sizeof(__pyx_k_override_providers), 0, 0, 1, 1},
|
|
{&__pyx_n_s_overriding, __pyx_k_overriding, sizeof(__pyx_k_overriding), 0, 0, 1, 1},
|
|
{&__pyx_n_s_overriding_lock, __pyx_k_overriding_lock, sizeof(__pyx_k_overriding_lock), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
|
|
{&__pyx_n_s_provide, __pyx_k_provide, sizeof(__pyx_k_provide), 0, 0, 1, 1},
|
|
{&__pyx_n_s_provided_type, __pyx_k_provided_type, sizeof(__pyx_k_provided_type), 0, 0, 1, 1},
|
|
{&__pyx_n_s_provider, __pyx_k_provider, sizeof(__pyx_k_provider), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_provider_provides_at_address, __pyx_k_provider_provides_at_address, sizeof(__pyx_k_provider_provides_at_address), 0, 0, 1, 0},
|
|
{&__pyx_n_s_providers, __pyx_k_providers, sizeof(__pyx_k_providers), 0, 0, 1, 1},
|
|
{&__pyx_n_s_provides, __pyx_k_provides, sizeof(__pyx_k_provides), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_capi, __pyx_k_pyx_capi, sizeof(__pyx_k_pyx_capi), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_AbstractCallable, __pyx_k_pyx_unpickle_AbstractCallable, sizeof(__pyx_k_pyx_unpickle_AbstractCallable), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_AbstractCoroutine, __pyx_k_pyx_unpickle_AbstractCoroutine, sizeof(__pyx_k_pyx_unpickle_AbstractCoroutine), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_AbstractFactory, __pyx_k_pyx_unpickle_AbstractFactory, sizeof(__pyx_k_pyx_unpickle_AbstractFactory), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_AbstractSingleton, __pyx_k_pyx_unpickle_AbstractSingleton, sizeof(__pyx_k_pyx_unpickle_AbstractSingleton), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_BaseSingleton, __pyx_k_pyx_unpickle_BaseSingleton, sizeof(__pyx_k_pyx_unpickle_BaseSingleton), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_Callable, __pyx_k_pyx_unpickle_Callable, sizeof(__pyx_k_pyx_unpickle_Callable), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_CallableDelegate, __pyx_k_pyx_unpickle_CallableDelegate, sizeof(__pyx_k_pyx_unpickle_CallableDelegate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_Configuration, __pyx_k_pyx_unpickle_Configuration, sizeof(__pyx_k_pyx_unpickle_Configuration), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_Coroutine, __pyx_k_pyx_unpickle_Coroutine, sizeof(__pyx_k_pyx_unpickle_Coroutine), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_CoroutineDelegate, __pyx_k_pyx_unpickle_CoroutineDelegate, sizeof(__pyx_k_pyx_unpickle_CoroutineDelegate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_Delegate, __pyx_k_pyx_unpickle_Delegate, sizeof(__pyx_k_pyx_unpickle_Delegate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_DelegatedCallable, __pyx_k_pyx_unpickle_DelegatedCallable, sizeof(__pyx_k_pyx_unpickle_DelegatedCallable), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_DelegatedCoroutin, __pyx_k_pyx_unpickle_DelegatedCoroutin, sizeof(__pyx_k_pyx_unpickle_DelegatedCoroutin), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_DelegatedFactory, __pyx_k_pyx_unpickle_DelegatedFactory, sizeof(__pyx_k_pyx_unpickle_DelegatedFactory), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_DelegatedSingleto, __pyx_k_pyx_unpickle_DelegatedSingleto, sizeof(__pyx_k_pyx_unpickle_DelegatedSingleto), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_DelegatedThreadLo, __pyx_k_pyx_unpickle_DelegatedThreadLo, sizeof(__pyx_k_pyx_unpickle_DelegatedThreadLo), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_DelegatedThreadSa, __pyx_k_pyx_unpickle_DelegatedThreadSa, sizeof(__pyx_k_pyx_unpickle_DelegatedThreadSa), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_DependenciesConta, __pyx_k_pyx_unpickle_DependenciesConta, sizeof(__pyx_k_pyx_unpickle_DependenciesConta), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_Dependency, __pyx_k_pyx_unpickle_Dependency, sizeof(__pyx_k_pyx_unpickle_Dependency), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_ExternalDependenc, __pyx_k_pyx_unpickle_ExternalDependenc, sizeof(__pyx_k_pyx_unpickle_ExternalDependenc), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_Factory, __pyx_k_pyx_unpickle_Factory, sizeof(__pyx_k_pyx_unpickle_Factory), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_FactoryAggregate, __pyx_k_pyx_unpickle_FactoryAggregate, sizeof(__pyx_k_pyx_unpickle_FactoryAggregate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_FactoryDelegate, __pyx_k_pyx_unpickle_FactoryDelegate, sizeof(__pyx_k_pyx_unpickle_FactoryDelegate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_Injection, __pyx_k_pyx_unpickle_Injection, sizeof(__pyx_k_pyx_unpickle_Injection), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_List, __pyx_k_pyx_unpickle_List, sizeof(__pyx_k_pyx_unpickle_List), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_NamedInjection, __pyx_k_pyx_unpickle_NamedInjection, sizeof(__pyx_k_pyx_unpickle_NamedInjection), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_Object, __pyx_k_pyx_unpickle_Object, sizeof(__pyx_k_pyx_unpickle_Object), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_OverridingContext, __pyx_k_pyx_unpickle_OverridingContext, sizeof(__pyx_k_pyx_unpickle_OverridingContext), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_PositionalInjecti, __pyx_k_pyx_unpickle_PositionalInjecti, sizeof(__pyx_k_pyx_unpickle_PositionalInjecti), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_Provider, __pyx_k_pyx_unpickle_Provider, sizeof(__pyx_k_pyx_unpickle_Provider), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_Singleton, __pyx_k_pyx_unpickle_Singleton, sizeof(__pyx_k_pyx_unpickle_Singleton), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_SingletonDelegate, __pyx_k_pyx_unpickle_SingletonDelegate, sizeof(__pyx_k_pyx_unpickle_SingletonDelegate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_ThreadLocalSingle, __pyx_k_pyx_unpickle_ThreadLocalSingle, sizeof(__pyx_k_pyx_unpickle_ThreadLocalSingle), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_unpickle_ThreadSafeSinglet, __pyx_k_pyx_unpickle_ThreadSafeSinglet, sizeof(__pyx_k_pyx_unpickle_ThreadSafeSinglet), 0, 0, 1, 1},
|
|
{&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
|
|
{&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
|
|
{&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
|
|
{&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
|
|
{&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
|
|
{&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1},
|
|
{&__pyx_n_s_reset_last_overriding, __pyx_k_reset_last_overriding, sizeof(__pyx_k_reset_last_overriding), 0, 0, 1, 1},
|
|
{&__pyx_n_s_reset_override, __pyx_k_reset_override, sizeof(__pyx_k_reset_override), 0, 0, 1, 1},
|
|
{&__pyx_n_s_set_args, __pyx_k_set_args, sizeof(__pyx_k_set_args), 0, 0, 1, 1},
|
|
{&__pyx_n_s_set_attributes, __pyx_k_set_attributes, sizeof(__pyx_k_set_attributes), 0, 0, 1, 1},
|
|
{&__pyx_n_s_set_kwargs, __pyx_k_set_kwargs, sizeof(__pyx_k_set_kwargs), 0, 0, 1, 1},
|
|
{&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
|
|
{&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
|
|
{&__pyx_n_s_singleton, __pyx_k_singleton, sizeof(__pyx_k_singleton), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_src_dependency_injector_provider, __pyx_k_src_dependency_injector_provider, sizeof(__pyx_k_src_dependency_injector_provider), 0, 0, 1, 0},
|
|
{&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
|
|
{&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
|
|
{&__pyx_n_s_stdin, __pyx_k_stdin, sizeof(__pyx_k_stdin), 0, 0, 1, 1},
|
|
{&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1},
|
|
{&__pyx_n_s_storage_lock, __pyx_k_storage_lock, sizeof(__pyx_k_storage_lock), 0, 0, 1, 1},
|
|
{&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
|
|
{&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
|
|
{&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
|
|
{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
|
|
{&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
|
|
{&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
|
|
{&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
|
|
{&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
|
|
{&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
|
|
{&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
|
|
{0, 0, 0, 0, 0, 0, 0}
|
|
};
|
|
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
|
|
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 243, __pyx_L1_error)
|
|
__pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 14, __pyx_L1_error)
|
|
__pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(1, 375, __pyx_L1_error)
|
|
__pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(1, 103, __pyx_L1_error)
|
|
__pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 116, __pyx_L1_error)
|
|
__pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 193, __pyx_L1_error)
|
|
__pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(1, 227, __pyx_L1_error)
|
|
__pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(1, 531, __pyx_L1_error)
|
|
__pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(1, 2230, __pyx_L1_error)
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
return -1;
|
|
}
|
|
|
|
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
|
|
|
|
/* "dependency_injector/providers.pyx":143
|
|
* def overridden(self):
|
|
* """Return tuple of overriding providers."""
|
|
* with self.overriding_lock: # <<<<<<<<<<<<<<
|
|
* return self.__overridden
|
|
*
|
|
*/
|
|
__pyx_tuple_ = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 143, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple_);
|
|
__Pyx_GIVEREF(__pyx_tuple_);
|
|
|
|
/* "dependency_injector/providers.pyx":854
|
|
* cpdef object _provide(self, tuple args, dict kwargs):
|
|
* """Return result of provided callable's call."""
|
|
* raise NotImplementedError('Abstract provider forward providing logic ' # <<<<<<<<<<<<<<
|
|
* 'to overriding provider')
|
|
*
|
|
*/
|
|
__pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Abstract_provider_forward_provid); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 854, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__5);
|
|
__Pyx_GIVEREF(__pyx_tuple__5);
|
|
|
|
/* "dependency_injector/providers.pyx":18
|
|
* _is_coroutine_marker = None
|
|
* else:
|
|
* if sys.version_info >= (3, 5, 3): # <<<<<<<<<<<<<<
|
|
* import asyncio.coroutines
|
|
* _is_coroutine_marker = asyncio.coroutines._is_coroutine
|
|
*/
|
|
__pyx_tuple__7 = PyTuple_Pack(3, __pyx_int_3, __pyx_int_5, __pyx_int_3); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 18, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__7);
|
|
__Pyx_GIVEREF(__pyx_tuple__7);
|
|
|
|
/* "dependency_injector/providers.pyx":2242
|
|
* return copy.deepcopy(instance, memo)
|
|
*
|
|
* def __add_sys_streams(memo): # <<<<<<<<<<<<<<
|
|
* """Add system streams to memo dictionary.
|
|
*
|
|
*/
|
|
__pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 2242, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__8);
|
|
__Pyx_GIVEREF(__pyx_tuple__8);
|
|
__pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_provider, __pyx_n_s_add_sys_streams, 2242, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(1, 2242, __pyx_L1_error)
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Provider(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_tuple__10 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__10);
|
|
__Pyx_GIVEREF(__pyx_tuple__10);
|
|
__pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Provider, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__12 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__12);
|
|
__Pyx_GIVEREF(__pyx_tuple__12);
|
|
__pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Object, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__14 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__14);
|
|
__Pyx_GIVEREF(__pyx_tuple__14);
|
|
__pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Delegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__16 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__16);
|
|
__Pyx_GIVEREF(__pyx_tuple__16);
|
|
__pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Dependency, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__18 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__18);
|
|
__Pyx_GIVEREF(__pyx_tuple__18);
|
|
__pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ExternalDependenc, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__20 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__20);
|
|
__Pyx_GIVEREF(__pyx_tuple__20);
|
|
__pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DependenciesConta, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__22 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__22);
|
|
__Pyx_GIVEREF(__pyx_tuple__22);
|
|
__pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_OverridingContext, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__24 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__24);
|
|
__Pyx_GIVEREF(__pyx_tuple__24);
|
|
__pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Callable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__26 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__26);
|
|
__Pyx_GIVEREF(__pyx_tuple__26);
|
|
__pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedCallable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__28 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__28);
|
|
__Pyx_GIVEREF(__pyx_tuple__28);
|
|
__pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractCallable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__30 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__30);
|
|
__Pyx_GIVEREF(__pyx_tuple__30);
|
|
__pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CallableDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__32 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__32);
|
|
__Pyx_GIVEREF(__pyx_tuple__32);
|
|
__pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Coroutine, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__34 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__34);
|
|
__Pyx_GIVEREF(__pyx_tuple__34);
|
|
__pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedCoroutin, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__36 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__36);
|
|
__Pyx_GIVEREF(__pyx_tuple__36);
|
|
__pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractCoroutine, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__38 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__38);
|
|
__Pyx_GIVEREF(__pyx_tuple__38);
|
|
__pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CoroutineDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__40 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__40);
|
|
__Pyx_GIVEREF(__pyx_tuple__40);
|
|
__pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Configuration, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__42 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__42);
|
|
__Pyx_GIVEREF(__pyx_tuple__42);
|
|
__pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Factory, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__44 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__44);
|
|
__Pyx_GIVEREF(__pyx_tuple__44);
|
|
__pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedFactory, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__46 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__46);
|
|
__Pyx_GIVEREF(__pyx_tuple__46);
|
|
__pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractFactory, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__48 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__48);
|
|
__Pyx_GIVEREF(__pyx_tuple__48);
|
|
__pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FactoryDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__50 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__50);
|
|
__Pyx_GIVEREF(__pyx_tuple__50);
|
|
__pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FactoryAggregate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__52 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__52);
|
|
__Pyx_GIVEREF(__pyx_tuple__52);
|
|
__pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BaseSingleton, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__54 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__54);
|
|
__Pyx_GIVEREF(__pyx_tuple__54);
|
|
__pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Singleton, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__56 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__56);
|
|
__Pyx_GIVEREF(__pyx_tuple__56);
|
|
__pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DelegatedSingleto, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__58 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__58);
|
|
__Pyx_GIVEREF(__pyx_tuple__58);
|
|
__pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ThreadSafeSinglet, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__60 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__60);
|
|
__Pyx_GIVEREF(__pyx_tuple__60);
|
|
__pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_DelegatedThreadSa, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__62 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__62);
|
|
__Pyx_GIVEREF(__pyx_tuple__62);
|
|
__pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_ThreadLocalSingle, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__64 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__64);
|
|
__Pyx_GIVEREF(__pyx_tuple__64);
|
|
__pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_stringsource, __pyx_n_s_pyx_unpickle_DelegatedThreadLo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__66 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__66);
|
|
__Pyx_GIVEREF(__pyx_tuple__66);
|
|
__pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractSingleton, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__68 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__68);
|
|
__Pyx_GIVEREF(__pyx_tuple__68);
|
|
__pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SingletonDelegate, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__70 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__70);
|
|
__Pyx_GIVEREF(__pyx_tuple__70);
|
|
__pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_List, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__72 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__72);
|
|
__Pyx_GIVEREF(__pyx_tuple__72);
|
|
__pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Injection, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__74 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__74);
|
|
__Pyx_GIVEREF(__pyx_tuple__74);
|
|
__pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PositionalInjecti, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__pyx_tuple__76 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_tuple__76);
|
|
__Pyx_GIVEREF(__pyx_tuple__76);
|
|
__pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_NamedInjection, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_RefNannyFinishContext();
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
|
|
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
|
|
__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
|
|
__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
|
|
__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
|
|
if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
|
|
__pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_3297756 = PyInt_FromLong(3297756L); if (unlikely(!__pyx_int_3297756)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_12885488 = PyInt_FromLong(12885488L); if (unlikely(!__pyx_int_12885488)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_16106973 = PyInt_FromLong(16106973L); if (unlikely(!__pyx_int_16106973)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_34020203 = PyInt_FromLong(34020203L); if (unlikely(!__pyx_int_34020203)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_48353679 = PyInt_FromLong(48353679L); if (unlikely(!__pyx_int_48353679)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_66364342 = PyInt_FromLong(66364342L); if (unlikely(!__pyx_int_66364342)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_103927799 = PyInt_FromLong(103927799L); if (unlikely(!__pyx_int_103927799)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_105855327 = PyInt_FromLong(105855327L); if (unlikely(!__pyx_int_105855327)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_124696738 = PyInt_FromLong(124696738L); if (unlikely(!__pyx_int_124696738)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_173552623 = PyInt_FromLong(173552623L); if (unlikely(!__pyx_int_173552623)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_174495485 = PyInt_FromLong(174495485L); if (unlikely(!__pyx_int_174495485)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_175356006 = PyInt_FromLong(175356006L); if (unlikely(!__pyx_int_175356006)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_175530959 = PyInt_FromLong(175530959L); if (unlikely(!__pyx_int_175530959)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_226841543 = PyInt_FromLong(226841543L); if (unlikely(!__pyx_int_226841543)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_int_253710871 = PyInt_FromLong(253710871L); if (unlikely(!__pyx_int_253710871)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
return -1;
|
|
}
|
|
|
|
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
|
|
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
|
|
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
|
|
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
|
|
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
|
|
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
|
|
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
|
|
|
|
static int __Pyx_modinit_global_init_code(void) {
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
|
|
/*--- Global init code ---*/
|
|
__pyx_v_19dependency_injector_9providers_CLASS_TYPES = Py_None; Py_INCREF(Py_None);
|
|
__Pyx_RefNannyFinishContext();
|
|
return 0;
|
|
}
|
|
|
|
static int __Pyx_modinit_variable_export_code(void) {
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
|
|
/*--- Variable export code ---*/
|
|
if (__Pyx_ExportVoidPtr(__pyx_n_s_CLASS_TYPES, (void *)&__pyx_v_19dependency_injector_9providers_CLASS_TYPES, "PyObject *") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__Pyx_RefNannyFinishContext();
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
|
|
static int __Pyx_modinit_function_export_code(void) {
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
|
|
/*--- Function export code ---*/
|
|
if (__Pyx_ExportFunction("parse_positional_injections", (void (*)(void))__pyx_f_19dependency_injector_9providers_parse_positional_injections, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
if (__Pyx_ExportFunction("parse_named_injections", (void (*)(void))__pyx_f_19dependency_injector_9providers_parse_named_injections, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
if (__Pyx_ExportFunction("is_provider", (void (*)(void))__pyx_f_19dependency_injector_9providers_is_provider, "int (PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
if (__Pyx_ExportFunction("ensure_is_provider", (void (*)(void))__pyx_f_19dependency_injector_9providers_ensure_is_provider, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
if (__Pyx_ExportFunction("is_delegated", (void (*)(void))__pyx_f_19dependency_injector_9providers_is_delegated, "int (PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
if (__Pyx_ExportFunction("represent_provider", (void (*)(void))__pyx_f_19dependency_injector_9providers_represent_provider, "PyObject *(PyObject *, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
if (__Pyx_ExportFunction("deepcopy", (void (*)(void))__pyx_f_19dependency_injector_9providers_deepcopy, "PyObject *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_19dependency_injector_9providers_deepcopy *__pyx_optional_args)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__Pyx_RefNannyFinishContext();
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
|
|
static int __Pyx_modinit_type_init_code(void) {
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
|
|
/*--- Type init code ---*/
|
|
__pyx_vtabptr_19dependency_injector_9providers_Provider = &__pyx_vtable_19dependency_injector_9providers_Provider;
|
|
__pyx_vtable_19dependency_injector_9providers_Provider._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Provider__provide;
|
|
__pyx_vtable_19dependency_injector_9providers_Provider._copy_overridings = (void (*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Provider__copy_overridings;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Provider) < 0) __PYX_ERR(1, 44, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_Provider.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Provider.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Provider.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_Provider.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Provider, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 44, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Provider___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Provider___init__.doc = __pyx_doc_19dependency_injector_9providers_8Provider___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_8Provider___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Provider, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 44, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Provider_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Provider_2__call__.doc = __pyx_doc_19dependency_injector_9providers_8Provider_2__call__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_8Provider_2__call__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Provider, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 44, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Provider_6__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Provider_6__str__.doc = __pyx_doc_19dependency_injector_9providers_8Provider_6__str__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_8Provider_6__str__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Provider, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 44, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Provider_8__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Provider_8__repr__.doc = __pyx_doc_19dependency_injector_9providers_8Provider_8__repr__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_8Provider_8__repr__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Provider.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Provider) < 0) __PYX_ERR(1, 44, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Provider, (PyObject *)&__pyx_type_19dependency_injector_9providers_Provider) < 0) __PYX_ERR(1, 44, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Provider) < 0) __PYX_ERR(1, 44, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_Provider = &__pyx_type_19dependency_injector_9providers_Provider;
|
|
__pyx_vtabptr_19dependency_injector_9providers_Object = &__pyx_vtable_19dependency_injector_9providers_Object;
|
|
__pyx_vtable_19dependency_injector_9providers_Object.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider;
|
|
__pyx_vtable_19dependency_injector_9providers_Object.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_6Object__provide;
|
|
__pyx_type_19dependency_injector_9providers_Object.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Object) < 0) __PYX_ERR(1, 235, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_Object.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Object.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Object.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_Object.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Object, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 235, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_6Object___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_6Object___init__.doc = __pyx_doc_19dependency_injector_9providers_6Object___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_6Object___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Object, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 235, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_6Object_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_6Object_4__str__.doc = __pyx_doc_19dependency_injector_9providers_6Object_4__str__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_6Object_4__str__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Object, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 235, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_6Object_6__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_6Object_6__repr__.doc = __pyx_doc_19dependency_injector_9providers_6Object_6__repr__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_6Object_6__repr__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Object.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Object) < 0) __PYX_ERR(1, 235, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Object, (PyObject *)&__pyx_type_19dependency_injector_9providers_Object) < 0) __PYX_ERR(1, 235, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Object) < 0) __PYX_ERR(1, 235, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_Object = &__pyx_type_19dependency_injector_9providers_Object;
|
|
__pyx_vtabptr_19dependency_injector_9providers_Delegate = &__pyx_vtable_19dependency_injector_9providers_Delegate;
|
|
__pyx_vtable_19dependency_injector_9providers_Delegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider;
|
|
__pyx_vtable_19dependency_injector_9providers_Delegate.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Delegate__provide;
|
|
__pyx_type_19dependency_injector_9providers_Delegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 294, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_Delegate.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Delegate.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Delegate.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_Delegate.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 294, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Delegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Delegate___init__.doc = __pyx_doc_19dependency_injector_9providers_8Delegate___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_8Delegate___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 294, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Delegate_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Delegate_4__str__.doc = __pyx_doc_19dependency_injector_9providers_8Delegate_4__str__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_8Delegate_4__str__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 294, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Delegate_6__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Delegate_6__repr__.doc = __pyx_doc_19dependency_injector_9providers_8Delegate_6__repr__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_8Delegate_6__repr__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Delegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 294, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Delegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 294, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Delegate) < 0) __PYX_ERR(1, 294, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_Delegate = &__pyx_type_19dependency_injector_9providers_Delegate;
|
|
__pyx_vtabptr_19dependency_injector_9providers_Dependency = &__pyx_vtable_19dependency_injector_9providers_Dependency;
|
|
__pyx_vtable_19dependency_injector_9providers_Dependency.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider;
|
|
__pyx_type_19dependency_injector_9providers_Dependency.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 353, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_Dependency.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Dependency.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Dependency.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_Dependency.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 353, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_10Dependency___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_10Dependency___init__.doc = __pyx_doc_19dependency_injector_9providers_10Dependency___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_10Dependency___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 353, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_10Dependency_4__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_10Dependency_4__call__.doc = __pyx_doc_19dependency_injector_9providers_10Dependency_4__call__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_10Dependency_4__call__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 353, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_10Dependency_6__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_10Dependency_6__str__.doc = __pyx_doc_19dependency_injector_9providers_10Dependency_6__str__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_10Dependency_6__str__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 353, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_10Dependency_8__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_10Dependency_8__repr__.doc = __pyx_doc_19dependency_injector_9providers_10Dependency_8__repr__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_10Dependency_8__repr__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Dependency.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 353, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Dependency, (PyObject *)&__pyx_type_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 353, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Dependency) < 0) __PYX_ERR(1, 353, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_Dependency = &__pyx_type_19dependency_injector_9providers_Dependency;
|
|
__pyx_vtabptr_19dependency_injector_9providers_ExternalDependency = &__pyx_vtable_19dependency_injector_9providers_ExternalDependency;
|
|
__pyx_vtable_19dependency_injector_9providers_ExternalDependency.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Dependency;
|
|
__pyx_type_19dependency_injector_9providers_ExternalDependency.tp_base = __pyx_ptype_19dependency_injector_9providers_Dependency;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 442, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_ExternalDependency.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_ExternalDependency.tp_dictoffset && __pyx_type_19dependency_injector_9providers_ExternalDependency.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_ExternalDependency.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ExternalDependency.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 442, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ExternalDependency, (PyObject *)&__pyx_type_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 442, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ExternalDependency) < 0) __PYX_ERR(1, 442, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_ExternalDependency = &__pyx_type_19dependency_injector_9providers_ExternalDependency;
|
|
__pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer = &__pyx_vtable_19dependency_injector_9providers_DependenciesContainer;
|
|
__pyx_vtable_19dependency_injector_9providers_DependenciesContainer.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Object;
|
|
__pyx_vtable_19dependency_injector_9providers_DependenciesContainer._override_providers = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_21DependenciesContainer__override_providers;
|
|
__pyx_type_19dependency_injector_9providers_DependenciesContainer.tp_base = __pyx_ptype_19dependency_injector_9providers_Object;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 469, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_DependenciesContainer.tp_print = 0;
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_DependenciesContainer, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 469, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer___init__.doc = __pyx_doc_19dependency_injector_9providers_21DependenciesContainer___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_DependenciesContainer, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 469, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer_4__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer_4__getattr__.doc = __pyx_doc_19dependency_injector_9providers_21DependenciesContainer_4__getattr__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_21DependenciesContainer_4__getattr__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DependenciesContainer.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 469, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DependenciesContainer, (PyObject *)&__pyx_type_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 469, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DependenciesContainer) < 0) __PYX_ERR(1, 469, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_DependenciesContainer = &__pyx_type_19dependency_injector_9providers_DependenciesContainer;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_OverridingContext) < 0) __PYX_ERR(1, 606, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_OverridingContext.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_OverridingContext.tp_dictoffset && __pyx_type_19dependency_injector_9providers_OverridingContext.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_OverridingContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_OverridingContext, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 606, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_17OverridingContext___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_17OverridingContext___init__.doc = __pyx_doc_19dependency_injector_9providers_17OverridingContext___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_17OverridingContext___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OverridingContext, (PyObject *)&__pyx_type_19dependency_injector_9providers_OverridingContext) < 0) __PYX_ERR(1, 606, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_OverridingContext) < 0) __PYX_ERR(1, 606, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_OverridingContext = &__pyx_type_19dependency_injector_9providers_OverridingContext;
|
|
__pyx_vtabptr_19dependency_injector_9providers_Callable = &__pyx_vtable_19dependency_injector_9providers_Callable;
|
|
__pyx_vtable_19dependency_injector_9providers_Callable.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider;
|
|
__pyx_vtable_19dependency_injector_9providers_Callable.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Callable__provide;
|
|
__pyx_type_19dependency_injector_9providers_Callable.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 642, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_Callable.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Callable.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Callable.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_Callable.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Callable, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 642, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Callable___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Callable___init__.doc = __pyx_doc_19dependency_injector_9providers_8Callable___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_8Callable___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Callable, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 642, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Callable_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_8Callable_4__str__.doc = __pyx_doc_19dependency_injector_9providers_8Callable_4__str__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_8Callable_4__str__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Callable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 642, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Callable, (PyObject *)&__pyx_type_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 642, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Callable) < 0) __PYX_ERR(1, 642, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_Callable = &__pyx_type_19dependency_injector_9providers_Callable;
|
|
__pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable = &__pyx_vtable_19dependency_injector_9providers_DelegatedCallable;
|
|
__pyx_vtable_19dependency_injector_9providers_DelegatedCallable.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Callable;
|
|
__pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_base = __pyx_ptype_19dependency_injector_9providers_Callable;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 808, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedCallable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 808, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedCallable, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 808, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedCallable) < 0) __PYX_ERR(1, 808, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_DelegatedCallable = &__pyx_type_19dependency_injector_9providers_DelegatedCallable;
|
|
__pyx_vtabptr_19dependency_injector_9providers_AbstractCallable = &__pyx_vtable_19dependency_injector_9providers_AbstractCallable;
|
|
__pyx_vtable_19dependency_injector_9providers_AbstractCallable.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Callable;
|
|
__pyx_vtable_19dependency_injector_9providers_AbstractCallable.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_16AbstractCallable__provide;
|
|
__pyx_type_19dependency_injector_9providers_AbstractCallable.tp_base = __pyx_ptype_19dependency_injector_9providers_Callable;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 817, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_AbstractCallable.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_AbstractCallable.tp_dictoffset && __pyx_type_19dependency_injector_9providers_AbstractCallable.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_AbstractCallable.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCallable, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 817, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16AbstractCallable___call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16AbstractCallable___call__.doc = __pyx_doc_19dependency_injector_9providers_16AbstractCallable___call__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_16AbstractCallable___call__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractCallable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 817, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractCallable, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 817, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractCallable) < 0) __PYX_ERR(1, 817, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_AbstractCallable = &__pyx_type_19dependency_injector_9providers_AbstractCallable;
|
|
__pyx_vtabptr_19dependency_injector_9providers_CallableDelegate = &__pyx_vtable_19dependency_injector_9providers_CallableDelegate;
|
|
__pyx_vtable_19dependency_injector_9providers_CallableDelegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Delegate;
|
|
__pyx_type_19dependency_injector_9providers_CallableDelegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Delegate;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 858, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_CallableDelegate.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_CallableDelegate.tp_dictoffset && __pyx_type_19dependency_injector_9providers_CallableDelegate.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_CallableDelegate.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_CallableDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 858, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16CallableDelegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16CallableDelegate___init__.doc = __pyx_doc_19dependency_injector_9providers_16CallableDelegate___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_16CallableDelegate___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_CallableDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 858, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CallableDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 858, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_CallableDelegate) < 0) __PYX_ERR(1, 858, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_CallableDelegate = &__pyx_type_19dependency_injector_9providers_CallableDelegate;
|
|
__pyx_vtabptr_19dependency_injector_9providers_Coroutine = &__pyx_vtable_19dependency_injector_9providers_Coroutine;
|
|
__pyx_vtable_19dependency_injector_9providers_Coroutine.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Callable;
|
|
__pyx_type_19dependency_injector_9providers_Coroutine.tp_base = __pyx_ptype_19dependency_injector_9providers_Callable;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 880, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_Coroutine.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Coroutine.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Coroutine.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_Coroutine.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Coroutine, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 880, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_9Coroutine___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_9Coroutine___init__.doc = __pyx_doc_19dependency_injector_9providers_9Coroutine___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_9Coroutine___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Coroutine.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 880, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Coroutine, (PyObject *)&__pyx_type_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 880, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Coroutine) < 0) __PYX_ERR(1, 880, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_Coroutine = &__pyx_type_19dependency_injector_9providers_Coroutine;
|
|
__pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine = &__pyx_vtable_19dependency_injector_9providers_DelegatedCoroutine;
|
|
__pyx_vtable_19dependency_injector_9providers_DelegatedCoroutine.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Coroutine;
|
|
__pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_base = __pyx_ptype_19dependency_injector_9providers_Coroutine;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 924, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedCoroutine.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 924, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedCoroutine, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 924, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedCoroutine) < 0) __PYX_ERR(1, 924, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine = &__pyx_type_19dependency_injector_9providers_DelegatedCoroutine;
|
|
__pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine = &__pyx_vtable_19dependency_injector_9providers_AbstractCoroutine;
|
|
__pyx_vtable_19dependency_injector_9providers_AbstractCoroutine.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Coroutine;
|
|
__pyx_vtable_19dependency_injector_9providers_AbstractCoroutine.__pyx_base.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_17AbstractCoroutine__provide;
|
|
__pyx_type_19dependency_injector_9providers_AbstractCoroutine.tp_base = __pyx_ptype_19dependency_injector_9providers_Coroutine;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 933, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_AbstractCoroutine.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_AbstractCoroutine.tp_dictoffset && __pyx_type_19dependency_injector_9providers_AbstractCoroutine.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_AbstractCoroutine.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCoroutine, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 933, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_17AbstractCoroutine___call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_17AbstractCoroutine___call__.doc = __pyx_doc_19dependency_injector_9providers_17AbstractCoroutine___call__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_17AbstractCoroutine___call__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractCoroutine.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 933, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractCoroutine, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 933, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractCoroutine) < 0) __PYX_ERR(1, 933, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine = &__pyx_type_19dependency_injector_9providers_AbstractCoroutine;
|
|
__pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate = &__pyx_vtable_19dependency_injector_9providers_CoroutineDelegate;
|
|
__pyx_vtable_19dependency_injector_9providers_CoroutineDelegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Delegate;
|
|
__pyx_type_19dependency_injector_9providers_CoroutineDelegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Delegate;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 974, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_CoroutineDelegate.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_CoroutineDelegate.tp_dictoffset && __pyx_type_19dependency_injector_9providers_CoroutineDelegate.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_CoroutineDelegate.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_CoroutineDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 974, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_17CoroutineDelegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_17CoroutineDelegate___init__.doc = __pyx_doc_19dependency_injector_9providers_17CoroutineDelegate___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_17CoroutineDelegate___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_CoroutineDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 974, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CoroutineDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 974, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_CoroutineDelegate) < 0) __PYX_ERR(1, 974, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate = &__pyx_type_19dependency_injector_9providers_CoroutineDelegate;
|
|
__pyx_vtabptr_19dependency_injector_9providers_Configuration = &__pyx_vtable_19dependency_injector_9providers_Configuration;
|
|
__pyx_vtable_19dependency_injector_9providers_Configuration.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Object;
|
|
__pyx_type_19dependency_injector_9providers_Configuration.tp_base = __pyx_ptype_19dependency_injector_9providers_Object;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 996, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_Configuration.tp_print = 0;
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Configuration, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 996, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_13Configuration___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_13Configuration___init__.doc = __pyx_doc_19dependency_injector_9providers_13Configuration___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_13Configuration___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Configuration, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 996, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_13Configuration_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_13Configuration_4__str__.doc = __pyx_doc_19dependency_injector_9providers_13Configuration_4__str__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_13Configuration_4__str__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Configuration, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 996, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_13Configuration_6__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_13Configuration_6__getattr__.doc = __pyx_doc_19dependency_injector_9providers_13Configuration_6__getattr__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_13Configuration_6__getattr__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Configuration.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 996, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Configuration, (PyObject *)&__pyx_type_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 996, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Configuration) < 0) __PYX_ERR(1, 996, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_Configuration = &__pyx_type_19dependency_injector_9providers_Configuration;
|
|
__pyx_vtabptr_19dependency_injector_9providers_Factory = &__pyx_vtable_19dependency_injector_9providers_Factory;
|
|
__pyx_vtable_19dependency_injector_9providers_Factory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider;
|
|
__pyx_vtable_19dependency_injector_9providers_Factory.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_7Factory__provide;
|
|
__pyx_type_19dependency_injector_9providers_Factory.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 1166, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_Factory.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Factory.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Factory.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_Factory.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Factory, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1166, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_7Factory___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_7Factory___init__.doc = __pyx_doc_19dependency_injector_9providers_7Factory___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_7Factory___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Factory, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1166, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_7Factory_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_7Factory_4__str__.doc = __pyx_doc_19dependency_injector_9providers_7Factory_4__str__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_7Factory_4__str__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Factory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 1166, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Factory, (PyObject *)&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 1166, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 1166, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_Factory = &__pyx_type_19dependency_injector_9providers_Factory;
|
|
__pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory = &__pyx_vtable_19dependency_injector_9providers_DelegatedFactory;
|
|
__pyx_vtable_19dependency_injector_9providers_DelegatedFactory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Factory;
|
|
__pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_base = __pyx_ptype_19dependency_injector_9providers_Factory;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 1378, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 1378, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedFactory, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 1378, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 1378, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_DelegatedFactory = &__pyx_type_19dependency_injector_9providers_DelegatedFactory;
|
|
__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory = &__pyx_vtable_19dependency_injector_9providers_AbstractFactory;
|
|
__pyx_vtable_19dependency_injector_9providers_AbstractFactory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Factory;
|
|
__pyx_vtable_19dependency_injector_9providers_AbstractFactory.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_15AbstractFactory__provide;
|
|
__pyx_type_19dependency_injector_9providers_AbstractFactory.tp_base = __pyx_ptype_19dependency_injector_9providers_Factory;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1399, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_AbstractFactory.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_AbstractFactory.tp_dictoffset && __pyx_type_19dependency_injector_9providers_AbstractFactory.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_AbstractFactory.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1399, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_15AbstractFactory___call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_15AbstractFactory___call__.doc = __pyx_doc_19dependency_injector_9providers_15AbstractFactory___call__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_15AbstractFactory___call__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1399, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractFactory, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1399, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1399, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_AbstractFactory = &__pyx_type_19dependency_injector_9providers_AbstractFactory;
|
|
__pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate = &__pyx_vtable_19dependency_injector_9providers_FactoryDelegate;
|
|
__pyx_vtable_19dependency_injector_9providers_FactoryDelegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Delegate;
|
|
__pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Delegate;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 1440, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_dictoffset && __pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1440, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_15FactoryDelegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_15FactoryDelegate___init__.doc = __pyx_doc_19dependency_injector_9providers_15FactoryDelegate___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_15FactoryDelegate___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 1440, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FactoryDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 1440, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 1440, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_FactoryDelegate = &__pyx_type_19dependency_injector_9providers_FactoryDelegate;
|
|
__pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate = &__pyx_vtable_19dependency_injector_9providers_FactoryAggregate;
|
|
__pyx_vtable_19dependency_injector_9providers_FactoryAggregate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider;
|
|
__pyx_vtable_19dependency_injector_9providers_FactoryAggregate.__pyx___get_factory = (struct __pyx_obj_19dependency_injector_9providers_Factory *(*)(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate *, PyObject *))__pyx_f_19dependency_injector_9providers_16FactoryAggregate___get_factory;
|
|
__pyx_type_19dependency_injector_9providers_FactoryAggregate.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 1462, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_FactoryAggregate.tp_print = 0;
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1462, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate___init__.doc = __pyx_doc_19dependency_injector_9providers_16FactoryAggregate___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1462, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_4__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_4__call__.doc = __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_4__call__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_4__call__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1462, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_6__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_6__getattr__.doc = __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_6__getattr__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_6__getattr__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1462, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_8__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_8__str__.doc = __pyx_doc_19dependency_injector_9providers_16FactoryAggregate_8__str__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_16FactoryAggregate_8__str__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_FactoryAggregate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 1462, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FactoryAggregate, (PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 1462, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_FactoryAggregate) < 0) __PYX_ERR(1, 1462, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_FactoryAggregate = &__pyx_type_19dependency_injector_9providers_FactoryAggregate;
|
|
__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton = &__pyx_vtable_19dependency_injector_9providers_BaseSingleton;
|
|
__pyx_vtable_19dependency_injector_9providers_BaseSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider;
|
|
__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1549, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_BaseSingleton.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1549, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_13BaseSingleton___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1549, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton_2__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton_2__str__.doc = __pyx_doc_19dependency_injector_9providers_13BaseSingleton_2__str__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton_2__str__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1549, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1549, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1549, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_BaseSingleton = &__pyx_type_19dependency_injector_9providers_BaseSingleton;
|
|
__pyx_vtabptr_19dependency_injector_9providers_Singleton = &__pyx_vtable_19dependency_injector_9providers_Singleton;
|
|
__pyx_vtable_19dependency_injector_9providers_Singleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton;
|
|
__pyx_vtable_19dependency_injector_9providers_Singleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_9Singleton__provide;
|
|
__pyx_type_19dependency_injector_9providers_Singleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1702, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_Singleton.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Singleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Singleton.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_Singleton.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1702, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_9Singleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_9Singleton___init__.doc = __pyx_doc_19dependency_injector_9providers_9Singleton___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_9Singleton___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Singleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1702, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Singleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1702, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1702, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_Singleton = &__pyx_type_19dependency_injector_9providers_Singleton;
|
|
__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedSingleton;
|
|
__pyx_vtable_19dependency_injector_9providers_DelegatedSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Singleton;
|
|
__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_Singleton;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1757, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1757, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1757, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1757, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedSingleton;
|
|
__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton = &__pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton;
|
|
__pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton;
|
|
__pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide;
|
|
__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1778, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1778, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_19ThreadSafeSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_19ThreadSafeSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_19ThreadSafeSingleton___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_19ThreadSafeSingleton___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1778, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadSafeSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1778, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1778, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton = &__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton;
|
|
__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedThreadSafeSingleton;
|
|
__pyx_vtable_19dependency_injector_9providers_DelegatedThreadSafeSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton;
|
|
__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1813, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1813, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedThreadSafeSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1813, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1813, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton;
|
|
__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton = &__pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton;
|
|
__pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton;
|
|
__pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide;
|
|
__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1834, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1834, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_20ThreadLocalSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_20ThreadLocalSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_20ThreadLocalSingleton___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_20ThreadLocalSingleton___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1834, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ThreadLocalSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1834, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1834, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton = &__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton;
|
|
__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedThreadLocalSingleton;
|
|
__pyx_vtable_19dependency_injector_9providers_DelegatedThreadLocalSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton;
|
|
__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1881, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1881, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DelegatedThreadLocalSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1881, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1881, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton;
|
|
__pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton = &__pyx_vtable_19dependency_injector_9providers_AbstractSingleton;
|
|
__pyx_vtable_19dependency_injector_9providers_AbstractSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton;
|
|
__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1902, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_dictoffset && __pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1902, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_17AbstractSingleton___call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_17AbstractSingleton___call__.doc = __pyx_doc_19dependency_injector_9providers_17AbstractSingleton___call__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_17AbstractSingleton___call__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1902, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractSingleton, (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1902, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1902, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_AbstractSingleton = &__pyx_type_19dependency_injector_9providers_AbstractSingleton;
|
|
__pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate = &__pyx_vtable_19dependency_injector_9providers_SingletonDelegate;
|
|
__pyx_vtable_19dependency_injector_9providers_SingletonDelegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Delegate;
|
|
__pyx_type_19dependency_injector_9providers_SingletonDelegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Delegate;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 1947, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_SingletonDelegate.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_SingletonDelegate.tp_dictoffset && __pyx_type_19dependency_injector_9providers_SingletonDelegate.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_SingletonDelegate.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_SingletonDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1947, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_17SingletonDelegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_17SingletonDelegate___init__.doc = __pyx_doc_19dependency_injector_9providers_17SingletonDelegate___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_17SingletonDelegate___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_SingletonDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 1947, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SingletonDelegate, (PyObject *)&__pyx_type_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 1947, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_SingletonDelegate) < 0) __PYX_ERR(1, 1947, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_SingletonDelegate = &__pyx_type_19dependency_injector_9providers_SingletonDelegate;
|
|
__pyx_vtabptr_19dependency_injector_9providers_List = &__pyx_vtable_19dependency_injector_9providers_List;
|
|
__pyx_vtable_19dependency_injector_9providers_List.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider;
|
|
__pyx_vtable_19dependency_injector_9providers_List.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_4List__provide;
|
|
__pyx_type_19dependency_injector_9providers_List.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 1969, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_List.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_List.tp_dictoffset && __pyx_type_19dependency_injector_9providers_List.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_List.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_List, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1969, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_4List___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_4List___init__.doc = __pyx_doc_19dependency_injector_9providers_4List___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_4List___init__;
|
|
}
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_List, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1969, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_4List_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_4List_4__str__.doc = __pyx_doc_19dependency_injector_9providers_4List_4__str__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_4List_4__str__;
|
|
}
|
|
}
|
|
#endif
|
|
if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_List.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 1969, __pyx_L1_error)
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_List, (PyObject *)&__pyx_type_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 1969, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_List) < 0) __PYX_ERR(1, 1969, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_List = &__pyx_type_19dependency_injector_9providers_List;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 2071, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_Injection.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_Injection.tp_dictoffset && __pyx_type_19dependency_injector_9providers_Injection.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_Injection.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Injection, (PyObject *)&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 2071, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 2071, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_Injection = &__pyx_type_19dependency_injector_9providers_Injection;
|
|
__pyx_type_19dependency_injector_9providers_PositionalInjection.tp_base = __pyx_ptype_19dependency_injector_9providers_Injection;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 2075, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_PositionalInjection.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_PositionalInjection.tp_dictoffset && __pyx_type_19dependency_injector_9providers_PositionalInjection.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_PositionalInjection.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2075, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_19PositionalInjection___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_19PositionalInjection___init__.doc = __pyx_doc_19dependency_injector_9providers_19PositionalInjection___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_19PositionalInjection___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PositionalInjection, (PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 2075, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 2075, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_PositionalInjection = &__pyx_type_19dependency_injector_9providers_PositionalInjection;
|
|
__pyx_type_19dependency_injector_9providers_NamedInjection.tp_base = __pyx_ptype_19dependency_injector_9providers_Injection;
|
|
if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 2103, __pyx_L1_error)
|
|
#if PY_VERSION_HEX < 0x030800B1
|
|
__pyx_type_19dependency_injector_9providers_NamedInjection.tp_print = 0;
|
|
#endif
|
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_9providers_NamedInjection.tp_dictoffset && __pyx_type_19dependency_injector_9providers_NamedInjection.tp_getattro == PyObject_GenericGetAttr)) {
|
|
__pyx_type_19dependency_injector_9providers_NamedInjection.tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
}
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
{
|
|
PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 2103, __pyx_L1_error)
|
|
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
|
|
__pyx_wrapperbase_19dependency_injector_9providers_14NamedInjection___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
|
|
__pyx_wrapperbase_19dependency_injector_9providers_14NamedInjection___init__.doc = __pyx_doc_19dependency_injector_9providers_14NamedInjection___init__;
|
|
((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_14NamedInjection___init__;
|
|
}
|
|
}
|
|
#endif
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NamedInjection, (PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 2103, __pyx_L1_error)
|
|
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 2103, __pyx_L1_error)
|
|
__pyx_ptype_19dependency_injector_9providers_NamedInjection = &__pyx_type_19dependency_injector_9providers_NamedInjection;
|
|
__Pyx_RefNannyFinishContext();
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
__Pyx_RefNannyFinishContext();
|
|
return -1;
|
|
}
|
|
|
|
static int __Pyx_modinit_type_import_code(void) {
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
|
|
/*--- Type import code ---*/
|
|
__Pyx_RefNannyFinishContext();
|
|
return 0;
|
|
}
|
|
|
|
static int __Pyx_modinit_variable_import_code(void) {
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
|
|
/*--- Variable import code ---*/
|
|
__Pyx_RefNannyFinishContext();
|
|
return 0;
|
|
}
|
|
|
|
static int __Pyx_modinit_function_import_code(void) {
|
|
__Pyx_RefNannyDeclarations
|
|
__Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
|
|
/*--- Function import code ---*/
|
|
__Pyx_RefNannyFinishContext();
|
|
return 0;
|
|
}
|
|
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
#ifdef CYTHON_NO_PYINIT_EXPORT
|
|
#define __Pyx_PyMODINIT_FUNC void
|
|
#else
|
|
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
|
|
#endif
|
|
#else
|
|
#ifdef CYTHON_NO_PYINIT_EXPORT
|
|
#define __Pyx_PyMODINIT_FUNC PyObject *
|
|
#else
|
|
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
__Pyx_PyMODINIT_FUNC initproviders(void) CYTHON_SMALL_CODE; /*proto*/
|
|
__Pyx_PyMODINIT_FUNC initproviders(void)
|
|
#else
|
|
__Pyx_PyMODINIT_FUNC PyInit_providers(void) CYTHON_SMALL_CODE; /*proto*/
|
|
__Pyx_PyMODINIT_FUNC PyInit_providers(void)
|
|
#if CYTHON_PEP489_MULTI_PHASE_INIT
|
|
{
|
|
return PyModuleDef_Init(&__pyx_moduledef);
|
|
}
|
|
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
|
|
#if PY_VERSION_HEX >= 0x030700A1
|
|
static PY_INT64_T main_interpreter_id = -1;
|
|
PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
|
|
if (main_interpreter_id == -1) {
|
|
main_interpreter_id = current_id;
|
|
return (unlikely(current_id == -1)) ? -1 : 0;
|
|
} else if (unlikely(main_interpreter_id != current_id))
|
|
#else
|
|
static PyInterpreterState *main_interpreter = NULL;
|
|
PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
|
|
if (!main_interpreter) {
|
|
main_interpreter = current_interpreter;
|
|
} else if (unlikely(main_interpreter != current_interpreter))
|
|
#endif
|
|
{
|
|
PyErr_SetString(
|
|
PyExc_ImportError,
|
|
"Interpreter change detected - this module can only be loaded into one interpreter per process.");
|
|
return -1;
|
|
}
|
|
return 0;
|
|
}
|
|
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
|
|
PyObject *value = PyObject_GetAttrString(spec, from_name);
|
|
int result = 0;
|
|
if (likely(value)) {
|
|
if (allow_none || value != Py_None) {
|
|
result = PyDict_SetItemString(moddict, to_name, value);
|
|
}
|
|
Py_DECREF(value);
|
|
} else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
|
|
PyErr_Clear();
|
|
} else {
|
|
result = -1;
|
|
}
|
|
return result;
|
|
}
|
|
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
|
|
PyObject *module = NULL, *moddict, *modname;
|
|
if (__Pyx_check_single_interpreter())
|
|
return NULL;
|
|
if (__pyx_m)
|
|
return __Pyx_NewRef(__pyx_m);
|
|
modname = PyObject_GetAttrString(spec, "name");
|
|
if (unlikely(!modname)) goto bad;
|
|
module = PyModule_NewObject(modname);
|
|
Py_DECREF(modname);
|
|
if (unlikely(!module)) goto bad;
|
|
moddict = PyModule_GetDict(module);
|
|
if (unlikely(!moddict)) goto bad;
|
|
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
|
|
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
|
|
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
|
|
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
|
|
return module;
|
|
bad:
|
|
Py_XDECREF(module);
|
|
return NULL;
|
|
}
|
|
|
|
|
|
static CYTHON_SMALL_CODE int __pyx_pymod_exec_providers(PyObject *__pyx_pyinit_module)
|
|
#endif
|
|
#endif
|
|
{
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
int __pyx_t_7;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
PyObject *__pyx_t_9 = NULL;
|
|
__Pyx_RefNannyDeclarations
|
|
#if CYTHON_PEP489_MULTI_PHASE_INIT
|
|
if (__pyx_m) {
|
|
if (__pyx_m == __pyx_pyinit_module) return 0;
|
|
PyErr_SetString(PyExc_RuntimeError, "Module 'providers' has already been imported. Re-initialisation is not supported.");
|
|
return -1;
|
|
}
|
|
#elif PY_MAJOR_VERSION >= 3
|
|
if (__pyx_m) return __Pyx_NewRef(__pyx_m);
|
|
#endif
|
|
#if CYTHON_REFNANNY
|
|
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
|
|
if (!__Pyx_RefNanny) {
|
|
PyErr_Clear();
|
|
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
|
|
if (!__Pyx_RefNanny)
|
|
Py_FatalError("failed to import 'refnanny' module");
|
|
}
|
|
#endif
|
|
__Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_providers(void)", 0);
|
|
if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#ifdef __Pxy_PyFrame_Initialize_Offsets
|
|
__Pxy_PyFrame_Initialize_Offsets();
|
|
#endif
|
|
__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#ifdef __Pyx_CyFunction_USED
|
|
if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#endif
|
|
#ifdef __Pyx_FusedFunction_USED
|
|
if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#endif
|
|
#ifdef __Pyx_Coroutine_USED
|
|
if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#endif
|
|
#ifdef __Pyx_Generator_USED
|
|
if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#endif
|
|
#ifdef __Pyx_AsyncGen_USED
|
|
if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#endif
|
|
#ifdef __Pyx_StopAsyncIteration_USED
|
|
if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#endif
|
|
/*--- Library function declarations ---*/
|
|
/*--- Threads initialization code ---*/
|
|
#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
|
|
#ifdef WITH_THREAD /* Python build with threading support? */
|
|
PyEval_InitThreads();
|
|
#endif
|
|
#endif
|
|
/*--- Module creation code ---*/
|
|
#if CYTHON_PEP489_MULTI_PHASE_INIT
|
|
__pyx_m = __pyx_pyinit_module;
|
|
Py_INCREF(__pyx_m);
|
|
#else
|
|
#if PY_MAJOR_VERSION < 3
|
|
__pyx_m = Py_InitModule4("providers", __pyx_methods, __pyx_k_Dependency_injector_providers_Po, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
|
|
#else
|
|
__pyx_m = PyModule_Create(&__pyx_moduledef);
|
|
#endif
|
|
if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#endif
|
|
__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
Py_INCREF(__pyx_d);
|
|
__pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
Py_INCREF(__pyx_b);
|
|
__pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
Py_INCREF(__pyx_cython_runtime);
|
|
if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
|
|
/*--- Initialize various global constants etc. ---*/
|
|
if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
|
|
if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#endif
|
|
if (__pyx_module_is_main_dependency_injector__providers) {
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
}
|
|
#if PY_MAJOR_VERSION >= 3
|
|
{
|
|
PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
if (!PyDict_GetItemString(modules, "dependency_injector.providers")) {
|
|
if (unlikely(PyDict_SetItemString(modules, "dependency_injector.providers", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
}
|
|
}
|
|
#endif
|
|
/*--- Builtin init code ---*/
|
|
if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
|
|
/*--- Constants init code ---*/
|
|
if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
|
|
/*--- Global type/function init code ---*/
|
|
(void)__Pyx_modinit_global_init_code();
|
|
if (unlikely(__Pyx_modinit_variable_export_code() != 0)) goto __pyx_L1_error;
|
|
if (unlikely(__Pyx_modinit_function_export_code() != 0)) goto __pyx_L1_error;
|
|
if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
|
|
(void)__Pyx_modinit_type_import_code();
|
|
(void)__Pyx_modinit_variable_import_code();
|
|
(void)__Pyx_modinit_function_import_code();
|
|
/*--- Execution code ---*/
|
|
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
|
|
if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
#endif
|
|
|
|
/* "dependency_injector/providers.pyx":7
|
|
*
|
|
*
|
|
* import copy # <<<<<<<<<<<<<<
|
|
* import sys
|
|
* import types
|
|
*/
|
|
__pyx_t_1 = __Pyx_Import(__pyx_n_s_copy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy, __pyx_t_1) < 0) __PYX_ERR(1, 7, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":8
|
|
*
|
|
* import copy
|
|
* import sys # <<<<<<<<<<<<<<
|
|
* import types
|
|
* import threading
|
|
*/
|
|
__pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(1, 8, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":9
|
|
* import copy
|
|
* import sys
|
|
* import types # <<<<<<<<<<<<<<
|
|
* import threading
|
|
*
|
|
*/
|
|
__pyx_t_1 = __Pyx_Import(__pyx_n_s_types, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_types, __pyx_t_1) < 0) __PYX_ERR(1, 9, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":10
|
|
* import sys
|
|
* import types
|
|
* import threading # <<<<<<<<<<<<<<
|
|
*
|
|
* try:
|
|
*/
|
|
__pyx_t_1 = __Pyx_Import(__pyx_n_s_threading, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_1) < 0) __PYX_ERR(1, 10, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":12
|
|
* import threading
|
|
*
|
|
* try: # <<<<<<<<<<<<<<
|
|
* import asyncio
|
|
* except ImportError:
|
|
*/
|
|
{
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
|
|
__Pyx_XGOTREF(__pyx_t_2);
|
|
__Pyx_XGOTREF(__pyx_t_3);
|
|
__Pyx_XGOTREF(__pyx_t_4);
|
|
/*try:*/ {
|
|
|
|
/* "dependency_injector/providers.pyx":13
|
|
*
|
|
* try:
|
|
* import asyncio # <<<<<<<<<<<<<<
|
|
* except ImportError:
|
|
* asyncio = None
|
|
*/
|
|
__pyx_t_1 = __Pyx_patch_asyncio(__Pyx_Import(__pyx_n_s_asyncio, 0, -1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L2_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_1) < 0) __PYX_ERR(1, 13, __pyx_L2_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":12
|
|
* import threading
|
|
*
|
|
* try: # <<<<<<<<<<<<<<
|
|
* import asyncio
|
|
* except ImportError:
|
|
*/
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":18
|
|
* _is_coroutine_marker = None
|
|
* else:
|
|
* if sys.version_info >= (3, 5, 3): # <<<<<<<<<<<<<<
|
|
* import asyncio.coroutines
|
|
* _is_coroutine_marker = asyncio.coroutines._is_coroutine
|
|
*/
|
|
/*else:*/ {
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 18, __pyx_L4_except_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 18, __pyx_L4_except_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__7, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 18, __pyx_L4_except_error)
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 18, __pyx_L4_except_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":19
|
|
* else:
|
|
* if sys.version_info >= (3, 5, 3):
|
|
* import asyncio.coroutines # <<<<<<<<<<<<<<
|
|
* _is_coroutine_marker = asyncio.coroutines._is_coroutine
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = __Pyx_Import(__pyx_n_s_asyncio_coroutines, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 19, __pyx_L4_except_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_1) < 0) __PYX_ERR(1, 19, __pyx_L4_except_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":20
|
|
* if sys.version_info >= (3, 5, 3):
|
|
* import asyncio.coroutines
|
|
* _is_coroutine_marker = asyncio.coroutines._is_coroutine # <<<<<<<<<<<<<<
|
|
* else:
|
|
* _is_coroutine_marker = True
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 20, __pyx_L4_except_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_coroutines); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 20, __pyx_L4_except_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_coroutine); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 20, __pyx_L4_except_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_coroutine_marker, __pyx_t_1) < 0) __PYX_ERR(1, 20, __pyx_L4_except_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":18
|
|
* _is_coroutine_marker = None
|
|
* else:
|
|
* if sys.version_info >= (3, 5, 3): # <<<<<<<<<<<<<<
|
|
* import asyncio.coroutines
|
|
* _is_coroutine_marker = asyncio.coroutines._is_coroutine
|
|
*/
|
|
goto __pyx_L8;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":22
|
|
* _is_coroutine_marker = asyncio.coroutines._is_coroutine
|
|
* else:
|
|
* _is_coroutine_marker = True # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
/*else*/ {
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_coroutine_marker, Py_True) < 0) __PYX_ERR(1, 22, __pyx_L4_except_error)
|
|
}
|
|
__pyx_L8:;
|
|
}
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
goto __pyx_L7_try_end;
|
|
__pyx_L2_error:;
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":14
|
|
* try:
|
|
* import asyncio
|
|
* except ImportError: # <<<<<<<<<<<<<<
|
|
* asyncio = None
|
|
* _is_coroutine_marker = None
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
|
|
if (__pyx_t_7) {
|
|
__Pyx_AddTraceback("dependency_injector.providers", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(1, 14, __pyx_L4_except_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
|
|
/* "dependency_injector/providers.pyx":15
|
|
* import asyncio
|
|
* except ImportError:
|
|
* asyncio = None # <<<<<<<<<<<<<<
|
|
* _is_coroutine_marker = None
|
|
* else:
|
|
*/
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, Py_None) < 0) __PYX_ERR(1, 15, __pyx_L4_except_error)
|
|
|
|
/* "dependency_injector/providers.pyx":16
|
|
* except ImportError:
|
|
* asyncio = None
|
|
* _is_coroutine_marker = None # <<<<<<<<<<<<<<
|
|
* else:
|
|
* if sys.version_info >= (3, 5, 3):
|
|
*/
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_coroutine_marker, Py_None) < 0) __PYX_ERR(1, 16, __pyx_L4_except_error)
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
goto __pyx_L3_exception_handled;
|
|
}
|
|
goto __pyx_L4_except_error;
|
|
__pyx_L4_except_error:;
|
|
|
|
/* "dependency_injector/providers.pyx":12
|
|
* import threading
|
|
*
|
|
* try: # <<<<<<<<<<<<<<
|
|
* import asyncio
|
|
* except ImportError:
|
|
*/
|
|
__Pyx_XGIVEREF(__pyx_t_2);
|
|
__Pyx_XGIVEREF(__pyx_t_3);
|
|
__Pyx_XGIVEREF(__pyx_t_4);
|
|
__Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
|
|
goto __pyx_L1_error;
|
|
__pyx_L3_exception_handled:;
|
|
__Pyx_XGIVEREF(__pyx_t_2);
|
|
__Pyx_XGIVEREF(__pyx_t_3);
|
|
__Pyx_XGIVEREF(__pyx_t_4);
|
|
__Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
|
|
__pyx_L7_try_end:;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":26
|
|
*
|
|
* from .errors import (
|
|
* Error, # <<<<<<<<<<<<<<
|
|
* NoSuchProviderError,
|
|
* )
|
|
*/
|
|
__pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 26, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_INCREF(__pyx_n_s_Error);
|
|
__Pyx_GIVEREF(__pyx_n_s_Error);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_Error);
|
|
__Pyx_INCREF(__pyx_n_s_NoSuchProviderError);
|
|
__Pyx_GIVEREF(__pyx_n_s_NoSuchProviderError);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_NoSuchProviderError);
|
|
|
|
/* "dependency_injector/providers.pyx":25
|
|
*
|
|
*
|
|
* from .errors import ( # <<<<<<<<<<<<<<
|
|
* Error,
|
|
* NoSuchProviderError,
|
|
*/
|
|
__pyx_t_5 = __Pyx_Import(__pyx_n_s_errors, __pyx_t_8, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 25, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 25, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_Error, __pyx_t_8) < 0) __PYX_ERR(1, 26, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NoSuchProviderError); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 25, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoSuchProviderError, __pyx_t_8) < 0) __PYX_ERR(1, 27, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":33
|
|
*
|
|
*
|
|
* if sys.version_info[0] == 3: # pragma: no cover # <<<<<<<<<<<<<<
|
|
* CLASS_TYPES = (type,)
|
|
* else: # pragma: no cover
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 33, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_version_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 33, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 33, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 33, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 33, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (__pyx_t_6) {
|
|
|
|
/* "dependency_injector/providers.pyx":34
|
|
*
|
|
* if sys.version_info[0] == 3: # pragma: no cover
|
|
* CLASS_TYPES = (type,) # <<<<<<<<<<<<<<
|
|
* else: # pragma: no cover
|
|
* CLASS_TYPES = (type, types.ClassType)
|
|
*/
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 34, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_INCREF(((PyObject *)(&PyType_Type)));
|
|
__Pyx_GIVEREF(((PyObject *)(&PyType_Type)));
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)(&PyType_Type)));
|
|
__Pyx_XGOTREF(__pyx_v_19dependency_injector_9providers_CLASS_TYPES);
|
|
__Pyx_DECREF_SET(__pyx_v_19dependency_injector_9providers_CLASS_TYPES, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":33
|
|
*
|
|
*
|
|
* if sys.version_info[0] == 3: # pragma: no cover # <<<<<<<<<<<<<<
|
|
* CLASS_TYPES = (type,)
|
|
* else: # pragma: no cover
|
|
*/
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "dependency_injector/providers.pyx":36
|
|
* CLASS_TYPES = (type,)
|
|
* else: # pragma: no cover
|
|
* CLASS_TYPES = (type, types.ClassType) # <<<<<<<<<<<<<<
|
|
*
|
|
* copy._deepcopy_dispatch[types.MethodType] = \
|
|
*/
|
|
/*else*/ {
|
|
__Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_types); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 36, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ClassType); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 36, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 36, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_INCREF(((PyObject *)(&PyType_Type)));
|
|
__Pyx_GIVEREF(((PyObject *)(&PyType_Type)));
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)(&PyType_Type)));
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__Pyx_XGOTREF(__pyx_v_19dependency_injector_9providers_CLASS_TYPES);
|
|
__Pyx_DECREF_SET(__pyx_v_19dependency_injector_9providers_CLASS_TYPES, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":39
|
|
*
|
|
* copy._deepcopy_dispatch[types.MethodType] = \
|
|
* lambda obj, memo: type(obj)(obj.im_func, # <<<<<<<<<<<<<<
|
|
* copy.deepcopy(obj.im_self, memo),
|
|
* obj.im_class)
|
|
*/
|
|
__pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_16lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_dependency_injector_providers, __pyx_d, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 39, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
|
|
/* "dependency_injector/providers.pyx":38
|
|
* CLASS_TYPES = (type, types.ClassType)
|
|
*
|
|
* copy._deepcopy_dispatch[types.MethodType] = \ # <<<<<<<<<<<<<<
|
|
* lambda obj, memo: type(obj)(obj.im_func,
|
|
* copy.deepcopy(obj.im_self, memo),
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 38, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_deepcopy_dispatch); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 38, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_MethodType); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 38, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_9, __pyx_t_8) < 0)) __PYX_ERR(1, 38, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
}
|
|
__pyx_L11:;
|
|
|
|
/* "dependency_injector/providers.pyx":91
|
|
* """
|
|
*
|
|
* __IS_PROVIDER__ = True # <<<<<<<<<<<<<<
|
|
*
|
|
* overriding_lock = threading.RLock()
|
|
*/
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Provider->tp_dict, __pyx_n_s_IS_PROVIDER, Py_True) < 0) __PYX_ERR(1, 91, __pyx_L1_error)
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Provider);
|
|
|
|
/* "dependency_injector/providers.pyx":93
|
|
* __IS_PROVIDER__ = True
|
|
*
|
|
* overriding_lock = threading.RLock() # <<<<<<<<<<<<<<
|
|
* """Overriding reentrant lock.
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_threading); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 93, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_RLock); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 93, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
__pyx_t_9 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
|
|
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
|
|
if (likely(__pyx_t_9)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
|
|
__Pyx_INCREF(__pyx_t_9);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_1, function);
|
|
}
|
|
}
|
|
__pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 93, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Provider->tp_dict, __pyx_n_s_overriding_lock, __pyx_t_8) < 0) __PYX_ERR(1, 93, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Provider);
|
|
|
|
/* "dependency_injector/providers.pyx":375
|
|
* """
|
|
*
|
|
* def __init__(self, type instance_of=object): # <<<<<<<<<<<<<<
|
|
* """Initializer."""
|
|
* self.__instance_of = instance_of
|
|
*/
|
|
if (!(likely(PyType_CheckExact(__pyx_builtin_object))||((__pyx_builtin_object) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_builtin_object)->tp_name), 0))) __PYX_ERR(1, 375, __pyx_L1_error)
|
|
__Pyx_INCREF(__pyx_builtin_object);
|
|
__pyx_k__2 = ((PyTypeObject*)__pyx_builtin_object);
|
|
__Pyx_GIVEREF(__pyx_builtin_object);
|
|
|
|
/* "dependency_injector/providers.pyx":814
|
|
* """
|
|
*
|
|
* __IS_DELEGATED__ = True # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedCallable->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 814, __pyx_L1_error)
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedCallable);
|
|
|
|
/* "dependency_injector/providers.pyx":904
|
|
* """
|
|
*
|
|
* _is_coroutine = _is_coroutine_marker # <<<<<<<<<<<<<<
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs):
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_is_coroutine_marker); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 904, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Coroutine->tp_dict, __pyx_n_s_is_coroutine, __pyx_t_8) < 0) __PYX_ERR(1, 904, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Coroutine);
|
|
|
|
/* "dependency_injector/providers.pyx":930
|
|
* """
|
|
*
|
|
* __IS_DELEGATED__ = True # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 930, __pyx_L1_error)
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine);
|
|
|
|
/* "dependency_injector/providers.pyx":1217
|
|
* """
|
|
*
|
|
* provided_type = None # <<<<<<<<<<<<<<
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs):
|
|
*/
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 1217, __pyx_L1_error)
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Factory);
|
|
|
|
/* "dependency_injector/providers.pyx":1396
|
|
* """
|
|
*
|
|
* __IS_DELEGATED__ = True # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedFactory->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1396, __pyx_L1_error)
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedFactory);
|
|
|
|
/* "dependency_injector/providers.pyx":1476
|
|
* """
|
|
*
|
|
* __IS_DELEGATED__ = True # <<<<<<<<<<<<<<
|
|
*
|
|
* def __init__(self, **factories):
|
|
*/
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_FactoryAggregate->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1476, __pyx_L1_error)
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_FactoryAggregate);
|
|
|
|
/* "dependency_injector/providers.pyx":1552
|
|
* """Base class of singleton providers."""
|
|
*
|
|
* provided_type = None # <<<<<<<<<<<<<<
|
|
*
|
|
* def __init__(self, provides, *args, **kwargs):
|
|
*/
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 1552, __pyx_L1_error)
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_BaseSingleton);
|
|
|
|
/* "dependency_injector/providers.pyx":1775
|
|
* """
|
|
*
|
|
* __IS_DELEGATED__ = True # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1775, __pyx_L1_error)
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton);
|
|
|
|
/* "dependency_injector/providers.pyx":1781
|
|
* """Thread-safe singleton provider."""
|
|
*
|
|
* storage_lock = threading.RLock() # <<<<<<<<<<<<<<
|
|
* """Storage reentrant lock.
|
|
*
|
|
*/
|
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_threading); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1781, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RLock); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1781, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_9);
|
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
__pyx_t_1 = NULL;
|
|
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
|
|
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
|
|
if (likely(__pyx_t_1)) {
|
|
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
|
|
__Pyx_INCREF(__pyx_t_1);
|
|
__Pyx_INCREF(function);
|
|
__Pyx_DECREF_SET(__pyx_t_9, function);
|
|
}
|
|
}
|
|
__pyx_t_8 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
|
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1781, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton->tp_dict, __pyx_n_s_storage_lock, __pyx_t_8) < 0) __PYX_ERR(1, 1781, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton);
|
|
|
|
/* "dependency_injector/providers.pyx":1831
|
|
* """
|
|
*
|
|
* __IS_DELEGATED__ = True # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1831, __pyx_L1_error)
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton);
|
|
|
|
/* "dependency_injector/providers.pyx":1899
|
|
* """
|
|
*
|
|
* __IS_DELEGATED__ = True # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1899, __pyx_L1_error)
|
|
PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton);
|
|
|
|
/* "dependency_injector/providers.pyx":2242
|
|
* return copy.deepcopy(instance, memo)
|
|
*
|
|
* def __add_sys_streams(memo): # <<<<<<<<<<<<<<
|
|
* """Add system streams to memo dictionary.
|
|
*
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_15__add_sys_streams, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2242, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_sys_streams, __pyx_t_8) < 0) __PYX_ERR(1, 2242, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Provider(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_18__pyx_unpickle_Provider, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Provider, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Provider__set_state(<Provider> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Provider__set_state(Provider __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_20__pyx_unpickle_Object, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Object, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Delegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_22__pyx_unpickle_Delegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Delegate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Delegate__set_state(<Delegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Delegate__set_state(Delegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_24__pyx_unpickle_Dependency, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Dependency, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_ExternalDependency(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_26__pyx_unpickle_ExternalDependency, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ExternalDependenc, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_ExternalDependency__set_state(<ExternalDependency> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ExternalDependency__set_state(ExternalDependency __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instance_of = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_28__pyx_unpickle_DependenciesContainer, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DependenciesConta, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_OverridingContext(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_30__pyx_unpickle_OverridingContext, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_OverridingContext, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_OverridingContext__set_state(<OverridingContext> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_OverridingContext__set_state(OverridingContext __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__overridden = __pyx_state[0]; __pyx_result.__overriding = __pyx_state[1]
|
|
* if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_32__pyx_unpickle_Callable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Callable, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedCallable(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_34__pyx_unpickle_DelegatedCallable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedCallable, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedCallable__set_state(<DelegatedCallable> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedCallable__set_state(DelegatedCallable __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_36__pyx_unpickle_AbstractCallable, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AbstractCallable, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_CallableDelegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_38__pyx_unpickle_CallableDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CallableDelegate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_CallableDelegate__set_state(<CallableDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_CallableDelegate__set_state(CallableDelegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_40__pyx_unpickle_Coroutine, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Coroutine, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_DelegatedCoroutine(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_42__pyx_unpickle_DelegatedCoroutine, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedCoroutin, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_DelegatedCoroutine__set_state(<DelegatedCoroutine> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_DelegatedCoroutine__set_state(DelegatedCoroutine __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__kwargs = __pyx_state[2]; __pyx_result.__kwargs_len = __pyx_state[3]; __pyx_result.__last_overriding = __pyx_state[4]; __pyx_result.__overridden = __pyx_state[5]; __pyx_result.__provides = __pyx_state[6]
|
|
* if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_44__pyx_unpickle_AbstractCoroutine, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AbstractCoroutine, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_CoroutineDelegate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_46__pyx_unpickle_CoroutineDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CoroutineDelegate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_CoroutineDelegate__set_state(<CoroutineDelegate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_CoroutineDelegate__set_state(CoroutineDelegate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__last_overriding = __pyx_state[0]; __pyx_result.__overridden = __pyx_state[1]; __pyx_result.__provides = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_48__pyx_unpickle_Configuration, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Configuration, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Factory(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_50__pyx_unpickle_Factory, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Factory, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Factory__set_state(<Factory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Factory__set_state(Factory __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_52__pyx_unpickle_DelegatedFactory, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedFactory, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_AbstractFactory(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_54__pyx_unpickle_AbstractFactory, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AbstractFactory, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_AbstractFactory__set_state(<AbstractFactory> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractFactory__set_state(AbstractFactory __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__attributes = __pyx_state[0]; __pyx_result.__attributes_len = __pyx_state[1]; __pyx_result.__instantiator = __pyx_state[2]; __pyx_result.__last_overriding = __pyx_state[3]; __pyx_result.__overridden = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_56__pyx_unpickle_FactoryDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FactoryDelegate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_FactoryAggregate(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_58__pyx_unpickle_FactoryAggregate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FactoryAggregate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_FactoryAggregate__set_state(<FactoryAggregate> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_FactoryAggregate__set_state(FactoryAggregate __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__factories = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_60__pyx_unpickle_BaseSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BaseSingleton, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_Singleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_62__pyx_unpickle_Singleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Singleton, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_Singleton__set_state(<Singleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_Singleton__set_state(Singleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_64__pyx_unpickle_DelegatedSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedSingleto, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_ThreadSafeSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_66__pyx_unpickle_ThreadSafeSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ThreadSafeSinglet, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_ThreadSafeSingleton__set_state(<ThreadSafeSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ThreadSafeSingleton__set_state(ThreadSafeSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]; __pyx_result.__storage_lock = __pyx_state[4]
|
|
* if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_68__pyx_unpickle_DelegatedThreadSafeSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedThreadSa, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_ThreadLocalSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_70__pyx_unpickle_ThreadLocalSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ThreadLocalSingle, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_ThreadLocalSingleton__set_state(<ThreadLocalSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_ThreadLocalSingleton__set_state(ThreadLocalSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]; __pyx_result.__storage = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_72__pyx_unpickle_DelegatedThreadLocalSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DelegatedThreadLo, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_AbstractSingleton(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_74__pyx_unpickle_AbstractSingleton, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AbstractSingleton, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_AbstractSingleton__set_state(<AbstractSingleton> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_AbstractSingleton__set_state(AbstractSingleton __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__instantiator = __pyx_state[0]; __pyx_result.__last_overriding = __pyx_state[1]; __pyx_result.__overridden = __pyx_state[2]
|
|
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_76__pyx_unpickle_SingletonDelegate, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SingletonDelegate, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_List(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_78__pyx_unpickle_List, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_List, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_List__set_state(<List> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_List__set_state(List __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__args = __pyx_state[0]; __pyx_result.__args_len = __pyx_state[1]; __pyx_result.__last_overriding = __pyx_state[2]; __pyx_result.__overridden = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_80__pyx_unpickle_Injection, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Injection, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":1
|
|
* def __pyx_unpickle_PositionalInjection(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
* cdef object __pyx_PickleError
|
|
* cdef object __pyx_result
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_82__pyx_unpickle_PositionalInjection, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PositionalInjecti, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "(tree fragment)":11
|
|
* __pyx_unpickle_PositionalInjection__set_state(<PositionalInjection> __pyx_result, __pyx_state)
|
|
* return __pyx_result
|
|
* cdef __pyx_unpickle_PositionalInjection__set_state(PositionalInjection __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
|
|
* __pyx_result.__call = __pyx_state[0]; __pyx_result.__is_delegated = __pyx_state[1]; __pyx_result.__is_provider = __pyx_state[2]; __pyx_result.__value = __pyx_state[3]
|
|
* if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
|
|
*/
|
|
__pyx_t_8 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_9providers_84__pyx_unpickle_NamedInjection, NULL, __pyx_n_s_dependency_injector_providers); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_NamedInjection, __pyx_t_8) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "dependency_injector/providers.pyx":1
|
|
* """Dependency injector providers. # <<<<<<<<<<<<<<
|
|
*
|
|
* Powered by Cython.
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_8) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "dependency_injector/providers.pxd":302
|
|
*
|
|
*
|
|
* cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<<
|
|
* cdef object instance
|
|
*
|
|
*/
|
|
|
|
/*--- Wrapped vars code ---*/
|
|
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
__Pyx_XDECREF(__pyx_t_9);
|
|
if (__pyx_m) {
|
|
if (__pyx_d) {
|
|
__Pyx_AddTraceback("init dependency_injector.providers", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
}
|
|
Py_CLEAR(__pyx_m);
|
|
} else if (!PyErr_Occurred()) {
|
|
PyErr_SetString(PyExc_ImportError, "init dependency_injector.providers");
|
|
}
|
|
__pyx_L0:;
|
|
__Pyx_RefNannyFinishContext();
|
|
#if CYTHON_PEP489_MULTI_PHASE_INIT
|
|
return (__pyx_m != NULL) ? 0 : -1;
|
|
#elif PY_MAJOR_VERSION >= 3
|
|
return __pyx_m;
|
|
#else
|
|
return;
|
|
#endif
|
|
}
|
|
|
|
/* --- Runtime support code --- */
|
|
/* Refnanny */
|
|
#if CYTHON_REFNANNY
|
|
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
|
|
PyObject *m = NULL, *p = NULL;
|
|
void *r = NULL;
|
|
m = PyImport_ImportModule(modname);
|
|
if (!m) goto end;
|
|
p = PyObject_GetAttrString(m, "RefNannyAPI");
|
|
if (!p) goto end;
|
|
r = PyLong_AsVoidPtr(p);
|
|
end:
|
|
Py_XDECREF(p);
|
|
Py_XDECREF(m);
|
|
return (__Pyx_RefNannyAPIStruct *)r;
|
|
}
|
|
#endif
|
|
|
|
/* PyObjectGetAttrStr */
|
|
#if CYTHON_USE_TYPE_SLOTS
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
|
|
PyTypeObject* tp = Py_TYPE(obj);
|
|
if (likely(tp->tp_getattro))
|
|
return tp->tp_getattro(obj, attr_name);
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(tp->tp_getattr))
|
|
return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
|
|
#endif
|
|
return PyObject_GetAttr(obj, attr_name);
|
|
}
|
|
#endif
|
|
|
|
/* GetBuiltinName */
|
|
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
|
|
PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
|
|
if (unlikely(!result)) {
|
|
PyErr_Format(PyExc_NameError,
|
|
#if PY_MAJOR_VERSION >= 3
|
|
"name '%U' is not defined", name);
|
|
#else
|
|
"name '%.200s' is not defined", PyString_AS_STRING(name));
|
|
#endif
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* RaiseArgTupleInvalid */
|
|
static void __Pyx_RaiseArgtupleInvalid(
|
|
const char* func_name,
|
|
int exact,
|
|
Py_ssize_t num_min,
|
|
Py_ssize_t num_max,
|
|
Py_ssize_t num_found)
|
|
{
|
|
Py_ssize_t num_expected;
|
|
const char *more_or_less;
|
|
if (num_found < num_min) {
|
|
num_expected = num_min;
|
|
more_or_less = "at least";
|
|
} else {
|
|
num_expected = num_max;
|
|
more_or_less = "at most";
|
|
}
|
|
if (exact) {
|
|
more_or_less = "exactly";
|
|
}
|
|
PyErr_Format(PyExc_TypeError,
|
|
"%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
|
|
func_name, more_or_less, num_expected,
|
|
(num_expected == 1) ? "" : "s", num_found);
|
|
}
|
|
|
|
/* RaiseDoubleKeywords */
|
|
static void __Pyx_RaiseDoubleKeywordsError(
|
|
const char* func_name,
|
|
PyObject* kw_name)
|
|
{
|
|
PyErr_Format(PyExc_TypeError,
|
|
#if PY_MAJOR_VERSION >= 3
|
|
"%s() got multiple values for keyword argument '%U'", func_name, kw_name);
|
|
#else
|
|
"%s() got multiple values for keyword argument '%s'", func_name,
|
|
PyString_AsString(kw_name));
|
|
#endif
|
|
}
|
|
|
|
/* ParseKeywords */
|
|
static int __Pyx_ParseOptionalKeywords(
|
|
PyObject *kwds,
|
|
PyObject **argnames[],
|
|
PyObject *kwds2,
|
|
PyObject *values[],
|
|
Py_ssize_t num_pos_args,
|
|
const char* function_name)
|
|
{
|
|
PyObject *key = 0, *value = 0;
|
|
Py_ssize_t pos = 0;
|
|
PyObject*** name;
|
|
PyObject*** first_kw_arg = argnames + num_pos_args;
|
|
while (PyDict_Next(kwds, &pos, &key, &value)) {
|
|
name = first_kw_arg;
|
|
while (*name && (**name != key)) name++;
|
|
if (*name) {
|
|
values[name-argnames] = value;
|
|
continue;
|
|
}
|
|
name = first_kw_arg;
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
|
|
while (*name) {
|
|
if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
|
|
&& _PyString_Eq(**name, key)) {
|
|
values[name-argnames] = value;
|
|
break;
|
|
}
|
|
name++;
|
|
}
|
|
if (*name) continue;
|
|
else {
|
|
PyObject*** argname = argnames;
|
|
while (argname != first_kw_arg) {
|
|
if ((**argname == key) || (
|
|
(CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
|
|
&& _PyString_Eq(**argname, key))) {
|
|
goto arg_passed_twice;
|
|
}
|
|
argname++;
|
|
}
|
|
}
|
|
} else
|
|
#endif
|
|
if (likely(PyUnicode_Check(key))) {
|
|
while (*name) {
|
|
int cmp = (**name == key) ? 0 :
|
|
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
|
|
(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
|
|
#endif
|
|
PyUnicode_Compare(**name, key);
|
|
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
|
|
if (cmp == 0) {
|
|
values[name-argnames] = value;
|
|
break;
|
|
}
|
|
name++;
|
|
}
|
|
if (*name) continue;
|
|
else {
|
|
PyObject*** argname = argnames;
|
|
while (argname != first_kw_arg) {
|
|
int cmp = (**argname == key) ? 0 :
|
|
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
|
|
(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
|
|
#endif
|
|
PyUnicode_Compare(**argname, key);
|
|
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
|
|
if (cmp == 0) goto arg_passed_twice;
|
|
argname++;
|
|
}
|
|
}
|
|
} else
|
|
goto invalid_keyword_type;
|
|
if (kwds2) {
|
|
if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
|
|
} else {
|
|
goto invalid_keyword;
|
|
}
|
|
}
|
|
return 0;
|
|
arg_passed_twice:
|
|
__Pyx_RaiseDoubleKeywordsError(function_name, key);
|
|
goto bad;
|
|
invalid_keyword_type:
|
|
PyErr_Format(PyExc_TypeError,
|
|
"%.200s() keywords must be strings", function_name);
|
|
goto bad;
|
|
invalid_keyword:
|
|
PyErr_Format(PyExc_TypeError,
|
|
#if PY_MAJOR_VERSION < 3
|
|
"%.200s() got an unexpected keyword argument '%.200s'",
|
|
function_name, PyString_AsString(key));
|
|
#else
|
|
"%s() got an unexpected keyword argument '%U'",
|
|
function_name, key);
|
|
#endif
|
|
bad:
|
|
return -1;
|
|
}
|
|
|
|
/* PyDictVersioning */
|
|
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
|
|
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
|
|
PyObject *dict = Py_TYPE(obj)->tp_dict;
|
|
return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
|
|
}
|
|
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
|
|
PyObject **dictptr = NULL;
|
|
Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
|
|
if (offset) {
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
|
|
#else
|
|
dictptr = _PyObject_GetDictPtr(obj);
|
|
#endif
|
|
}
|
|
return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
|
|
}
|
|
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
|
|
PyObject *dict = Py_TYPE(obj)->tp_dict;
|
|
if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
|
|
return 0;
|
|
return obj_dict_version == __Pyx_get_object_dict_version(obj);
|
|
}
|
|
#endif
|
|
|
|
/* GetModuleGlobalName */
|
|
#if CYTHON_USE_DICT_VERSIONS
|
|
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
|
|
#else
|
|
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
|
|
#endif
|
|
{
|
|
PyObject *result;
|
|
#if !CYTHON_AVOID_BORROWED_REFS
|
|
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
|
|
result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
|
|
__PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
|
|
if (likely(result)) {
|
|
return __Pyx_NewRef(result);
|
|
} else if (unlikely(PyErr_Occurred())) {
|
|
return NULL;
|
|
}
|
|
#else
|
|
result = PyDict_GetItem(__pyx_d, name);
|
|
__PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
|
|
if (likely(result)) {
|
|
return __Pyx_NewRef(result);
|
|
}
|
|
#endif
|
|
#else
|
|
result = PyObject_GetItem(__pyx_d, name);
|
|
__PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
|
|
if (likely(result)) {
|
|
return __Pyx_NewRef(result);
|
|
}
|
|
PyErr_Clear();
|
|
#endif
|
|
return __Pyx_GetBuiltinName(name);
|
|
}
|
|
|
|
/* PyFunctionFastCall */
|
|
#if CYTHON_FAST_PYCALL
|
|
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
|
|
PyObject *globals) {
|
|
PyFrameObject *f;
|
|
PyThreadState *tstate = __Pyx_PyThreadState_Current;
|
|
PyObject **fastlocals;
|
|
Py_ssize_t i;
|
|
PyObject *result;
|
|
assert(globals != NULL);
|
|
/* XXX Perhaps we should create a specialized
|
|
PyFrame_New() that doesn't take locals, but does
|
|
take builtins without sanity checking them.
|
|
*/
|
|
assert(tstate != NULL);
|
|
f = PyFrame_New(tstate, co, globals, NULL);
|
|
if (f == NULL) {
|
|
return NULL;
|
|
}
|
|
fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
|
|
for (i = 0; i < na; i++) {
|
|
Py_INCREF(*args);
|
|
fastlocals[i] = *args++;
|
|
}
|
|
result = PyEval_EvalFrameEx(f,0);
|
|
++tstate->recursion_depth;
|
|
Py_DECREF(f);
|
|
--tstate->recursion_depth;
|
|
return result;
|
|
}
|
|
#if 1 || PY_VERSION_HEX < 0x030600B1
|
|
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
|
|
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
|
|
PyObject *globals = PyFunction_GET_GLOBALS(func);
|
|
PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
|
|
PyObject *closure;
|
|
#if PY_MAJOR_VERSION >= 3
|
|
PyObject *kwdefs;
|
|
#endif
|
|
PyObject *kwtuple, **k;
|
|
PyObject **d;
|
|
Py_ssize_t nd;
|
|
Py_ssize_t nk;
|
|
PyObject *result;
|
|
assert(kwargs == NULL || PyDict_Check(kwargs));
|
|
nk = kwargs ? PyDict_Size(kwargs) : 0;
|
|
if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
|
|
return NULL;
|
|
}
|
|
if (
|
|
#if PY_MAJOR_VERSION >= 3
|
|
co->co_kwonlyargcount == 0 &&
|
|
#endif
|
|
likely(kwargs == NULL || nk == 0) &&
|
|
co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
|
|
if (argdefs == NULL && co->co_argcount == nargs) {
|
|
result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
|
|
goto done;
|
|
}
|
|
else if (nargs == 0 && argdefs != NULL
|
|
&& co->co_argcount == Py_SIZE(argdefs)) {
|
|
/* function called with no arguments, but all parameters have
|
|
a default value: use default values as arguments .*/
|
|
args = &PyTuple_GET_ITEM(argdefs, 0);
|
|
result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
|
|
goto done;
|
|
}
|
|
}
|
|
if (kwargs != NULL) {
|
|
Py_ssize_t pos, i;
|
|
kwtuple = PyTuple_New(2 * nk);
|
|
if (kwtuple == NULL) {
|
|
result = NULL;
|
|
goto done;
|
|
}
|
|
k = &PyTuple_GET_ITEM(kwtuple, 0);
|
|
pos = i = 0;
|
|
while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
|
|
Py_INCREF(k[i]);
|
|
Py_INCREF(k[i+1]);
|
|
i += 2;
|
|
}
|
|
nk = i / 2;
|
|
}
|
|
else {
|
|
kwtuple = NULL;
|
|
k = NULL;
|
|
}
|
|
closure = PyFunction_GET_CLOSURE(func);
|
|
#if PY_MAJOR_VERSION >= 3
|
|
kwdefs = PyFunction_GET_KW_DEFAULTS(func);
|
|
#endif
|
|
if (argdefs != NULL) {
|
|
d = &PyTuple_GET_ITEM(argdefs, 0);
|
|
nd = Py_SIZE(argdefs);
|
|
}
|
|
else {
|
|
d = NULL;
|
|
nd = 0;
|
|
}
|
|
#if PY_MAJOR_VERSION >= 3
|
|
result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
|
|
args, (int)nargs,
|
|
k, (int)nk,
|
|
d, (int)nd, kwdefs, closure);
|
|
#else
|
|
result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
|
|
args, (int)nargs,
|
|
k, (int)nk,
|
|
d, (int)nd, closure);
|
|
#endif
|
|
Py_XDECREF(kwtuple);
|
|
done:
|
|
Py_LeaveRecursiveCall();
|
|
return result;
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
/* PyCFunctionFastCall */
|
|
#if CYTHON_FAST_PYCCALL
|
|
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
|
|
PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
|
|
PyCFunction meth = PyCFunction_GET_FUNCTION(func);
|
|
PyObject *self = PyCFunction_GET_SELF(func);
|
|
int flags = PyCFunction_GET_FLAGS(func);
|
|
assert(PyCFunction_Check(func));
|
|
assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
|
|
assert(nargs >= 0);
|
|
assert(nargs == 0 || args != NULL);
|
|
/* _PyCFunction_FastCallDict() must not be called with an exception set,
|
|
because it may clear it (directly or indirectly) and so the
|
|
caller loses its exception */
|
|
assert(!PyErr_Occurred());
|
|
if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
|
|
return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
|
|
} else {
|
|
return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
|
|
}
|
|
}
|
|
#endif
|
|
|
|
/* PyObjectCall */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
|
|
PyObject *result;
|
|
ternaryfunc call = func->ob_type->tp_call;
|
|
if (unlikely(!call))
|
|
return PyObject_Call(func, arg, kw);
|
|
if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
|
|
return NULL;
|
|
result = (*call)(func, arg, kw);
|
|
Py_LeaveRecursiveCall();
|
|
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
|
|
PyErr_SetString(
|
|
PyExc_SystemError,
|
|
"NULL result without error in PyObject_Call");
|
|
}
|
|
return result;
|
|
}
|
|
#endif
|
|
|
|
/* KeywordStringCheck */
|
|
static int __Pyx_CheckKeywordStrings(
|
|
PyObject *kwdict,
|
|
const char* function_name,
|
|
int kw_allowed)
|
|
{
|
|
PyObject* key = 0;
|
|
Py_ssize_t pos = 0;
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
|
|
goto invalid_keyword;
|
|
return 1;
|
|
#else
|
|
while (PyDict_Next(kwdict, &pos, &key, 0)) {
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (unlikely(!PyString_Check(key)))
|
|
#endif
|
|
if (unlikely(!PyUnicode_Check(key)))
|
|
goto invalid_keyword_type;
|
|
}
|
|
if ((!kw_allowed) && unlikely(key))
|
|
goto invalid_keyword;
|
|
return 1;
|
|
invalid_keyword_type:
|
|
PyErr_Format(PyExc_TypeError,
|
|
"%.200s() keywords must be strings", function_name);
|
|
return 0;
|
|
#endif
|
|
invalid_keyword:
|
|
PyErr_Format(PyExc_TypeError,
|
|
#if PY_MAJOR_VERSION < 3
|
|
"%.200s() got an unexpected keyword argument '%.200s'",
|
|
function_name, PyString_AsString(key));
|
|
#else
|
|
"%s() got an unexpected keyword argument '%U'",
|
|
function_name, key);
|
|
#endif
|
|
return 0;
|
|
}
|
|
|
|
/* PyObjectCallMethO */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
|
|
PyObject *self, *result;
|
|
PyCFunction cfunc;
|
|
cfunc = PyCFunction_GET_FUNCTION(func);
|
|
self = PyCFunction_GET_SELF(func);
|
|
if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
|
|
return NULL;
|
|
result = cfunc(self, arg);
|
|
Py_LeaveRecursiveCall();
|
|
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
|
|
PyErr_SetString(
|
|
PyExc_SystemError,
|
|
"NULL result without error in PyObject_Call");
|
|
}
|
|
return result;
|
|
}
|
|
#endif
|
|
|
|
/* PyObjectCallNoArg */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(func)) {
|
|
return __Pyx_PyFunction_FastCall(func, NULL, 0);
|
|
}
|
|
#endif
|
|
#ifdef __Pyx_CyFunction_USED
|
|
if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
|
|
#else
|
|
if (likely(PyCFunction_Check(func)))
|
|
#endif
|
|
{
|
|
if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
|
|
return __Pyx_PyObject_CallMethO(func, NULL);
|
|
}
|
|
}
|
|
return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
|
|
}
|
|
#endif
|
|
|
|
/* PyObjectCallOneArg */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
|
|
PyObject *result;
|
|
PyObject *args = PyTuple_New(1);
|
|
if (unlikely(!args)) return NULL;
|
|
Py_INCREF(arg);
|
|
PyTuple_SET_ITEM(args, 0, arg);
|
|
result = __Pyx_PyObject_Call(func, args, NULL);
|
|
Py_DECREF(args);
|
|
return result;
|
|
}
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(func)) {
|
|
return __Pyx_PyFunction_FastCall(func, &arg, 1);
|
|
}
|
|
#endif
|
|
if (likely(PyCFunction_Check(func))) {
|
|
if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
|
|
return __Pyx_PyObject_CallMethO(func, arg);
|
|
#if CYTHON_FAST_PYCCALL
|
|
} else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
|
|
return __Pyx_PyCFunction_FastCall(func, &arg, 1);
|
|
#endif
|
|
}
|
|
}
|
|
return __Pyx__PyObject_CallOneArg(func, arg);
|
|
}
|
|
#else
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
|
|
PyObject *result;
|
|
PyObject *args = PyTuple_Pack(1, arg);
|
|
if (unlikely(!args)) return NULL;
|
|
result = __Pyx_PyObject_Call(func, args, NULL);
|
|
Py_DECREF(args);
|
|
return result;
|
|
}
|
|
#endif
|
|
|
|
/* PyObjectCall2Args */
|
|
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
|
|
PyObject *args, *result = NULL;
|
|
#if CYTHON_FAST_PYCALL
|
|
if (PyFunction_Check(function)) {
|
|
PyObject *args[2] = {arg1, arg2};
|
|
return __Pyx_PyFunction_FastCall(function, args, 2);
|
|
}
|
|
#endif
|
|
#if CYTHON_FAST_PYCCALL
|
|
if (__Pyx_PyFastCFunction_Check(function)) {
|
|
PyObject *args[2] = {arg1, arg2};
|
|
return __Pyx_PyCFunction_FastCall(function, args, 2);
|
|
}
|
|
#endif
|
|
args = PyTuple_New(2);
|
|
if (unlikely(!args)) goto done;
|
|
Py_INCREF(arg1);
|
|
PyTuple_SET_ITEM(args, 0, arg1);
|
|
Py_INCREF(arg2);
|
|
PyTuple_SET_ITEM(args, 1, arg2);
|
|
Py_INCREF(function);
|
|
result = __Pyx_PyObject_Call(function, args, NULL);
|
|
Py_DECREF(args);
|
|
Py_DECREF(function);
|
|
done:
|
|
return result;
|
|
}
|
|
|
|
/* ExtTypeTest */
|
|
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
|
|
if (unlikely(!type)) {
|
|
PyErr_SetString(PyExc_SystemError, "Missing type object");
|
|
return 0;
|
|
}
|
|
if (likely(__Pyx_TypeCheck(obj, type)))
|
|
return 1;
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
|
|
Py_TYPE(obj)->tp_name, type->tp_name);
|
|
return 0;
|
|
}
|
|
|
|
/* PyErrFetchRestore */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
|
|
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
tmp_type = tstate->curexc_type;
|
|
tmp_value = tstate->curexc_value;
|
|
tmp_tb = tstate->curexc_traceback;
|
|
tstate->curexc_type = type;
|
|
tstate->curexc_value = value;
|
|
tstate->curexc_traceback = tb;
|
|
Py_XDECREF(tmp_type);
|
|
Py_XDECREF(tmp_value);
|
|
Py_XDECREF(tmp_tb);
|
|
}
|
|
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
|
|
*type = tstate->curexc_type;
|
|
*value = tstate->curexc_value;
|
|
*tb = tstate->curexc_traceback;
|
|
tstate->curexc_type = 0;
|
|
tstate->curexc_value = 0;
|
|
tstate->curexc_traceback = 0;
|
|
}
|
|
#endif
|
|
|
|
/* RaiseException */
|
|
#if PY_MAJOR_VERSION < 3
|
|
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
|
|
CYTHON_UNUSED PyObject *cause) {
|
|
__Pyx_PyThreadState_declare
|
|
Py_XINCREF(type);
|
|
if (!value || value == Py_None)
|
|
value = NULL;
|
|
else
|
|
Py_INCREF(value);
|
|
if (!tb || tb == Py_None)
|
|
tb = NULL;
|
|
else {
|
|
Py_INCREF(tb);
|
|
if (!PyTraceBack_Check(tb)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: arg 3 must be a traceback or None");
|
|
goto raise_error;
|
|
}
|
|
}
|
|
if (PyType_Check(type)) {
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
if (!value) {
|
|
Py_INCREF(Py_None);
|
|
value = Py_None;
|
|
}
|
|
#endif
|
|
PyErr_NormalizeException(&type, &value, &tb);
|
|
} else {
|
|
if (value) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"instance exception may not have a separate value");
|
|
goto raise_error;
|
|
}
|
|
value = type;
|
|
type = (PyObject*) Py_TYPE(type);
|
|
Py_INCREF(type);
|
|
if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: exception class must be a subclass of BaseException");
|
|
goto raise_error;
|
|
}
|
|
}
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ErrRestore(type, value, tb);
|
|
return;
|
|
raise_error:
|
|
Py_XDECREF(value);
|
|
Py_XDECREF(type);
|
|
Py_XDECREF(tb);
|
|
return;
|
|
}
|
|
#else
|
|
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
|
|
PyObject* owned_instance = NULL;
|
|
if (tb == Py_None) {
|
|
tb = 0;
|
|
} else if (tb && !PyTraceBack_Check(tb)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: arg 3 must be a traceback or None");
|
|
goto bad;
|
|
}
|
|
if (value == Py_None)
|
|
value = 0;
|
|
if (PyExceptionInstance_Check(type)) {
|
|
if (value) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"instance exception may not have a separate value");
|
|
goto bad;
|
|
}
|
|
value = type;
|
|
type = (PyObject*) Py_TYPE(value);
|
|
} else if (PyExceptionClass_Check(type)) {
|
|
PyObject *instance_class = NULL;
|
|
if (value && PyExceptionInstance_Check(value)) {
|
|
instance_class = (PyObject*) Py_TYPE(value);
|
|
if (instance_class != type) {
|
|
int is_subclass = PyObject_IsSubclass(instance_class, type);
|
|
if (!is_subclass) {
|
|
instance_class = NULL;
|
|
} else if (unlikely(is_subclass == -1)) {
|
|
goto bad;
|
|
} else {
|
|
type = instance_class;
|
|
}
|
|
}
|
|
}
|
|
if (!instance_class) {
|
|
PyObject *args;
|
|
if (!value)
|
|
args = PyTuple_New(0);
|
|
else if (PyTuple_Check(value)) {
|
|
Py_INCREF(value);
|
|
args = value;
|
|
} else
|
|
args = PyTuple_Pack(1, value);
|
|
if (!args)
|
|
goto bad;
|
|
owned_instance = PyObject_Call(type, args, NULL);
|
|
Py_DECREF(args);
|
|
if (!owned_instance)
|
|
goto bad;
|
|
value = owned_instance;
|
|
if (!PyExceptionInstance_Check(value)) {
|
|
PyErr_Format(PyExc_TypeError,
|
|
"calling %R should have returned an instance of "
|
|
"BaseException, not %R",
|
|
type, Py_TYPE(value));
|
|
goto bad;
|
|
}
|
|
}
|
|
} else {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: exception class must be a subclass of BaseException");
|
|
goto bad;
|
|
}
|
|
if (cause) {
|
|
PyObject *fixed_cause;
|
|
if (cause == Py_None) {
|
|
fixed_cause = NULL;
|
|
} else if (PyExceptionClass_Check(cause)) {
|
|
fixed_cause = PyObject_CallObject(cause, NULL);
|
|
if (fixed_cause == NULL)
|
|
goto bad;
|
|
} else if (PyExceptionInstance_Check(cause)) {
|
|
fixed_cause = cause;
|
|
Py_INCREF(fixed_cause);
|
|
} else {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"exception causes must derive from "
|
|
"BaseException");
|
|
goto bad;
|
|
}
|
|
PyException_SetCause(value, fixed_cause);
|
|
}
|
|
PyErr_SetObject(type, value);
|
|
if (tb) {
|
|
#if CYTHON_COMPILING_IN_PYPY
|
|
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
|
|
Py_INCREF(tb);
|
|
PyErr_Restore(tmp_type, tmp_value, tb);
|
|
Py_XDECREF(tmp_tb);
|
|
#else
|
|
PyThreadState *tstate = __Pyx_PyThreadState_Current;
|
|
PyObject* tmp_tb = tstate->curexc_traceback;
|
|
if (tb != tmp_tb) {
|
|
Py_INCREF(tb);
|
|
tstate->curexc_traceback = tb;
|
|
Py_XDECREF(tmp_tb);
|
|
}
|
|
#endif
|
|
}
|
|
bad:
|
|
Py_XDECREF(owned_instance);
|
|
return;
|
|
}
|
|
#endif
|
|
|
|
/* GetTopmostException */
|
|
#if CYTHON_USE_EXC_INFO_STACK
|
|
static _PyErr_StackItem *
|
|
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
|
|
{
|
|
_PyErr_StackItem *exc_info = tstate->exc_info;
|
|
while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
|
|
exc_info->previous_item != NULL)
|
|
{
|
|
exc_info = exc_info->previous_item;
|
|
}
|
|
return exc_info;
|
|
}
|
|
#endif
|
|
|
|
/* SaveResetException */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
|
|
#if CYTHON_USE_EXC_INFO_STACK
|
|
_PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
|
|
*type = exc_info->exc_type;
|
|
*value = exc_info->exc_value;
|
|
*tb = exc_info->exc_traceback;
|
|
#else
|
|
*type = tstate->exc_type;
|
|
*value = tstate->exc_value;
|
|
*tb = tstate->exc_traceback;
|
|
#endif
|
|
Py_XINCREF(*type);
|
|
Py_XINCREF(*value);
|
|
Py_XINCREF(*tb);
|
|
}
|
|
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
|
|
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
#if CYTHON_USE_EXC_INFO_STACK
|
|
_PyErr_StackItem *exc_info = tstate->exc_info;
|
|
tmp_type = exc_info->exc_type;
|
|
tmp_value = exc_info->exc_value;
|
|
tmp_tb = exc_info->exc_traceback;
|
|
exc_info->exc_type = type;
|
|
exc_info->exc_value = value;
|
|
exc_info->exc_traceback = tb;
|
|
#else
|
|
tmp_type = tstate->exc_type;
|
|
tmp_value = tstate->exc_value;
|
|
tmp_tb = tstate->exc_traceback;
|
|
tstate->exc_type = type;
|
|
tstate->exc_value = value;
|
|
tstate->exc_traceback = tb;
|
|
#endif
|
|
Py_XDECREF(tmp_type);
|
|
Py_XDECREF(tmp_value);
|
|
Py_XDECREF(tmp_tb);
|
|
}
|
|
#endif
|
|
|
|
/* GetException */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
|
|
#else
|
|
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
|
|
#endif
|
|
{
|
|
PyObject *local_type, *local_value, *local_tb;
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
local_type = tstate->curexc_type;
|
|
local_value = tstate->curexc_value;
|
|
local_tb = tstate->curexc_traceback;
|
|
tstate->curexc_type = 0;
|
|
tstate->curexc_value = 0;
|
|
tstate->curexc_traceback = 0;
|
|
#else
|
|
PyErr_Fetch(&local_type, &local_value, &local_tb);
|
|
#endif
|
|
PyErr_NormalizeException(&local_type, &local_value, &local_tb);
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
if (unlikely(tstate->curexc_type))
|
|
#else
|
|
if (unlikely(PyErr_Occurred()))
|
|
#endif
|
|
goto bad;
|
|
#if PY_MAJOR_VERSION >= 3
|
|
if (local_tb) {
|
|
if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
|
|
goto bad;
|
|
}
|
|
#endif
|
|
Py_XINCREF(local_tb);
|
|
Py_XINCREF(local_type);
|
|
Py_XINCREF(local_value);
|
|
*type = local_type;
|
|
*value = local_value;
|
|
*tb = local_tb;
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
#if CYTHON_USE_EXC_INFO_STACK
|
|
{
|
|
_PyErr_StackItem *exc_info = tstate->exc_info;
|
|
tmp_type = exc_info->exc_type;
|
|
tmp_value = exc_info->exc_value;
|
|
tmp_tb = exc_info->exc_traceback;
|
|
exc_info->exc_type = local_type;
|
|
exc_info->exc_value = local_value;
|
|
exc_info->exc_traceback = local_tb;
|
|
}
|
|
#else
|
|
tmp_type = tstate->exc_type;
|
|
tmp_value = tstate->exc_value;
|
|
tmp_tb = tstate->exc_traceback;
|
|
tstate->exc_type = local_type;
|
|
tstate->exc_value = local_value;
|
|
tstate->exc_traceback = local_tb;
|
|
#endif
|
|
Py_XDECREF(tmp_type);
|
|
Py_XDECREF(tmp_value);
|
|
Py_XDECREF(tmp_tb);
|
|
#else
|
|
PyErr_SetExcInfo(local_type, local_value, local_tb);
|
|
#endif
|
|
return 0;
|
|
bad:
|
|
*type = 0;
|
|
*value = 0;
|
|
*tb = 0;
|
|
Py_XDECREF(local_type);
|
|
Py_XDECREF(local_value);
|
|
Py_XDECREF(local_tb);
|
|
return -1;
|
|
}
|
|
|
|
/* SliceTupleAndList */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
|
|
Py_ssize_t start = *_start, stop = *_stop, length = *_length;
|
|
if (start < 0) {
|
|
start += length;
|
|
if (start < 0)
|
|
start = 0;
|
|
}
|
|
if (stop < 0)
|
|
stop += length;
|
|
else if (stop > length)
|
|
stop = length;
|
|
*_length = stop - start;
|
|
*_start = start;
|
|
*_stop = stop;
|
|
}
|
|
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
|
|
PyObject *v;
|
|
Py_ssize_t i;
|
|
for (i = 0; i < length; i++) {
|
|
v = dest[i] = src[i];
|
|
Py_INCREF(v);
|
|
}
|
|
}
|
|
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
|
|
PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
|
|
PyObject* dest;
|
|
Py_ssize_t length = PyList_GET_SIZE(src);
|
|
__Pyx_crop_slice(&start, &stop, &length);
|
|
if (unlikely(length <= 0))
|
|
return PyList_New(0);
|
|
dest = PyList_New(length);
|
|
if (unlikely(!dest))
|
|
return NULL;
|
|
__Pyx_copy_object_array(
|
|
((PyListObject*)src)->ob_item + start,
|
|
((PyListObject*)dest)->ob_item,
|
|
length);
|
|
return dest;
|
|
}
|
|
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
|
|
PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
|
|
PyObject* dest;
|
|
Py_ssize_t length = PyTuple_GET_SIZE(src);
|
|
__Pyx_crop_slice(&start, &stop, &length);
|
|
if (unlikely(length <= 0))
|
|
return PyTuple_New(0);
|
|
dest = PyTuple_New(length);
|
|
if (unlikely(!dest))
|
|
return NULL;
|
|
__Pyx_copy_object_array(
|
|
((PyTupleObject*)src)->ob_item + start,
|
|
((PyTupleObject*)dest)->ob_item,
|
|
length);
|
|
return dest;
|
|
}
|
|
#endif
|
|
|
|
/* GetItemInt */
|
|
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
|
|
PyObject *r;
|
|
if (!j) return NULL;
|
|
r = PyObject_GetItem(o, j);
|
|
Py_DECREF(j);
|
|
return r;
|
|
}
|
|
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
|
|
CYTHON_NCP_UNUSED int wraparound,
|
|
CYTHON_NCP_UNUSED int boundscheck) {
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
Py_ssize_t wrapped_i = i;
|
|
if (wraparound & unlikely(i < 0)) {
|
|
wrapped_i += PyList_GET_SIZE(o);
|
|
}
|
|
if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
|
|
PyObject *r = PyList_GET_ITEM(o, wrapped_i);
|
|
Py_INCREF(r);
|
|
return r;
|
|
}
|
|
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
|
|
#else
|
|
return PySequence_GetItem(o, i);
|
|
#endif
|
|
}
|
|
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
|
|
CYTHON_NCP_UNUSED int wraparound,
|
|
CYTHON_NCP_UNUSED int boundscheck) {
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
Py_ssize_t wrapped_i = i;
|
|
if (wraparound & unlikely(i < 0)) {
|
|
wrapped_i += PyTuple_GET_SIZE(o);
|
|
}
|
|
if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
|
|
PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
|
|
Py_INCREF(r);
|
|
return r;
|
|
}
|
|
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
|
|
#else
|
|
return PySequence_GetItem(o, i);
|
|
#endif
|
|
}
|
|
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
|
|
CYTHON_NCP_UNUSED int wraparound,
|
|
CYTHON_NCP_UNUSED int boundscheck) {
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
|
|
if (is_list || PyList_CheckExact(o)) {
|
|
Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
|
|
if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
|
|
PyObject *r = PyList_GET_ITEM(o, n);
|
|
Py_INCREF(r);
|
|
return r;
|
|
}
|
|
}
|
|
else if (PyTuple_CheckExact(o)) {
|
|
Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
|
|
if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
|
|
PyObject *r = PyTuple_GET_ITEM(o, n);
|
|
Py_INCREF(r);
|
|
return r;
|
|
}
|
|
} else {
|
|
PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
|
|
if (likely(m && m->sq_item)) {
|
|
if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
|
|
Py_ssize_t l = m->sq_length(o);
|
|
if (likely(l >= 0)) {
|
|
i += l;
|
|
} else {
|
|
if (!PyErr_ExceptionMatches(PyExc_OverflowError))
|
|
return NULL;
|
|
PyErr_Clear();
|
|
}
|
|
}
|
|
return m->sq_item(o, i);
|
|
}
|
|
}
|
|
#else
|
|
if (is_list || PySequence_Check(o)) {
|
|
return PySequence_GetItem(o, i);
|
|
}
|
|
#endif
|
|
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
|
|
}
|
|
|
|
/* PyErrExceptionMatches */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
|
|
Py_ssize_t i, n;
|
|
n = PyTuple_GET_SIZE(tuple);
|
|
#if PY_MAJOR_VERSION >= 3
|
|
for (i=0; i<n; i++) {
|
|
if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
|
|
}
|
|
#endif
|
|
for (i=0; i<n; i++) {
|
|
if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
|
|
PyObject *exc_type = tstate->curexc_type;
|
|
if (exc_type == err) return 1;
|
|
if (unlikely(!exc_type)) return 0;
|
|
if (unlikely(PyTuple_Check(err)))
|
|
return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
|
|
return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
|
|
}
|
|
#endif
|
|
|
|
/* ArgTypeTest */
|
|
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
|
|
{
|
|
if (unlikely(!type)) {
|
|
PyErr_SetString(PyExc_SystemError, "Missing type object");
|
|
return 0;
|
|
}
|
|
else if (exact) {
|
|
#if PY_MAJOR_VERSION == 2
|
|
if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
|
|
#endif
|
|
}
|
|
else {
|
|
if (likely(__Pyx_TypeCheck(obj, type))) return 1;
|
|
}
|
|
PyErr_Format(PyExc_TypeError,
|
|
"Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
|
|
name, type->tp_name, Py_TYPE(obj)->tp_name);
|
|
return 0;
|
|
}
|
|
|
|
/* WriteUnraisableException */
|
|
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
|
|
CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
|
|
int full_traceback, CYTHON_UNUSED int nogil) {
|
|
PyObject *old_exc, *old_val, *old_tb;
|
|
PyObject *ctx;
|
|
__Pyx_PyThreadState_declare
|
|
#ifdef WITH_THREAD
|
|
PyGILState_STATE state;
|
|
if (nogil)
|
|
state = PyGILState_Ensure();
|
|
#ifdef _MSC_VER
|
|
else state = (PyGILState_STATE)-1;
|
|
#endif
|
|
#endif
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
|
|
if (full_traceback) {
|
|
Py_XINCREF(old_exc);
|
|
Py_XINCREF(old_val);
|
|
Py_XINCREF(old_tb);
|
|
__Pyx_ErrRestore(old_exc, old_val, old_tb);
|
|
PyErr_PrintEx(1);
|
|
}
|
|
#if PY_MAJOR_VERSION < 3
|
|
ctx = PyString_FromString(name);
|
|
#else
|
|
ctx = PyUnicode_FromString(name);
|
|
#endif
|
|
__Pyx_ErrRestore(old_exc, old_val, old_tb);
|
|
if (!ctx) {
|
|
PyErr_WriteUnraisable(Py_None);
|
|
} else {
|
|
PyErr_WriteUnraisable(ctx);
|
|
Py_DECREF(ctx);
|
|
}
|
|
#ifdef WITH_THREAD
|
|
if (nogil)
|
|
PyGILState_Release(state);
|
|
#endif
|
|
}
|
|
|
|
/* GetAttr */
|
|
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
|
|
#if CYTHON_USE_TYPE_SLOTS
|
|
#if PY_MAJOR_VERSION >= 3
|
|
if (likely(PyUnicode_Check(n)))
|
|
#else
|
|
if (likely(PyString_Check(n)))
|
|
#endif
|
|
return __Pyx_PyObject_GetAttrStr(o, n);
|
|
#endif
|
|
return PyObject_GetAttr(o, n);
|
|
}
|
|
|
|
/* GetAttr3 */
|
|
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
|
|
return NULL;
|
|
__Pyx_PyErr_Clear();
|
|
Py_INCREF(d);
|
|
return d;
|
|
}
|
|
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
|
|
PyObject *r = __Pyx_GetAttr(o, n);
|
|
return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
|
|
}
|
|
|
|
/* UnpackUnboundCMethod */
|
|
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
|
|
PyObject *method;
|
|
method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
|
|
if (unlikely(!method))
|
|
return -1;
|
|
target->method = method;
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
#if PY_MAJOR_VERSION >= 3
|
|
if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
|
|
#endif
|
|
{
|
|
PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
|
|
target->func = descr->d_method->ml_meth;
|
|
target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
|
|
}
|
|
#endif
|
|
return 0;
|
|
}
|
|
|
|
/* CallUnboundCMethod1 */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
|
|
if (likely(cfunc->func)) {
|
|
int flag = cfunc->flag;
|
|
if (flag == METH_O) {
|
|
return (*(cfunc->func))(self, arg);
|
|
} else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
|
|
if (PY_VERSION_HEX >= 0x030700A0) {
|
|
return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
|
|
} else {
|
|
return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
|
|
}
|
|
} else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
|
|
return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
|
|
}
|
|
}
|
|
return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
|
|
}
|
|
#endif
|
|
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
|
|
PyObject *args, *result = NULL;
|
|
if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
|
|
args = PyTuple_New(1);
|
|
if (unlikely(!args)) goto bad;
|
|
Py_INCREF(arg);
|
|
PyTuple_SET_ITEM(args, 0, arg);
|
|
if (cfunc->flag & METH_KEYWORDS)
|
|
result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
|
|
else
|
|
result = (*cfunc->func)(self, args);
|
|
} else {
|
|
args = PyTuple_New(2);
|
|
if (unlikely(!args)) goto bad;
|
|
Py_INCREF(self);
|
|
PyTuple_SET_ITEM(args, 0, self);
|
|
Py_INCREF(arg);
|
|
PyTuple_SET_ITEM(args, 1, arg);
|
|
result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
|
|
}
|
|
#else
|
|
args = PyTuple_Pack(2, self, arg);
|
|
if (unlikely(!args)) goto bad;
|
|
result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
|
|
#endif
|
|
bad:
|
|
Py_XDECREF(args);
|
|
return result;
|
|
}
|
|
|
|
/* CallUnboundCMethod2 */
|
|
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
|
|
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
|
|
if (likely(cfunc->func)) {
|
|
PyObject *args[2] = {arg1, arg2};
|
|
if (cfunc->flag == METH_FASTCALL) {
|
|
#if PY_VERSION_HEX >= 0x030700A0
|
|
return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
|
|
#else
|
|
return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
|
|
#endif
|
|
}
|
|
#if PY_VERSION_HEX >= 0x030700A0
|
|
if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
|
|
return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
|
|
#endif
|
|
}
|
|
return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
|
|
}
|
|
#endif
|
|
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
|
|
PyObject *args, *result = NULL;
|
|
if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
|
|
args = PyTuple_New(2);
|
|
if (unlikely(!args)) goto bad;
|
|
Py_INCREF(arg1);
|
|
PyTuple_SET_ITEM(args, 0, arg1);
|
|
Py_INCREF(arg2);
|
|
PyTuple_SET_ITEM(args, 1, arg2);
|
|
if (cfunc->flag & METH_KEYWORDS)
|
|
result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
|
|
else
|
|
result = (*cfunc->func)(self, args);
|
|
} else {
|
|
args = PyTuple_New(3);
|
|
if (unlikely(!args)) goto bad;
|
|
Py_INCREF(self);
|
|
PyTuple_SET_ITEM(args, 0, self);
|
|
Py_INCREF(arg1);
|
|
PyTuple_SET_ITEM(args, 1, arg1);
|
|
Py_INCREF(arg2);
|
|
PyTuple_SET_ITEM(args, 2, arg2);
|
|
result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
|
|
}
|
|
#else
|
|
args = PyTuple_Pack(3, self, arg1, arg2);
|
|
if (unlikely(!args)) goto bad;
|
|
result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
|
|
#endif
|
|
bad:
|
|
Py_XDECREF(args);
|
|
return result;
|
|
}
|
|
|
|
/* dict_getitem_default */
|
|
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
|
|
PyObject* value;
|
|
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
|
|
value = PyDict_GetItemWithError(d, key);
|
|
if (unlikely(!value)) {
|
|
if (unlikely(PyErr_Occurred()))
|
|
return NULL;
|
|
value = default_value;
|
|
}
|
|
Py_INCREF(value);
|
|
if ((1));
|
|
#else
|
|
if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
|
|
value = PyDict_GetItem(d, key);
|
|
if (unlikely(!value)) {
|
|
value = default_value;
|
|
}
|
|
Py_INCREF(value);
|
|
}
|
|
#endif
|
|
else {
|
|
if (default_value == Py_None)
|
|
value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
|
|
else
|
|
value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
|
|
}
|
|
return value;
|
|
}
|
|
|
|
/* CallUnboundCMethod0 */
|
|
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
|
|
PyObject *args, *result = NULL;
|
|
if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
|
|
#if CYTHON_ASSUME_SAFE_MACROS
|
|
args = PyTuple_New(1);
|
|
if (unlikely(!args)) goto bad;
|
|
Py_INCREF(self);
|
|
PyTuple_SET_ITEM(args, 0, self);
|
|
#else
|
|
args = PyTuple_Pack(1, self);
|
|
if (unlikely(!args)) goto bad;
|
|
#endif
|
|
result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
|
|
Py_DECREF(args);
|
|
bad:
|
|
return result;
|
|
}
|
|
|
|
/* py_dict_values */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
|
|
if (PY_MAJOR_VERSION >= 3)
|
|
return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);
|
|
else
|
|
return PyDict_Values(d);
|
|
}
|
|
|
|
/* FastTypeChecks */
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
|
|
while (a) {
|
|
a = a->tp_base;
|
|
if (a == b)
|
|
return 1;
|
|
}
|
|
return b == &PyBaseObject_Type;
|
|
}
|
|
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
|
|
PyObject *mro;
|
|
if (a == b) return 1;
|
|
mro = a->tp_mro;
|
|
if (likely(mro)) {
|
|
Py_ssize_t i, n;
|
|
n = PyTuple_GET_SIZE(mro);
|
|
for (i = 0; i < n; i++) {
|
|
if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
return __Pyx_InBases(a, b);
|
|
}
|
|
#if PY_MAJOR_VERSION == 2
|
|
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
|
|
PyObject *exception, *value, *tb;
|
|
int res;
|
|
__Pyx_PyThreadState_declare
|
|
__Pyx_PyThreadState_assign
|
|
__Pyx_ErrFetch(&exception, &value, &tb);
|
|
res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
|
|
if (unlikely(res == -1)) {
|
|
PyErr_WriteUnraisable(err);
|
|
res = 0;
|
|
}
|
|
if (!res) {
|
|
res = PyObject_IsSubclass(err, exc_type2);
|
|
if (unlikely(res == -1)) {
|
|
PyErr_WriteUnraisable(err);
|
|
res = 0;
|
|
}
|
|
}
|
|
__Pyx_ErrRestore(exception, value, tb);
|
|
return res;
|
|
}
|
|
#else
|
|
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
|
|
int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
|
|
if (!res) {
|
|
res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
|
|
}
|
|
return res;
|
|
}
|
|
#endif
|
|
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
|
|
Py_ssize_t i, n;
|
|
assert(PyExceptionClass_Check(exc_type));
|
|
n = PyTuple_GET_SIZE(tuple);
|
|
#if PY_MAJOR_VERSION >= 3
|
|
for (i=0; i<n; i++) {
|
|
if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
|
|
}
|
|
#endif
|
|
for (i=0; i<n; i++) {
|
|
PyObject *t = PyTuple_GET_ITEM(tuple, i);
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(exc_type == t)) return 1;
|
|
#endif
|
|
if (likely(PyExceptionClass_Check(t))) {
|
|
if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
|
|
} else {
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
|
|
if (likely(err == exc_type)) return 1;
|
|
if (likely(PyExceptionClass_Check(err))) {
|
|
if (likely(PyExceptionClass_Check(exc_type))) {
|
|
return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
|
|
} else if (likely(PyTuple_Check(exc_type))) {
|
|
return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
|
|
} else {
|
|
}
|
|
}
|
|
return PyErr_GivenExceptionMatches(err, exc_type);
|
|
}
|
|
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
|
|
assert(PyExceptionClass_Check(exc_type1));
|
|
assert(PyExceptionClass_Check(exc_type2));
|
|
if (likely(err == exc_type1 || err == exc_type2)) return 1;
|
|
if (likely(PyExceptionClass_Check(err))) {
|
|
return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
|
|
}
|
|
return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
|
|
}
|
|
#endif
|
|
|
|
/* RaiseTooManyValuesToUnpack */
|
|
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
|
|
PyErr_Format(PyExc_ValueError,
|
|
"too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
|
|
}
|
|
|
|
/* RaiseNeedMoreValuesToUnpack */
|
|
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
|
|
PyErr_Format(PyExc_ValueError,
|
|
"need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
|
|
index, (index == 1) ? "" : "s");
|
|
}
|
|
|
|
/* IterFinish */
|
|
static CYTHON_INLINE int __Pyx_IterFinish(void) {
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
PyThreadState *tstate = __Pyx_PyThreadState_Current;
|
|
PyObject* exc_type = tstate->curexc_type;
|
|
if (unlikely(exc_type)) {
|
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
|
|
PyObject *exc_value, *exc_tb;
|
|
exc_value = tstate->curexc_value;
|
|
exc_tb = tstate->curexc_traceback;
|
|
tstate->curexc_type = 0;
|
|
tstate->curexc_value = 0;
|
|
tstate->curexc_traceback = 0;
|
|
Py_DECREF(exc_type);
|
|
Py_XDECREF(exc_value);
|
|
Py_XDECREF(exc_tb);
|
|
return 0;
|
|
} else {
|
|
return -1;
|
|
}
|
|
}
|
|
return 0;
|
|
#else
|
|
if (unlikely(PyErr_Occurred())) {
|
|
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
|
|
PyErr_Clear();
|
|
return 0;
|
|
} else {
|
|
return -1;
|
|
}
|
|
}
|
|
return 0;
|
|
#endif
|
|
}
|
|
|
|
/* UnpackItemEndCheck */
|
|
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
|
|
if (unlikely(retval)) {
|
|
Py_DECREF(retval);
|
|
__Pyx_RaiseTooManyValuesError(expected);
|
|
return -1;
|
|
} else {
|
|
return __Pyx_IterFinish();
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
/* StringJoin */
|
|
#if !CYTHON_COMPILING_IN_CPYTHON
|
|
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
|
|
return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
|
|
}
|
|
#endif
|
|
|
|
/* bytes_tailmatch */
|
|
static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg,
|
|
Py_ssize_t start, Py_ssize_t end, int direction) {
|
|
const char* self_ptr = PyBytes_AS_STRING(self);
|
|
Py_ssize_t self_len = PyBytes_GET_SIZE(self);
|
|
const char* sub_ptr;
|
|
Py_ssize_t sub_len;
|
|
int retval;
|
|
Py_buffer view;
|
|
view.obj = NULL;
|
|
if ( PyBytes_Check(arg) ) {
|
|
sub_ptr = PyBytes_AS_STRING(arg);
|
|
sub_len = PyBytes_GET_SIZE(arg);
|
|
}
|
|
#if PY_MAJOR_VERSION < 3
|
|
else if ( PyUnicode_Check(arg) ) {
|
|
return (int) PyUnicode_Tailmatch(self, arg, start, end, direction);
|
|
}
|
|
#endif
|
|
else {
|
|
if (unlikely(PyObject_GetBuffer(self, &view, PyBUF_SIMPLE) == -1))
|
|
return -1;
|
|
sub_ptr = (const char*) view.buf;
|
|
sub_len = view.len;
|
|
}
|
|
if (end > self_len)
|
|
end = self_len;
|
|
else if (end < 0)
|
|
end += self_len;
|
|
if (end < 0)
|
|
end = 0;
|
|
if (start < 0)
|
|
start += self_len;
|
|
if (start < 0)
|
|
start = 0;
|
|
if (direction > 0) {
|
|
if (end-sub_len > start)
|
|
start = end - sub_len;
|
|
}
|
|
if (start + sub_len <= end)
|
|
retval = !memcmp(self_ptr+start, sub_ptr, (size_t)sub_len);
|
|
else
|
|
retval = 0;
|
|
if (view.obj)
|
|
PyBuffer_Release(&view);
|
|
return retval;
|
|
}
|
|
static int __Pyx_PyBytes_TailmatchTuple(PyObject* self, PyObject* substrings,
|
|
Py_ssize_t start, Py_ssize_t end, int direction) {
|
|
Py_ssize_t i, count = PyTuple_GET_SIZE(substrings);
|
|
for (i = 0; i < count; i++) {
|
|
int result;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
result = __Pyx_PyBytes_SingleTailmatch(self, PyTuple_GET_ITEM(substrings, i),
|
|
start, end, direction);
|
|
#else
|
|
PyObject* sub = PySequence_ITEM(substrings, i);
|
|
if (unlikely(!sub)) return -1;
|
|
result = __Pyx_PyBytes_SingleTailmatch(self, sub, start, end, direction);
|
|
Py_DECREF(sub);
|
|
#endif
|
|
if (result) {
|
|
return result;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr,
|
|
Py_ssize_t start, Py_ssize_t end, int direction) {
|
|
if (unlikely(PyTuple_Check(substr))) {
|
|
return __Pyx_PyBytes_TailmatchTuple(self, substr, start, end, direction);
|
|
}
|
|
return __Pyx_PyBytes_SingleTailmatch(self, substr, start, end, direction);
|
|
}
|
|
|
|
/* unicode_tailmatch */
|
|
static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings,
|
|
Py_ssize_t start, Py_ssize_t end, int direction) {
|
|
Py_ssize_t i, count = PyTuple_GET_SIZE(substrings);
|
|
for (i = 0; i < count; i++) {
|
|
Py_ssize_t result;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substrings, i),
|
|
start, end, direction);
|
|
#else
|
|
PyObject* sub = PySequence_ITEM(substrings, i);
|
|
if (unlikely(!sub)) return -1;
|
|
result = PyUnicode_Tailmatch(s, sub, start, end, direction);
|
|
Py_DECREF(sub);
|
|
#endif
|
|
if (result) {
|
|
return (int) result;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr,
|
|
Py_ssize_t start, Py_ssize_t end, int direction) {
|
|
if (unlikely(PyTuple_Check(substr))) {
|
|
return __Pyx_PyUnicode_TailmatchTuple(s, substr, start, end, direction);
|
|
}
|
|
return (int) PyUnicode_Tailmatch(s, substr, start, end, direction);
|
|
}
|
|
|
|
/* str_tailmatch */
|
|
static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start,
|
|
Py_ssize_t end, int direction)
|
|
{
|
|
if (PY_MAJOR_VERSION < 3)
|
|
return __Pyx_PyBytes_Tailmatch(self, arg, start, end, direction);
|
|
else
|
|
return __Pyx_PyUnicode_Tailmatch(self, arg, start, end, direction);
|
|
}
|
|
|
|
/* DictGetItem */
|
|
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
|
|
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
|
|
PyObject *value;
|
|
value = PyDict_GetItemWithError(d, key);
|
|
if (unlikely(!value)) {
|
|
if (!PyErr_Occurred()) {
|
|
if (unlikely(PyTuple_Check(key))) {
|
|
PyObject* args = PyTuple_Pack(1, key);
|
|
if (likely(args)) {
|
|
PyErr_SetObject(PyExc_KeyError, args);
|
|
Py_DECREF(args);
|
|
}
|
|
} else {
|
|
PyErr_SetObject(PyExc_KeyError, key);
|
|
}
|
|
}
|
|
return NULL;
|
|
}
|
|
Py_INCREF(value);
|
|
return value;
|
|
}
|
|
#endif
|
|
|
|
/* PyObjectSetAttrStr */
|
|
#if CYTHON_USE_TYPE_SLOTS
|
|
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
|
|
PyTypeObject* tp = Py_TYPE(obj);
|
|
if (likely(tp->tp_setattro))
|
|
return tp->tp_setattro(obj, attr_name, value);
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(tp->tp_setattr))
|
|
return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
|
|
#endif
|
|
return PyObject_SetAttr(obj, attr_name, value);
|
|
}
|
|
#endif
|
|
|
|
/* SwapException */
|
|
#if CYTHON_FAST_THREAD_STATE
|
|
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
|
|
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
#if CYTHON_USE_EXC_INFO_STACK
|
|
_PyErr_StackItem *exc_info = tstate->exc_info;
|
|
tmp_type = exc_info->exc_type;
|
|
tmp_value = exc_info->exc_value;
|
|
tmp_tb = exc_info->exc_traceback;
|
|
exc_info->exc_type = *type;
|
|
exc_info->exc_value = *value;
|
|
exc_info->exc_traceback = *tb;
|
|
#else
|
|
tmp_type = tstate->exc_type;
|
|
tmp_value = tstate->exc_value;
|
|
tmp_tb = tstate->exc_traceback;
|
|
tstate->exc_type = *type;
|
|
tstate->exc_value = *value;
|
|
tstate->exc_traceback = *tb;
|
|
#endif
|
|
*type = tmp_type;
|
|
*value = tmp_value;
|
|
*tb = tmp_tb;
|
|
}
|
|
#else
|
|
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
|
|
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
|
|
PyErr_SetExcInfo(*type, *value, *tb);
|
|
*type = tmp_type;
|
|
*value = tmp_value;
|
|
*tb = tmp_tb;
|
|
}
|
|
#endif
|
|
|
|
/* None */
|
|
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
|
|
PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
|
|
}
|
|
|
|
/* py_dict_items */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
|
|
if (PY_MAJOR_VERSION >= 3)
|
|
return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
|
|
else
|
|
return PyDict_Items(d);
|
|
}
|
|
|
|
/* Import */
|
|
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
|
|
PyObject *empty_list = 0;
|
|
PyObject *module = 0;
|
|
PyObject *global_dict = 0;
|
|
PyObject *empty_dict = 0;
|
|
PyObject *list;
|
|
#if PY_MAJOR_VERSION < 3
|
|
PyObject *py_import;
|
|
py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
|
|
if (!py_import)
|
|
goto bad;
|
|
#endif
|
|
if (from_list)
|
|
list = from_list;
|
|
else {
|
|
empty_list = PyList_New(0);
|
|
if (!empty_list)
|
|
goto bad;
|
|
list = empty_list;
|
|
}
|
|
global_dict = PyModule_GetDict(__pyx_m);
|
|
if (!global_dict)
|
|
goto bad;
|
|
empty_dict = PyDict_New();
|
|
if (!empty_dict)
|
|
goto bad;
|
|
{
|
|
#if PY_MAJOR_VERSION >= 3
|
|
if (level == -1) {
|
|
if (strchr(__Pyx_MODULE_NAME, '.')) {
|
|
module = PyImport_ImportModuleLevelObject(
|
|
name, global_dict, empty_dict, list, 1);
|
|
if (!module) {
|
|
if (!PyErr_ExceptionMatches(PyExc_ImportError))
|
|
goto bad;
|
|
PyErr_Clear();
|
|
}
|
|
}
|
|
level = 0;
|
|
}
|
|
#endif
|
|
if (!module) {
|
|
#if PY_MAJOR_VERSION < 3
|
|
PyObject *py_level = PyInt_FromLong(level);
|
|
if (!py_level)
|
|
goto bad;
|
|
module = PyObject_CallFunctionObjArgs(py_import,
|
|
name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
|
|
Py_DECREF(py_level);
|
|
#else
|
|
module = PyImport_ImportModuleLevelObject(
|
|
name, global_dict, empty_dict, list, level);
|
|
#endif
|
|
}
|
|
}
|
|
bad:
|
|
#if PY_MAJOR_VERSION < 3
|
|
Py_XDECREF(py_import);
|
|
#endif
|
|
Py_XDECREF(empty_list);
|
|
Py_XDECREF(empty_dict);
|
|
return module;
|
|
}
|
|
|
|
/* ImportFrom */
|
|
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
|
|
PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
|
|
if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
|
|
PyErr_Format(PyExc_ImportError,
|
|
#if PY_MAJOR_VERSION < 3
|
|
"cannot import name %.230s", PyString_AS_STRING(name));
|
|
#else
|
|
"cannot import name %S", name);
|
|
#endif
|
|
}
|
|
return value;
|
|
}
|
|
|
|
/* HasAttr */
|
|
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
|
|
PyObject *r;
|
|
if (unlikely(!__Pyx_PyBaseString_Check(n))) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"hasattr(): attribute name must be string");
|
|
return -1;
|
|
}
|
|
r = __Pyx_GetAttr(o, n);
|
|
if (unlikely(!r)) {
|
|
PyErr_Clear();
|
|
return 0;
|
|
} else {
|
|
Py_DECREF(r);
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
/* PyObject_GenericGetAttrNoDict */
|
|
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
|
|
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
|
|
PyErr_Format(PyExc_AttributeError,
|
|
#if PY_MAJOR_VERSION >= 3
|
|
"'%.50s' object has no attribute '%U'",
|
|
tp->tp_name, attr_name);
|
|
#else
|
|
"'%.50s' object has no attribute '%.400s'",
|
|
tp->tp_name, PyString_AS_STRING(attr_name));
|
|
#endif
|
|
return NULL;
|
|
}
|
|
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
|
|
PyObject *descr;
|
|
PyTypeObject *tp = Py_TYPE(obj);
|
|
if (unlikely(!PyString_Check(attr_name))) {
|
|
return PyObject_GenericGetAttr(obj, attr_name);
|
|
}
|
|
assert(!tp->tp_dictoffset);
|
|
descr = _PyType_Lookup(tp, attr_name);
|
|
if (unlikely(!descr)) {
|
|
return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
|
|
}
|
|
Py_INCREF(descr);
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
|
|
#endif
|
|
{
|
|
descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
|
|
if (unlikely(f)) {
|
|
PyObject *res = f(descr, obj, (PyObject *)tp);
|
|
Py_DECREF(descr);
|
|
return res;
|
|
}
|
|
}
|
|
return descr;
|
|
}
|
|
#endif
|
|
|
|
/* PyObject_GenericGetAttr */
|
|
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
|
|
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
|
|
if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
|
|
return PyObject_GenericGetAttr(obj, attr_name);
|
|
}
|
|
return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
|
|
}
|
|
#endif
|
|
|
|
/* SetVTable */
|
|
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
|
|
#if PY_VERSION_HEX >= 0x02070000
|
|
PyObject *ob = PyCapsule_New(vtable, 0, 0);
|
|
#else
|
|
PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
|
|
#endif
|
|
if (!ob)
|
|
goto bad;
|
|
if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
|
|
goto bad;
|
|
Py_DECREF(ob);
|
|
return 0;
|
|
bad:
|
|
Py_XDECREF(ob);
|
|
return -1;
|
|
}
|
|
|
|
/* SetupReduce */
|
|
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
|
|
int ret;
|
|
PyObject *name_attr;
|
|
name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
|
|
if (likely(name_attr)) {
|
|
ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
|
|
} else {
|
|
ret = -1;
|
|
}
|
|
if (unlikely(ret < 0)) {
|
|
PyErr_Clear();
|
|
ret = 0;
|
|
}
|
|
Py_XDECREF(name_attr);
|
|
return ret;
|
|
}
|
|
static int __Pyx_setup_reduce(PyObject* type_obj) {
|
|
int ret = 0;
|
|
PyObject *object_reduce = NULL;
|
|
PyObject *object_reduce_ex = NULL;
|
|
PyObject *reduce = NULL;
|
|
PyObject *reduce_ex = NULL;
|
|
PyObject *reduce_cython = NULL;
|
|
PyObject *setstate = NULL;
|
|
PyObject *setstate_cython = NULL;
|
|
#if CYTHON_USE_PYTYPE_LOOKUP
|
|
if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
|
|
#else
|
|
if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
|
|
#endif
|
|
#if CYTHON_USE_PYTYPE_LOOKUP
|
|
object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
|
|
#else
|
|
object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
|
|
#endif
|
|
reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
|
|
if (reduce_ex == object_reduce_ex) {
|
|
#if CYTHON_USE_PYTYPE_LOOKUP
|
|
object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
|
|
#else
|
|
object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
|
|
#endif
|
|
reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
|
|
if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
|
|
reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
|
|
ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
|
|
ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
|
|
setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
|
|
if (!setstate) PyErr_Clear();
|
|
if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
|
|
setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
|
|
ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
|
|
ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
|
|
}
|
|
PyType_Modified((PyTypeObject*)type_obj);
|
|
}
|
|
}
|
|
goto GOOD;
|
|
BAD:
|
|
if (!PyErr_Occurred())
|
|
PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
|
|
ret = -1;
|
|
GOOD:
|
|
#if !CYTHON_USE_PYTYPE_LOOKUP
|
|
Py_XDECREF(object_reduce);
|
|
Py_XDECREF(object_reduce_ex);
|
|
#endif
|
|
Py_XDECREF(reduce);
|
|
Py_XDECREF(reduce_ex);
|
|
Py_XDECREF(reduce_cython);
|
|
Py_XDECREF(setstate);
|
|
Py_XDECREF(setstate_cython);
|
|
return ret;
|
|
}
|
|
|
|
/* PatchModuleWithCoroutine */
|
|
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
|
|
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
|
|
int result;
|
|
PyObject *globals, *result_obj;
|
|
globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
|
|
result = PyDict_SetItemString(globals, "_cython_coroutine_type",
|
|
#ifdef __Pyx_Coroutine_USED
|
|
(PyObject*)__pyx_CoroutineType);
|
|
#else
|
|
Py_None);
|
|
#endif
|
|
if (unlikely(result < 0)) goto ignore;
|
|
result = PyDict_SetItemString(globals, "_cython_generator_type",
|
|
#ifdef __Pyx_Generator_USED
|
|
(PyObject*)__pyx_GeneratorType);
|
|
#else
|
|
Py_None);
|
|
#endif
|
|
if (unlikely(result < 0)) goto ignore;
|
|
if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
|
|
if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
|
|
result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
|
|
if (unlikely(!result_obj)) goto ignore;
|
|
Py_DECREF(result_obj);
|
|
Py_DECREF(globals);
|
|
return module;
|
|
ignore:
|
|
Py_XDECREF(globals);
|
|
PyErr_WriteUnraisable(module);
|
|
if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
|
|
Py_DECREF(module);
|
|
module = NULL;
|
|
}
|
|
#else
|
|
py_code++;
|
|
#endif
|
|
return module;
|
|
}
|
|
|
|
/* PatchInspect */
|
|
static PyObject* __Pyx_patch_inspect(PyObject* module) {
|
|
#if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT)
|
|
static int inspect_patched = 0;
|
|
if (unlikely((!inspect_patched) && module)) {
|
|
module = __Pyx_Coroutine_patch_module(
|
|
module, ""
|
|
"old_types = getattr(_module.isgenerator, '_cython_generator_types', None)\n"
|
|
"if old_types is None or not isinstance(old_types, set):\n"
|
|
" old_types = set()\n"
|
|
" def cy_wrap(orig_func, type=type, cython_generator_types=old_types):\n"
|
|
" def cy_isgenerator(obj): return type(obj) in cython_generator_types or orig_func(obj)\n"
|
|
" cy_isgenerator._cython_generator_types = cython_generator_types\n"
|
|
" return cy_isgenerator\n"
|
|
" _module.isgenerator = cy_wrap(_module.isgenerator)\n"
|
|
"old_types.add(_cython_generator_type)\n"
|
|
);
|
|
inspect_patched = 1;
|
|
}
|
|
#else
|
|
if ((0)) return __Pyx_Coroutine_patch_module(module, NULL);
|
|
#endif
|
|
return module;
|
|
}
|
|
|
|
/* PatchAsyncIO */
|
|
static PyObject* __Pyx_patch_asyncio(PyObject* module) {
|
|
#if PY_VERSION_HEX < 0x030500B2 &&\
|
|
(defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED)) &&\
|
|
(!defined(CYTHON_PATCH_ASYNCIO) || CYTHON_PATCH_ASYNCIO)
|
|
PyObject *patch_module = NULL;
|
|
static int asyncio_patched = 0;
|
|
if (unlikely((!asyncio_patched) && module)) {
|
|
PyObject *package;
|
|
package = __Pyx_Import(__pyx_n_s_asyncio_coroutines, NULL, 0);
|
|
if (package) {
|
|
patch_module = __Pyx_Coroutine_patch_module(
|
|
PyObject_GetAttrString(package, "coroutines"), ""
|
|
"try:\n"
|
|
" coro_types = _module._COROUTINE_TYPES\n"
|
|
"except AttributeError: pass\n"
|
|
"else:\n"
|
|
" if _cython_coroutine_type is not None and _cython_coroutine_type not in coro_types:\n"
|
|
" coro_types = tuple(coro_types) + (_cython_coroutine_type,)\n"
|
|
" if _cython_generator_type is not None and _cython_generator_type not in coro_types:\n"
|
|
" coro_types = tuple(coro_types) + (_cython_generator_type,)\n"
|
|
"_module._COROUTINE_TYPES = coro_types\n"
|
|
);
|
|
} else {
|
|
PyErr_Clear();
|
|
package = __Pyx_Import(__pyx_n_s_asyncio_tasks, NULL, 0);
|
|
if (unlikely(!package)) goto asyncio_done;
|
|
patch_module = __Pyx_Coroutine_patch_module(
|
|
PyObject_GetAttrString(package, "tasks"), ""
|
|
"if hasattr(_module, 'iscoroutine'):\n"
|
|
" old_types = getattr(_module.iscoroutine, '_cython_coroutine_types', None)\n"
|
|
" if old_types is None or not isinstance(old_types, set):\n"
|
|
" old_types = set()\n"
|
|
" def cy_wrap(orig_func, type=type, cython_coroutine_types=old_types):\n"
|
|
" def cy_iscoroutine(obj): return type(obj) in cython_coroutine_types or orig_func(obj)\n"
|
|
" cy_iscoroutine._cython_coroutine_types = cython_coroutine_types\n"
|
|
" return cy_iscoroutine\n"
|
|
" _module.iscoroutine = cy_wrap(_module.iscoroutine)\n"
|
|
" if _cython_coroutine_type is not None:\n"
|
|
" old_types.add(_cython_coroutine_type)\n"
|
|
" if _cython_generator_type is not None:\n"
|
|
" old_types.add(_cython_generator_type)\n"
|
|
);
|
|
}
|
|
Py_DECREF(package);
|
|
if (unlikely(!patch_module)) goto ignore;
|
|
asyncio_done:
|
|
PyErr_Clear();
|
|
asyncio_patched = 1;
|
|
#ifdef __Pyx_Generator_USED
|
|
{
|
|
PyObject *inspect_module;
|
|
if (patch_module) {
|
|
inspect_module = PyObject_GetAttr(patch_module, __pyx_n_s_inspect);
|
|
Py_DECREF(patch_module);
|
|
} else {
|
|
inspect_module = __Pyx_Import(__pyx_n_s_inspect, NULL, 0);
|
|
}
|
|
if (unlikely(!inspect_module)) goto ignore;
|
|
inspect_module = __Pyx_patch_inspect(inspect_module);
|
|
if (unlikely(!inspect_module)) {
|
|
Py_DECREF(module);
|
|
module = NULL;
|
|
}
|
|
Py_XDECREF(inspect_module);
|
|
}
|
|
#else
|
|
if ((0)) return __Pyx_patch_inspect(module);
|
|
#endif
|
|
}
|
|
return module;
|
|
ignore:
|
|
PyErr_WriteUnraisable(module);
|
|
if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch asyncio package with custom generator type", 1) < 0)) {
|
|
Py_DECREF(module);
|
|
module = NULL;
|
|
}
|
|
#else
|
|
if ((0)) return __Pyx_patch_inspect(__Pyx_Coroutine_patch_module(module, NULL));
|
|
#endif
|
|
return module;
|
|
}
|
|
|
|
/* PyIntCompare */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
|
|
if (op1 == op2) {
|
|
Py_RETURN_TRUE;
|
|
}
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(PyInt_CheckExact(op1))) {
|
|
const long b = intval;
|
|
long a = PyInt_AS_LONG(op1);
|
|
if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
|
|
}
|
|
#endif
|
|
#if CYTHON_USE_PYLONG_INTERNALS
|
|
if (likely(PyLong_CheckExact(op1))) {
|
|
int unequal;
|
|
unsigned long uintval;
|
|
Py_ssize_t size = Py_SIZE(op1);
|
|
const digit* digits = ((PyLongObject*)op1)->ob_digit;
|
|
if (intval == 0) {
|
|
if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
|
|
} else if (intval < 0) {
|
|
if (size >= 0)
|
|
Py_RETURN_FALSE;
|
|
intval = -intval;
|
|
size = -size;
|
|
} else {
|
|
if (size <= 0)
|
|
Py_RETURN_FALSE;
|
|
}
|
|
uintval = (unsigned long) intval;
|
|
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
|
|
if (uintval >> (PyLong_SHIFT * 4)) {
|
|
unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
|
|
| (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
|
|
} else
|
|
#endif
|
|
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
|
|
if (uintval >> (PyLong_SHIFT * 3)) {
|
|
unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
|
|
| (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
|
|
} else
|
|
#endif
|
|
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
|
|
if (uintval >> (PyLong_SHIFT * 2)) {
|
|
unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
|
|
| (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
|
|
} else
|
|
#endif
|
|
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
|
|
if (uintval >> (PyLong_SHIFT * 1)) {
|
|
unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
|
|
| (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
|
|
} else
|
|
#endif
|
|
unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
|
|
if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
|
|
}
|
|
#endif
|
|
if (PyFloat_CheckExact(op1)) {
|
|
const long b = intval;
|
|
double a = PyFloat_AS_DOUBLE(op1);
|
|
if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
|
|
}
|
|
return (
|
|
PyObject_RichCompare(op1, op2, Py_EQ));
|
|
}
|
|
|
|
/* FetchCommonType */
|
|
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
|
|
PyObject* fake_module;
|
|
PyTypeObject* cached_type = NULL;
|
|
fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
|
|
if (!fake_module) return NULL;
|
|
Py_INCREF(fake_module);
|
|
cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
|
|
if (cached_type) {
|
|
if (!PyType_Check((PyObject*)cached_type)) {
|
|
PyErr_Format(PyExc_TypeError,
|
|
"Shared Cython type %.200s is not a type object",
|
|
type->tp_name);
|
|
goto bad;
|
|
}
|
|
if (cached_type->tp_basicsize != type->tp_basicsize) {
|
|
PyErr_Format(PyExc_TypeError,
|
|
"Shared Cython type %.200s has the wrong size, try recompiling",
|
|
type->tp_name);
|
|
goto bad;
|
|
}
|
|
} else {
|
|
if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
|
|
PyErr_Clear();
|
|
if (PyType_Ready(type) < 0) goto bad;
|
|
if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
|
|
goto bad;
|
|
Py_INCREF(type);
|
|
cached_type = type;
|
|
}
|
|
done:
|
|
Py_DECREF(fake_module);
|
|
return cached_type;
|
|
bad:
|
|
Py_XDECREF(cached_type);
|
|
cached_type = NULL;
|
|
goto done;
|
|
}
|
|
|
|
/* CythonFunction */
|
|
#include <structmember.h>
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
|
|
{
|
|
if (unlikely(op->func_doc == NULL)) {
|
|
if (op->func.m_ml->ml_doc) {
|
|
#if PY_MAJOR_VERSION >= 3
|
|
op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
|
|
#else
|
|
op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
|
|
#endif
|
|
if (unlikely(op->func_doc == NULL))
|
|
return NULL;
|
|
} else {
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
Py_INCREF(op->func_doc);
|
|
return op->func_doc;
|
|
}
|
|
static int
|
|
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
|
|
{
|
|
PyObject *tmp = op->func_doc;
|
|
if (value == NULL) {
|
|
value = Py_None;
|
|
}
|
|
Py_INCREF(value);
|
|
op->func_doc = value;
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
|
|
{
|
|
if (unlikely(op->func_name == NULL)) {
|
|
#if PY_MAJOR_VERSION >= 3
|
|
op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
|
|
#else
|
|
op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
|
|
#endif
|
|
if (unlikely(op->func_name == NULL))
|
|
return NULL;
|
|
}
|
|
Py_INCREF(op->func_name);
|
|
return op->func_name;
|
|
}
|
|
static int
|
|
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
|
|
{
|
|
PyObject *tmp;
|
|
#if PY_MAJOR_VERSION >= 3
|
|
if (unlikely(value == NULL || !PyUnicode_Check(value)))
|
|
#else
|
|
if (unlikely(value == NULL || !PyString_Check(value)))
|
|
#endif
|
|
{
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"__name__ must be set to a string object");
|
|
return -1;
|
|
}
|
|
tmp = op->func_name;
|
|
Py_INCREF(value);
|
|
op->func_name = value;
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
|
|
{
|
|
Py_INCREF(op->func_qualname);
|
|
return op->func_qualname;
|
|
}
|
|
static int
|
|
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
|
|
{
|
|
PyObject *tmp;
|
|
#if PY_MAJOR_VERSION >= 3
|
|
if (unlikely(value == NULL || !PyUnicode_Check(value)))
|
|
#else
|
|
if (unlikely(value == NULL || !PyString_Check(value)))
|
|
#endif
|
|
{
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"__qualname__ must be set to a string object");
|
|
return -1;
|
|
}
|
|
tmp = op->func_qualname;
|
|
Py_INCREF(value);
|
|
op->func_qualname = value;
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
|
|
{
|
|
PyObject *self;
|
|
self = m->func_closure;
|
|
if (self == NULL)
|
|
self = Py_None;
|
|
Py_INCREF(self);
|
|
return self;
|
|
}
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
|
|
{
|
|
if (unlikely(op->func_dict == NULL)) {
|
|
op->func_dict = PyDict_New();
|
|
if (unlikely(op->func_dict == NULL))
|
|
return NULL;
|
|
}
|
|
Py_INCREF(op->func_dict);
|
|
return op->func_dict;
|
|
}
|
|
static int
|
|
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
|
|
{
|
|
PyObject *tmp;
|
|
if (unlikely(value == NULL)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"function's dictionary may not be deleted");
|
|
return -1;
|
|
}
|
|
if (unlikely(!PyDict_Check(value))) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"setting function's dictionary to a non-dict");
|
|
return -1;
|
|
}
|
|
tmp = op->func_dict;
|
|
Py_INCREF(value);
|
|
op->func_dict = value;
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
|
|
{
|
|
Py_INCREF(op->func_globals);
|
|
return op->func_globals;
|
|
}
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
|
|
{
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
|
|
{
|
|
PyObject* result = (op->func_code) ? op->func_code : Py_None;
|
|
Py_INCREF(result);
|
|
return result;
|
|
}
|
|
static int
|
|
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
|
|
int result = 0;
|
|
PyObject *res = op->defaults_getter((PyObject *) op);
|
|
if (unlikely(!res))
|
|
return -1;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
|
|
Py_INCREF(op->defaults_tuple);
|
|
op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
|
|
Py_INCREF(op->defaults_kwdict);
|
|
#else
|
|
op->defaults_tuple = PySequence_ITEM(res, 0);
|
|
if (unlikely(!op->defaults_tuple)) result = -1;
|
|
else {
|
|
op->defaults_kwdict = PySequence_ITEM(res, 1);
|
|
if (unlikely(!op->defaults_kwdict)) result = -1;
|
|
}
|
|
#endif
|
|
Py_DECREF(res);
|
|
return result;
|
|
}
|
|
static int
|
|
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
|
|
PyObject* tmp;
|
|
if (!value) {
|
|
value = Py_None;
|
|
} else if (value != Py_None && !PyTuple_Check(value)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"__defaults__ must be set to a tuple object");
|
|
return -1;
|
|
}
|
|
Py_INCREF(value);
|
|
tmp = op->defaults_tuple;
|
|
op->defaults_tuple = value;
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
|
|
PyObject* result = op->defaults_tuple;
|
|
if (unlikely(!result)) {
|
|
if (op->defaults_getter) {
|
|
if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
|
|
result = op->defaults_tuple;
|
|
} else {
|
|
result = Py_None;
|
|
}
|
|
}
|
|
Py_INCREF(result);
|
|
return result;
|
|
}
|
|
static int
|
|
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
|
|
PyObject* tmp;
|
|
if (!value) {
|
|
value = Py_None;
|
|
} else if (value != Py_None && !PyDict_Check(value)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"__kwdefaults__ must be set to a dict object");
|
|
return -1;
|
|
}
|
|
Py_INCREF(value);
|
|
tmp = op->defaults_kwdict;
|
|
op->defaults_kwdict = value;
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
|
|
PyObject* result = op->defaults_kwdict;
|
|
if (unlikely(!result)) {
|
|
if (op->defaults_getter) {
|
|
if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
|
|
result = op->defaults_kwdict;
|
|
} else {
|
|
result = Py_None;
|
|
}
|
|
}
|
|
Py_INCREF(result);
|
|
return result;
|
|
}
|
|
static int
|
|
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
|
|
PyObject* tmp;
|
|
if (!value || value == Py_None) {
|
|
value = NULL;
|
|
} else if (!PyDict_Check(value)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"__annotations__ must be set to a dict object");
|
|
return -1;
|
|
}
|
|
Py_XINCREF(value);
|
|
tmp = op->func_annotations;
|
|
op->func_annotations = value;
|
|
Py_XDECREF(tmp);
|
|
return 0;
|
|
}
|
|
static PyObject *
|
|
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
|
|
PyObject* result = op->func_annotations;
|
|
if (unlikely(!result)) {
|
|
result = PyDict_New();
|
|
if (unlikely(!result)) return NULL;
|
|
op->func_annotations = result;
|
|
}
|
|
Py_INCREF(result);
|
|
return result;
|
|
}
|
|
static PyGetSetDef __pyx_CyFunction_getsets[] = {
|
|
{(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
|
|
{(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
|
|
{(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
|
|
{(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
|
|
{(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
|
|
{(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
|
|
{(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
|
|
{(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
|
|
{(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
|
|
{(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
|
|
{(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
|
|
{(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
|
|
{(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
|
|
{(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
|
|
{(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
|
|
{(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
|
|
{(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
|
|
{(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
|
|
{0, 0, 0, 0, 0}
|
|
};
|
|
static PyMemberDef __pyx_CyFunction_members[] = {
|
|
{(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
|
|
{0, 0, 0, 0, 0}
|
|
};
|
|
static PyObject *
|
|
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
|
|
{
|
|
#if PY_MAJOR_VERSION >= 3
|
|
return PyUnicode_FromString(m->func.m_ml->ml_name);
|
|
#else
|
|
return PyString_FromString(m->func.m_ml->ml_name);
|
|
#endif
|
|
}
|
|
static PyMethodDef __pyx_CyFunction_methods[] = {
|
|
{"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
|
|
{0, 0, 0, 0}
|
|
};
|
|
#if PY_VERSION_HEX < 0x030500A0
|
|
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
|
|
#else
|
|
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
|
|
#endif
|
|
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
|
|
PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
|
|
__pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
|
|
if (op == NULL)
|
|
return NULL;
|
|
op->flags = flags;
|
|
__Pyx_CyFunction_weakreflist(op) = NULL;
|
|
op->func.m_ml = ml;
|
|
op->func.m_self = (PyObject *) op;
|
|
Py_XINCREF(closure);
|
|
op->func_closure = closure;
|
|
Py_XINCREF(module);
|
|
op->func.m_module = module;
|
|
op->func_dict = NULL;
|
|
op->func_name = NULL;
|
|
Py_INCREF(qualname);
|
|
op->func_qualname = qualname;
|
|
op->func_doc = NULL;
|
|
op->func_classobj = NULL;
|
|
op->func_globals = globals;
|
|
Py_INCREF(op->func_globals);
|
|
Py_XINCREF(code);
|
|
op->func_code = code;
|
|
op->defaults_pyobjects = 0;
|
|
op->defaults = NULL;
|
|
op->defaults_tuple = NULL;
|
|
op->defaults_kwdict = NULL;
|
|
op->defaults_getter = NULL;
|
|
op->func_annotations = NULL;
|
|
PyObject_GC_Track(op);
|
|
return (PyObject *) op;
|
|
}
|
|
static int
|
|
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
|
|
{
|
|
Py_CLEAR(m->func_closure);
|
|
Py_CLEAR(m->func.m_module);
|
|
Py_CLEAR(m->func_dict);
|
|
Py_CLEAR(m->func_name);
|
|
Py_CLEAR(m->func_qualname);
|
|
Py_CLEAR(m->func_doc);
|
|
Py_CLEAR(m->func_globals);
|
|
Py_CLEAR(m->func_code);
|
|
Py_CLEAR(m->func_classobj);
|
|
Py_CLEAR(m->defaults_tuple);
|
|
Py_CLEAR(m->defaults_kwdict);
|
|
Py_CLEAR(m->func_annotations);
|
|
if (m->defaults) {
|
|
PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
|
|
int i;
|
|
for (i = 0; i < m->defaults_pyobjects; i++)
|
|
Py_XDECREF(pydefaults[i]);
|
|
PyObject_Free(m->defaults);
|
|
m->defaults = NULL;
|
|
}
|
|
return 0;
|
|
}
|
|
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
|
|
{
|
|
if (__Pyx_CyFunction_weakreflist(m) != NULL)
|
|
PyObject_ClearWeakRefs((PyObject *) m);
|
|
__Pyx_CyFunction_clear(m);
|
|
PyObject_GC_Del(m);
|
|
}
|
|
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
|
|
{
|
|
PyObject_GC_UnTrack(m);
|
|
__Pyx__CyFunction_dealloc(m);
|
|
}
|
|
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
|
|
{
|
|
Py_VISIT(m->func_closure);
|
|
Py_VISIT(m->func.m_module);
|
|
Py_VISIT(m->func_dict);
|
|
Py_VISIT(m->func_name);
|
|
Py_VISIT(m->func_qualname);
|
|
Py_VISIT(m->func_doc);
|
|
Py_VISIT(m->func_globals);
|
|
Py_VISIT(m->func_code);
|
|
Py_VISIT(m->func_classobj);
|
|
Py_VISIT(m->defaults_tuple);
|
|
Py_VISIT(m->defaults_kwdict);
|
|
if (m->defaults) {
|
|
PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
|
|
int i;
|
|
for (i = 0; i < m->defaults_pyobjects; i++)
|
|
Py_VISIT(pydefaults[i]);
|
|
}
|
|
return 0;
|
|
}
|
|
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
|
|
{
|
|
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
|
|
if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
|
|
Py_INCREF(func);
|
|
return func;
|
|
}
|
|
if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
|
|
if (type == NULL)
|
|
type = (PyObject *)(Py_TYPE(obj));
|
|
return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
|
|
}
|
|
if (obj == Py_None)
|
|
obj = NULL;
|
|
return __Pyx_PyMethod_New(func, obj, type);
|
|
}
|
|
static PyObject*
|
|
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
|
|
{
|
|
#if PY_MAJOR_VERSION >= 3
|
|
return PyUnicode_FromFormat("<cyfunction %U at %p>",
|
|
op->func_qualname, (void *)op);
|
|
#else
|
|
return PyString_FromFormat("<cyfunction %s at %p>",
|
|
PyString_AsString(op->func_qualname), (void *)op);
|
|
#endif
|
|
}
|
|
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
|
|
PyCFunctionObject* f = (PyCFunctionObject*)func;
|
|
PyCFunction meth = f->m_ml->ml_meth;
|
|
Py_ssize_t size;
|
|
switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
|
|
case METH_VARARGS:
|
|
if (likely(kw == NULL || PyDict_Size(kw) == 0))
|
|
return (*meth)(self, arg);
|
|
break;
|
|
case METH_VARARGS | METH_KEYWORDS:
|
|
return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
|
|
case METH_NOARGS:
|
|
if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
|
|
size = PyTuple_GET_SIZE(arg);
|
|
if (likely(size == 0))
|
|
return (*meth)(self, NULL);
|
|
PyErr_Format(PyExc_TypeError,
|
|
"%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
|
|
f->m_ml->ml_name, size);
|
|
return NULL;
|
|
}
|
|
break;
|
|
case METH_O:
|
|
if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
|
|
size = PyTuple_GET_SIZE(arg);
|
|
if (likely(size == 1)) {
|
|
PyObject *result, *arg0;
|
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
arg0 = PyTuple_GET_ITEM(arg, 0);
|
|
#else
|
|
arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
|
|
#endif
|
|
result = (*meth)(self, arg0);
|
|
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
|
|
Py_DECREF(arg0);
|
|
#endif
|
|
return result;
|
|
}
|
|
PyErr_Format(PyExc_TypeError,
|
|
"%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
|
|
f->m_ml->ml_name, size);
|
|
return NULL;
|
|
}
|
|
break;
|
|
default:
|
|
PyErr_SetString(PyExc_SystemError, "Bad call flags in "
|
|
"__Pyx_CyFunction_Call. METH_OLDARGS is no "
|
|
"longer supported!");
|
|
return NULL;
|
|
}
|
|
PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
|
|
f->m_ml->ml_name);
|
|
return NULL;
|
|
}
|
|
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
|
|
return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
|
|
}
|
|
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
|
|
PyObject *result;
|
|
__pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
|
|
if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
|
|
Py_ssize_t argc;
|
|
PyObject *new_args;
|
|
PyObject *self;
|
|
argc = PyTuple_GET_SIZE(args);
|
|
new_args = PyTuple_GetSlice(args, 1, argc);
|
|
if (unlikely(!new_args))
|
|
return NULL;
|
|
self = PyTuple_GetItem(args, 0);
|
|
if (unlikely(!self)) {
|
|
Py_DECREF(new_args);
|
|
return NULL;
|
|
}
|
|
result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
|
|
Py_DECREF(new_args);
|
|
} else {
|
|
result = __Pyx_CyFunction_Call(func, args, kw);
|
|
}
|
|
return result;
|
|
}
|
|
static PyTypeObject __pyx_CyFunctionType_type = {
|
|
PyVarObject_HEAD_INIT(0, 0)
|
|
"cython_function_or_method",
|
|
sizeof(__pyx_CyFunctionObject),
|
|
0,
|
|
(destructor) __Pyx_CyFunction_dealloc,
|
|
0,
|
|
0,
|
|
0,
|
|
#if PY_MAJOR_VERSION < 3
|
|
0,
|
|
#else
|
|
0,
|
|
#endif
|
|
(reprfunc) __Pyx_CyFunction_repr,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
__Pyx_CyFunction_CallAsMethod,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
|
|
0,
|
|
(traverseproc) __Pyx_CyFunction_traverse,
|
|
(inquiry) __Pyx_CyFunction_clear,
|
|
0,
|
|
#if PY_VERSION_HEX < 0x030500A0
|
|
offsetof(__pyx_CyFunctionObject, func_weakreflist),
|
|
#else
|
|
offsetof(PyCFunctionObject, m_weakreflist),
|
|
#endif
|
|
0,
|
|
0,
|
|
__pyx_CyFunction_methods,
|
|
__pyx_CyFunction_members,
|
|
__pyx_CyFunction_getsets,
|
|
0,
|
|
0,
|
|
__Pyx_CyFunction_descr_get,
|
|
0,
|
|
offsetof(__pyx_CyFunctionObject, func_dict),
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
#if PY_VERSION_HEX >= 0x030400a1
|
|
0,
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b1
|
|
0,
|
|
#endif
|
|
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
|
|
0,
|
|
#endif
|
|
};
|
|
static int __pyx_CyFunction_init(void) {
|
|
__pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
|
|
if (unlikely(__pyx_CyFunctionType == NULL)) {
|
|
return -1;
|
|
}
|
|
return 0;
|
|
}
|
|
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
|
|
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
|
|
m->defaults = PyObject_Malloc(size);
|
|
if (unlikely(!m->defaults))
|
|
return PyErr_NoMemory();
|
|
memset(m->defaults, 0, size);
|
|
m->defaults_pyobjects = pyobjects;
|
|
return m->defaults;
|
|
}
|
|
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
|
|
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
|
|
m->defaults_tuple = tuple;
|
|
Py_INCREF(tuple);
|
|
}
|
|
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
|
|
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
|
|
m->defaults_kwdict = dict;
|
|
Py_INCREF(dict);
|
|
}
|
|
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
|
|
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
|
|
m->func_annotations = dict;
|
|
Py_INCREF(dict);
|
|
}
|
|
|
|
/* CLineInTraceback */
|
|
#ifndef CYTHON_CLINE_IN_TRACEBACK
|
|
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
|
|
PyObject *use_cline;
|
|
PyObject *ptype, *pvalue, *ptraceback;
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
PyObject **cython_runtime_dict;
|
|
#endif
|
|
if (unlikely(!__pyx_cython_runtime)) {
|
|
return c_line;
|
|
}
|
|
__Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
|
|
if (likely(cython_runtime_dict)) {
|
|
__PYX_PY_DICT_LOOKUP_IF_MODIFIED(
|
|
use_cline, *cython_runtime_dict,
|
|
__Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
|
|
} else
|
|
#endif
|
|
{
|
|
PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
|
|
if (use_cline_obj) {
|
|
use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
|
|
Py_DECREF(use_cline_obj);
|
|
} else {
|
|
PyErr_Clear();
|
|
use_cline = NULL;
|
|
}
|
|
}
|
|
if (!use_cline) {
|
|
c_line = 0;
|
|
PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
|
|
}
|
|
else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
|
|
c_line = 0;
|
|
}
|
|
__Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
|
|
return c_line;
|
|
}
|
|
#endif
|
|
|
|
/* CodeObjectCache */
|
|
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
|
|
int start = 0, mid = 0, end = count - 1;
|
|
if (end >= 0 && code_line > entries[end].code_line) {
|
|
return count;
|
|
}
|
|
while (start < end) {
|
|
mid = start + (end - start) / 2;
|
|
if (code_line < entries[mid].code_line) {
|
|
end = mid;
|
|
} else if (code_line > entries[mid].code_line) {
|
|
start = mid + 1;
|
|
} else {
|
|
return mid;
|
|
}
|
|
}
|
|
if (code_line <= entries[mid].code_line) {
|
|
return mid;
|
|
} else {
|
|
return mid + 1;
|
|
}
|
|
}
|
|
static PyCodeObject *__pyx_find_code_object(int code_line) {
|
|
PyCodeObject* code_object;
|
|
int pos;
|
|
if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
|
|
return NULL;
|
|
}
|
|
pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
|
|
if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
|
|
return NULL;
|
|
}
|
|
code_object = __pyx_code_cache.entries[pos].code_object;
|
|
Py_INCREF(code_object);
|
|
return code_object;
|
|
}
|
|
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
|
|
int pos, i;
|
|
__Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
|
|
if (unlikely(!code_line)) {
|
|
return;
|
|
}
|
|
if (unlikely(!entries)) {
|
|
entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
|
|
if (likely(entries)) {
|
|
__pyx_code_cache.entries = entries;
|
|
__pyx_code_cache.max_count = 64;
|
|
__pyx_code_cache.count = 1;
|
|
entries[0].code_line = code_line;
|
|
entries[0].code_object = code_object;
|
|
Py_INCREF(code_object);
|
|
}
|
|
return;
|
|
}
|
|
pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
|
|
if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
|
|
PyCodeObject* tmp = entries[pos].code_object;
|
|
entries[pos].code_object = code_object;
|
|
Py_DECREF(tmp);
|
|
return;
|
|
}
|
|
if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
|
|
int new_max = __pyx_code_cache.max_count + 64;
|
|
entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
|
|
__pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
|
|
if (unlikely(!entries)) {
|
|
return;
|
|
}
|
|
__pyx_code_cache.entries = entries;
|
|
__pyx_code_cache.max_count = new_max;
|
|
}
|
|
for (i=__pyx_code_cache.count; i>pos; i--) {
|
|
entries[i] = entries[i-1];
|
|
}
|
|
entries[pos].code_line = code_line;
|
|
entries[pos].code_object = code_object;
|
|
__pyx_code_cache.count++;
|
|
Py_INCREF(code_object);
|
|
}
|
|
|
|
/* AddTraceback */
|
|
#include "compile.h"
|
|
#include "frameobject.h"
|
|
#include "traceback.h"
|
|
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
|
|
const char *funcname, int c_line,
|
|
int py_line, const char *filename) {
|
|
PyCodeObject *py_code = 0;
|
|
PyObject *py_srcfile = 0;
|
|
PyObject *py_funcname = 0;
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_srcfile = PyString_FromString(filename);
|
|
#else
|
|
py_srcfile = PyUnicode_FromString(filename);
|
|
#endif
|
|
if (!py_srcfile) goto bad;
|
|
if (c_line) {
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
|
|
#else
|
|
py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
|
|
#endif
|
|
}
|
|
else {
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_funcname = PyString_FromString(funcname);
|
|
#else
|
|
py_funcname = PyUnicode_FromString(funcname);
|
|
#endif
|
|
}
|
|
if (!py_funcname) goto bad;
|
|
py_code = __Pyx_PyCode_New(
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
__pyx_empty_bytes, /*PyObject *code,*/
|
|
__pyx_empty_tuple, /*PyObject *consts,*/
|
|
__pyx_empty_tuple, /*PyObject *names,*/
|
|
__pyx_empty_tuple, /*PyObject *varnames,*/
|
|
__pyx_empty_tuple, /*PyObject *freevars,*/
|
|
__pyx_empty_tuple, /*PyObject *cellvars,*/
|
|
py_srcfile, /*PyObject *filename,*/
|
|
py_funcname, /*PyObject *name,*/
|
|
py_line,
|
|
__pyx_empty_bytes /*PyObject *lnotab*/
|
|
);
|
|
Py_DECREF(py_srcfile);
|
|
Py_DECREF(py_funcname);
|
|
return py_code;
|
|
bad:
|
|
Py_XDECREF(py_srcfile);
|
|
Py_XDECREF(py_funcname);
|
|
return NULL;
|
|
}
|
|
static void __Pyx_AddTraceback(const char *funcname, int c_line,
|
|
int py_line, const char *filename) {
|
|
PyCodeObject *py_code = 0;
|
|
PyFrameObject *py_frame = 0;
|
|
PyThreadState *tstate = __Pyx_PyThreadState_Current;
|
|
if (c_line) {
|
|
c_line = __Pyx_CLineForTraceback(tstate, c_line);
|
|
}
|
|
py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
|
|
if (!py_code) {
|
|
py_code = __Pyx_CreateCodeObjectForTraceback(
|
|
funcname, c_line, py_line, filename);
|
|
if (!py_code) goto bad;
|
|
__pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
|
|
}
|
|
py_frame = PyFrame_New(
|
|
tstate, /*PyThreadState *tstate,*/
|
|
py_code, /*PyCodeObject *code,*/
|
|
__pyx_d, /*PyObject *globals,*/
|
|
0 /*PyObject *locals*/
|
|
);
|
|
if (!py_frame) goto bad;
|
|
__Pyx_PyFrame_SetLineNumber(py_frame, py_line);
|
|
PyTraceBack_Here(py_frame);
|
|
bad:
|
|
Py_XDECREF(py_code);
|
|
Py_XDECREF(py_frame);
|
|
}
|
|
|
|
/* CIntToPy */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
|
|
const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (is_unsigned) {
|
|
if (sizeof(int) < sizeof(long)) {
|
|
return PyInt_FromLong((long) value);
|
|
} else if (sizeof(int) <= sizeof(unsigned long)) {
|
|
return PyLong_FromUnsignedLong((unsigned long) value);
|
|
#ifdef HAVE_LONG_LONG
|
|
} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
|
|
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
|
|
#endif
|
|
}
|
|
} else {
|
|
if (sizeof(int) <= sizeof(long)) {
|
|
return PyInt_FromLong((long) value);
|
|
#ifdef HAVE_LONG_LONG
|
|
} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
|
|
return PyLong_FromLongLong((PY_LONG_LONG) value);
|
|
#endif
|
|
}
|
|
}
|
|
{
|
|
int one = 1; int little = (int)*(unsigned char *)&one;
|
|
unsigned char *bytes = (unsigned char *)&value;
|
|
return _PyLong_FromByteArray(bytes, sizeof(int),
|
|
little, !is_unsigned);
|
|
}
|
|
}
|
|
|
|
/* CIntFromPyVerify */
|
|
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
|
|
__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
|
|
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
|
|
__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
|
|
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
|
|
{\
|
|
func_type value = func_value;\
|
|
if (sizeof(target_type) < sizeof(func_type)) {\
|
|
if (unlikely(value != (func_type) (target_type) value)) {\
|
|
func_type zero = 0;\
|
|
if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
|
|
return (target_type) -1;\
|
|
if (is_unsigned && unlikely(value < zero))\
|
|
goto raise_neg_overflow;\
|
|
else\
|
|
goto raise_overflow;\
|
|
}\
|
|
}\
|
|
return (target_type) value;\
|
|
}
|
|
|
|
/* CIntToPy */
|
|
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
|
|
const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
if (is_unsigned) {
|
|
if (sizeof(long) < sizeof(long)) {
|
|
return PyInt_FromLong((long) value);
|
|
} else if (sizeof(long) <= sizeof(unsigned long)) {
|
|
return PyLong_FromUnsignedLong((unsigned long) value);
|
|
#ifdef HAVE_LONG_LONG
|
|
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
|
|
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
|
|
#endif
|
|
}
|
|
} else {
|
|
if (sizeof(long) <= sizeof(long)) {
|
|
return PyInt_FromLong((long) value);
|
|
#ifdef HAVE_LONG_LONG
|
|
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
|
|
return PyLong_FromLongLong((PY_LONG_LONG) value);
|
|
#endif
|
|
}
|
|
}
|
|
{
|
|
int one = 1; int little = (int)*(unsigned char *)&one;
|
|
unsigned char *bytes = (unsigned char *)&value;
|
|
return _PyLong_FromByteArray(bytes, sizeof(long),
|
|
little, !is_unsigned);
|
|
}
|
|
}
|
|
|
|
/* CIntFromPy */
|
|
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
|
|
const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(PyInt_Check(x))) {
|
|
if (sizeof(int) < sizeof(long)) {
|
|
__PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
|
|
} else {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (is_unsigned && unlikely(val < 0)) {
|
|
goto raise_neg_overflow;
|
|
}
|
|
return (int) val;
|
|
}
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (is_unsigned) {
|
|
#if CYTHON_USE_PYLONG_INTERNALS
|
|
const digit* digits = ((PyLongObject*)x)->ob_digit;
|
|
switch (Py_SIZE(x)) {
|
|
case 0: return (int) 0;
|
|
case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
|
|
case 2:
|
|
if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
|
|
return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
|
|
}
|
|
}
|
|
break;
|
|
case 3:
|
|
if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
|
|
return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
|
|
}
|
|
}
|
|
break;
|
|
case 4:
|
|
if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
|
|
return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
if (unlikely(Py_SIZE(x) < 0)) {
|
|
goto raise_neg_overflow;
|
|
}
|
|
#else
|
|
{
|
|
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
|
|
if (unlikely(result < 0))
|
|
return (int) -1;
|
|
if (unlikely(result == 1))
|
|
goto raise_neg_overflow;
|
|
}
|
|
#endif
|
|
if (sizeof(int) <= sizeof(unsigned long)) {
|
|
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
|
|
#ifdef HAVE_LONG_LONG
|
|
} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
|
|
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
|
|
#endif
|
|
}
|
|
} else {
|
|
#if CYTHON_USE_PYLONG_INTERNALS
|
|
const digit* digits = ((PyLongObject*)x)->ob_digit;
|
|
switch (Py_SIZE(x)) {
|
|
case 0: return (int) 0;
|
|
case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
|
|
case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
|
|
case -2:
|
|
if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
|
|
return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
case 2:
|
|
if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
|
|
return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
case -3:
|
|
if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
|
|
return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
case 3:
|
|
if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
|
|
return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
case -4:
|
|
if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
|
|
return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
case 4:
|
|
if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
|
|
return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
#endif
|
|
if (sizeof(int) <= sizeof(long)) {
|
|
__PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
|
|
#ifdef HAVE_LONG_LONG
|
|
} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
|
|
__PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
|
|
#endif
|
|
}
|
|
}
|
|
{
|
|
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
|
|
PyErr_SetString(PyExc_RuntimeError,
|
|
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
|
|
#else
|
|
int val;
|
|
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(v) && !PyLong_Check(v)) {
|
|
PyObject *tmp = v;
|
|
v = PyNumber_Long(tmp);
|
|
Py_DECREF(tmp);
|
|
}
|
|
#endif
|
|
if (likely(v)) {
|
|
int one = 1; int is_little = (int)*(unsigned char *)&one;
|
|
unsigned char *bytes = (unsigned char *)&val;
|
|
int ret = _PyLong_AsByteArray((PyLongObject *)v,
|
|
bytes, sizeof(val),
|
|
is_little, !is_unsigned);
|
|
Py_DECREF(v);
|
|
if (likely(!ret))
|
|
return val;
|
|
}
|
|
#endif
|
|
return (int) -1;
|
|
}
|
|
} else {
|
|
int val;
|
|
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
|
|
if (!tmp) return (int) -1;
|
|
val = __Pyx_PyInt_As_int(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
raise_overflow:
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"value too large to convert to int");
|
|
return (int) -1;
|
|
raise_neg_overflow:
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to int");
|
|
return (int) -1;
|
|
}
|
|
|
|
/* CIntFromPy */
|
|
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
|
|
const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
|
|
const int is_unsigned = neg_one > const_zero;
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(PyInt_Check(x))) {
|
|
if (sizeof(long) < sizeof(long)) {
|
|
__PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
|
|
} else {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (is_unsigned && unlikely(val < 0)) {
|
|
goto raise_neg_overflow;
|
|
}
|
|
return (long) val;
|
|
}
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (is_unsigned) {
|
|
#if CYTHON_USE_PYLONG_INTERNALS
|
|
const digit* digits = ((PyLongObject*)x)->ob_digit;
|
|
switch (Py_SIZE(x)) {
|
|
case 0: return (long) 0;
|
|
case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
|
|
case 2:
|
|
if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
|
|
return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
|
|
}
|
|
}
|
|
break;
|
|
case 3:
|
|
if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
|
|
return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
|
|
}
|
|
}
|
|
break;
|
|
case 4:
|
|
if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
|
|
return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
#endif
|
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
if (unlikely(Py_SIZE(x) < 0)) {
|
|
goto raise_neg_overflow;
|
|
}
|
|
#else
|
|
{
|
|
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
|
|
if (unlikely(result < 0))
|
|
return (long) -1;
|
|
if (unlikely(result == 1))
|
|
goto raise_neg_overflow;
|
|
}
|
|
#endif
|
|
if (sizeof(long) <= sizeof(unsigned long)) {
|
|
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
|
|
#ifdef HAVE_LONG_LONG
|
|
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
|
|
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
|
|
#endif
|
|
}
|
|
} else {
|
|
#if CYTHON_USE_PYLONG_INTERNALS
|
|
const digit* digits = ((PyLongObject*)x)->ob_digit;
|
|
switch (Py_SIZE(x)) {
|
|
case 0: return (long) 0;
|
|
case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
|
|
case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
|
|
case -2:
|
|
if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
|
|
return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
case 2:
|
|
if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
|
|
return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
case -3:
|
|
if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
|
|
return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
case 3:
|
|
if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
|
|
return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
case -4:
|
|
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
|
|
return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
case 4:
|
|
if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
|
|
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
|
|
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
|
|
} else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
|
|
return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
#endif
|
|
if (sizeof(long) <= sizeof(long)) {
|
|
__PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
|
|
#ifdef HAVE_LONG_LONG
|
|
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
|
|
__PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
|
|
#endif
|
|
}
|
|
}
|
|
{
|
|
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
|
|
PyErr_SetString(PyExc_RuntimeError,
|
|
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
|
|
#else
|
|
long val;
|
|
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(v) && !PyLong_Check(v)) {
|
|
PyObject *tmp = v;
|
|
v = PyNumber_Long(tmp);
|
|
Py_DECREF(tmp);
|
|
}
|
|
#endif
|
|
if (likely(v)) {
|
|
int one = 1; int is_little = (int)*(unsigned char *)&one;
|
|
unsigned char *bytes = (unsigned char *)&val;
|
|
int ret = _PyLong_AsByteArray((PyLongObject *)v,
|
|
bytes, sizeof(val),
|
|
is_little, !is_unsigned);
|
|
Py_DECREF(v);
|
|
if (likely(!ret))
|
|
return val;
|
|
}
|
|
#endif
|
|
return (long) -1;
|
|
}
|
|
} else {
|
|
long val;
|
|
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
|
|
if (!tmp) return (long) -1;
|
|
val = __Pyx_PyInt_As_long(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
raise_overflow:
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"value too large to convert to long");
|
|
return (long) -1;
|
|
raise_neg_overflow:
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to long");
|
|
return (long) -1;
|
|
}
|
|
|
|
/* CheckBinaryVersion */
|
|
static int __Pyx_check_binary_version(void) {
|
|
char ctversion[4], rtversion[4];
|
|
PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
|
|
PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
|
|
if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
|
|
char message[200];
|
|
PyOS_snprintf(message, sizeof(message),
|
|
"compiletime version %s of module '%.100s' "
|
|
"does not match runtime version %s",
|
|
ctversion, __Pyx_MODULE_NAME, rtversion);
|
|
return PyErr_WarnEx(NULL, message, 1);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
/* VoidPtrExport */
|
|
static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) {
|
|
PyObject *d;
|
|
PyObject *cobj = 0;
|
|
d = PyDict_GetItem(__pyx_d, __pyx_n_s_pyx_capi);
|
|
Py_XINCREF(d);
|
|
if (!d) {
|
|
d = PyDict_New();
|
|
if (!d)
|
|
goto bad;
|
|
if (__Pyx_PyObject_SetAttrStr(__pyx_m, __pyx_n_s_pyx_capi, d) < 0)
|
|
goto bad;
|
|
}
|
|
#if PY_VERSION_HEX >= 0x02070000
|
|
cobj = PyCapsule_New(p, sig, 0);
|
|
#else
|
|
cobj = PyCObject_FromVoidPtrAndDesc(p, (void *)sig, 0);
|
|
#endif
|
|
if (!cobj)
|
|
goto bad;
|
|
if (PyDict_SetItem(d, name, cobj) < 0)
|
|
goto bad;
|
|
Py_DECREF(cobj);
|
|
Py_DECREF(d);
|
|
return 0;
|
|
bad:
|
|
Py_XDECREF(cobj);
|
|
Py_XDECREF(d);
|
|
return -1;
|
|
}
|
|
|
|
/* FunctionExport */
|
|
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
|
|
PyObject *d = 0;
|
|
PyObject *cobj = 0;
|
|
union {
|
|
void (*fp)(void);
|
|
void *p;
|
|
} tmp;
|
|
d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
|
|
if (!d) {
|
|
PyErr_Clear();
|
|
d = PyDict_New();
|
|
if (!d)
|
|
goto bad;
|
|
Py_INCREF(d);
|
|
if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
|
|
goto bad;
|
|
}
|
|
tmp.fp = f;
|
|
#if PY_VERSION_HEX >= 0x02070000
|
|
cobj = PyCapsule_New(tmp.p, sig, 0);
|
|
#else
|
|
cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
|
|
#endif
|
|
if (!cobj)
|
|
goto bad;
|
|
if (PyDict_SetItemString(d, name, cobj) < 0)
|
|
goto bad;
|
|
Py_DECREF(cobj);
|
|
Py_DECREF(d);
|
|
return 0;
|
|
bad:
|
|
Py_XDECREF(cobj);
|
|
Py_XDECREF(d);
|
|
return -1;
|
|
}
|
|
|
|
/* InitStrings */
|
|
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
|
|
while (t->p) {
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (t->is_unicode) {
|
|
*t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
|
|
} else if (t->intern) {
|
|
*t->p = PyString_InternFromString(t->s);
|
|
} else {
|
|
*t->p = PyString_FromStringAndSize(t->s, t->n - 1);
|
|
}
|
|
#else
|
|
if (t->is_unicode | t->is_str) {
|
|
if (t->intern) {
|
|
*t->p = PyUnicode_InternFromString(t->s);
|
|
} else if (t->encoding) {
|
|
*t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
|
|
} else {
|
|
*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
|
|
}
|
|
} else {
|
|
*t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
|
|
}
|
|
#endif
|
|
if (!*t->p)
|
|
return -1;
|
|
if (PyObject_Hash(*t->p) == -1)
|
|
return -1;
|
|
++t;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
|
|
return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
|
|
}
|
|
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
|
|
Py_ssize_t ignore;
|
|
return __Pyx_PyObject_AsStringAndSize(o, &ignore);
|
|
}
|
|
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
|
|
#if !CYTHON_PEP393_ENABLED
|
|
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
|
|
char* defenc_c;
|
|
PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
|
|
if (!defenc) return NULL;
|
|
defenc_c = PyBytes_AS_STRING(defenc);
|
|
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
|
|
{
|
|
char* end = defenc_c + PyBytes_GET_SIZE(defenc);
|
|
char* c;
|
|
for (c = defenc_c; c < end; c++) {
|
|
if ((unsigned char) (*c) >= 128) {
|
|
PyUnicode_AsASCIIString(o);
|
|
return NULL;
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
*length = PyBytes_GET_SIZE(defenc);
|
|
return defenc_c;
|
|
}
|
|
#else
|
|
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
|
|
if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
|
|
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
|
|
if (likely(PyUnicode_IS_ASCII(o))) {
|
|
*length = PyUnicode_GET_LENGTH(o);
|
|
return PyUnicode_AsUTF8(o);
|
|
} else {
|
|
PyUnicode_AsASCIIString(o);
|
|
return NULL;
|
|
}
|
|
#else
|
|
return PyUnicode_AsUTF8AndSize(o, length);
|
|
#endif
|
|
}
|
|
#endif
|
|
#endif
|
|
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
|
|
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
|
|
if (
|
|
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
|
|
__Pyx_sys_getdefaultencoding_not_ascii &&
|
|
#endif
|
|
PyUnicode_Check(o)) {
|
|
return __Pyx_PyUnicode_AsStringAndSize(o, length);
|
|
} else
|
|
#endif
|
|
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
|
|
if (PyByteArray_Check(o)) {
|
|
*length = PyByteArray_GET_SIZE(o);
|
|
return PyByteArray_AS_STRING(o);
|
|
} else
|
|
#endif
|
|
{
|
|
char* result;
|
|
int r = PyBytes_AsStringAndSize(o, &result, length);
|
|
if (unlikely(r < 0)) {
|
|
return NULL;
|
|
} else {
|
|
return result;
|
|
}
|
|
}
|
|
}
|
|
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
|
|
int is_true = x == Py_True;
|
|
if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
|
|
else return PyObject_IsTrue(x);
|
|
}
|
|
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
|
|
int retval;
|
|
if (unlikely(!x)) return -1;
|
|
retval = __Pyx_PyObject_IsTrue(x);
|
|
Py_DECREF(x);
|
|
return retval;
|
|
}
|
|
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
|
|
#if PY_MAJOR_VERSION >= 3
|
|
if (PyLong_Check(result)) {
|
|
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
|
|
"__int__ returned non-int (type %.200s). "
|
|
"The ability to return an instance of a strict subclass of int "
|
|
"is deprecated, and may be removed in a future version of Python.",
|
|
Py_TYPE(result)->tp_name)) {
|
|
Py_DECREF(result);
|
|
return NULL;
|
|
}
|
|
return result;
|
|
}
|
|
#endif
|
|
PyErr_Format(PyExc_TypeError,
|
|
"__%.4s__ returned non-%.4s (type %.200s)",
|
|
type_name, type_name, Py_TYPE(result)->tp_name);
|
|
Py_DECREF(result);
|
|
return NULL;
|
|
}
|
|
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
|
|
#if CYTHON_USE_TYPE_SLOTS
|
|
PyNumberMethods *m;
|
|
#endif
|
|
const char *name = NULL;
|
|
PyObject *res = NULL;
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(PyInt_Check(x) || PyLong_Check(x)))
|
|
#else
|
|
if (likely(PyLong_Check(x)))
|
|
#endif
|
|
return __Pyx_NewRef(x);
|
|
#if CYTHON_USE_TYPE_SLOTS
|
|
m = Py_TYPE(x)->tp_as_number;
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (m && m->nb_int) {
|
|
name = "int";
|
|
res = m->nb_int(x);
|
|
}
|
|
else if (m && m->nb_long) {
|
|
name = "long";
|
|
res = m->nb_long(x);
|
|
}
|
|
#else
|
|
if (likely(m && m->nb_int)) {
|
|
name = "int";
|
|
res = m->nb_int(x);
|
|
}
|
|
#endif
|
|
#else
|
|
if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
|
|
res = PyNumber_Int(x);
|
|
}
|
|
#endif
|
|
if (likely(res)) {
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
|
|
#else
|
|
if (unlikely(!PyLong_CheckExact(res))) {
|
|
#endif
|
|
return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
|
|
}
|
|
}
|
|
else if (!PyErr_Occurred()) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"an integer is required");
|
|
}
|
|
return res;
|
|
}
|
|
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
|
|
Py_ssize_t ival;
|
|
PyObject *x;
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (likely(PyInt_CheckExact(b))) {
|
|
if (sizeof(Py_ssize_t) >= sizeof(long))
|
|
return PyInt_AS_LONG(b);
|
|
else
|
|
return PyInt_AsSsize_t(b);
|
|
}
|
|
#endif
|
|
if (likely(PyLong_CheckExact(b))) {
|
|
#if CYTHON_USE_PYLONG_INTERNALS
|
|
const digit* digits = ((PyLongObject*)b)->ob_digit;
|
|
const Py_ssize_t size = Py_SIZE(b);
|
|
if (likely(__Pyx_sst_abs(size) <= 1)) {
|
|
ival = likely(size) ? digits[0] : 0;
|
|
if (size == -1) ival = -ival;
|
|
return ival;
|
|
} else {
|
|
switch (size) {
|
|
case 2:
|
|
if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
|
|
return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
|
|
}
|
|
break;
|
|
case -2:
|
|
if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
|
|
return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
|
|
}
|
|
break;
|
|
case 3:
|
|
if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
|
|
return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
|
|
}
|
|
break;
|
|
case -3:
|
|
if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
|
|
return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
|
|
}
|
|
break;
|
|
case 4:
|
|
if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
|
|
return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
|
|
}
|
|
break;
|
|
case -4:
|
|
if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
|
|
return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
#endif
|
|
return PyLong_AsSsize_t(b);
|
|
}
|
|
x = PyNumber_Index(b);
|
|
if (!x) return -1;
|
|
ival = PyInt_AsSsize_t(x);
|
|
Py_DECREF(x);
|
|
return ival;
|
|
}
|
|
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
|
|
return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
|
|
}
|
|
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
|
|
return PyInt_FromSize_t(ival);
|
|
}
|
|
|
|
|
|
#endif /* Py_PYTHON_H */
|